This project provides a FastAPI wrapper for the unofficial 1337x API, allowing you to easily integrate 1337x torrent functionality into your Python applications.
- Search for torrents based on various parameters.
- Get trending, top, and popular torrents.
- Browse torrents by category.
- Retrieve detailed information about a specific torrent.
- Python 3.7 or higher
- pip (Python package installer)
-
Clone the repository:
git clone https://github.com/mudabbirulsaad/1337x-wrapper.git cd 1337x-wrapper
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the FastAPI application:
uvicorn main:app --reload
-
The FastAPI application will be running at
http://127.0.0.1:8000
.
Endpoint: /search
curl -X POST "http://127.0.0.1:8000/search" -d '{"query": "your_search_query"}'
Endpoint: /trending
curl -X POST "http://127.0.0.1:8000/trending" -d '{"category": "your_category"}'
Endpoint: /top
curl -X POST "http://127.0.0.1:8000/top" -d '{"category": "your_category"}'
Endpoint: /popular
curl -X POST "http://127.0.0.1:8000/popular" -d '{"category": "your_category"}'
Endpoint: /browse
curl -X POST "http://127.0.0.1:8000/browse" -d '{"category": "your_category", "page": 1}'
Endpoint: /info
curl -X POST "http://127.0.0.1:8000/info" -d '{"torrentId": 12345}'
Feel free to contribute to this project by opening issues or submitting pull requests. Your feedback and collaboration are highly appreciated.
This project is licensed under the MIT License.