A free JSON API for searching torrents and fetching the latest additions — use it in your own website, app or script. No API key, no registration. CORS is enabled (Access-Control-Allow-Origin: *), so you can call it straight from a browser.
Base URL: https://yourbittorrent.com · All endpoints are GET and return application/json (UTF-8).
| Parameter | Required | Description |
|---|---|---|
q | yes | Search terms, max 100 characters. Quotes, parentheses and @ are stripped. |
category | no | Filter by category — numeric id or name, see the table below. Example: category=movies or category=1. |
verified | no | 1 = only verified torrents. |
sort | no | seeds (default), peers, size or added. |
order | no | desc (default) or asc. |
limit | no | Results per page, 1–100. Default 20. |
page | no | Page number, starting at 1. page × limit may not exceed 1000. |
curl "https://yourbittorrent.com/api/search.json?q=ubuntu&category=software&limit=5"
The newest torrents on the site, newest first. Takes the same category, verified, limit and page parameters as search (no q, no sort).
curl "https://yourbittorrent.com/api/latest.json?category=movies&verified=1&limit=10"
{
"status": "ok",
"endpoint": "search",
"page": 1,
"limit": 20,
"count": 20,
"total_found": 1006,
"query": "ubuntu",
"results": [
{
"id": 38839040,
"name": "Ubuntu-22.04-desktop-amd64",
"infohash": "2c6b6858d61da9543d4231a71db4b1c9264b0685",
"magnet": "magnet:?xt=urn:btih:2c6b6858d61da9...&dn=Ubuntu-22.04-desktop-amd64",
"torrent_file": "https://yourbittorrent.com/down/38839040.torrent",
"url": "https://yourbittorrent.com/torrent/38839040/ubuntu-22-04-desktop-amd64.html",
"category": "Software",
"category_id": 5,
"size_bytes": 3654957056,
"size": "3.4 GB",
"seeds": 47,
"peers": 1,
"verified": true,
"added": 1652882016,
"added_iso": "2022-05-18T13:53:36+00:00"
}
]
}| Field | Meaning |
|---|---|
total_found | Total matches in the index. Only the first 1000 are reachable through paging. |
infohash | BitTorrent v1 info-hash (40-char hex, lowercase). |
magnet | Ready-to-use magnet link. Add your own &tr= trackers if you want faster peer discovery. |
torrent_file | Direct .torrent file download. |
url | The torrent's detail page on YourBittorrent. |
size_bytes / size | Size as raw bytes and as a human-readable string. |
added / added_iso | When it was indexed: unix timestamp and ISO-8601 (UTC). |
| ID | Name | ID | Name |
|---|---|---|---|
| 1 | Movies | 6 | Anime |
| 2 | Music | 7 | Adult |
| 3 | Television | 8 | eBooks |
| 4 | Games | 9 | Pictures |
| 5 | Software | 10 | Other |
| 12 | Audiobooks |
Errors come back as JSON with a matching HTTP status code:
{ "status": "error", "error": "limit must be 1-100" }| Status | When |
|---|---|
400 | Missing or invalid parameter — the error field says which. |
404 | Unknown endpoint. |
503 | Search backend briefly unavailable (happens for a moment every few hours) — retry after a minute. |
JavaScript (browser or Node):
const res = await fetch("https://yourbittorrent.com/api/search.json?q=debian&limit=5");
const data = await res.json();
for (const t of data.results) {
console.log(t.name, t.size, t.magnet);
}PHP:
$data = json_decode(file_get_contents(
"https://yourbittorrent.com/api/latest.json?category=television&limit=10"
), true);
foreach ($data["results"] as $t) {
echo $t["name"] . " - " . $t["seeds"] . " seeds\n";
}Python:
import requests
data = requests.get("https://yourbittorrent.com/api/search.json",
params={"q": "ubuntu", "verified": 1}).json()
for t in data["results"]:
print(t["name"], t["magnet"])Responses are cached on our CDN — latest for 5 minutes, search for 15 minutes — so identical requests are cheap. Please cache on your side too and keep it reasonable: this API is free for any site or app, but abusive scraping (thousands of uncached requests per minute) may get blocked. Questions or need more? Contact us.