API Documentation
A simple JSON API to search and retrieve torrent metadata. No authentication required. All endpoints return
application/json.
https://magnetz.eu/api/magnets/searchSearch magnets by keyword. Returns paginated results sorted by relevance, with ready-to-use magnet URIs plus swarm and timestamp metadata for each hit.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search keyword (at least one non-whitespace character) |
page | integer | No | Page number, defaults to 1. 25 results per page, max 100 total. |
Example Request
GET /api/magnets/search?query=ubuntu+22.04&page=1Example Response 200 OK
{
"data": [
{
"sqid": "a1B2c3D4",
"name": "Ubuntu 22.04.3 LTS Desktop amd64",
"info_hash": "3B4C5D6E7F8A9B0C1D2E3F4A5B6C7D8E9F0A1B2C",
"size": 1580945408,
"human_size": "1.47 GB",
"score": 0.92,
"health": 0.85,
"is_verified": true,
"largest_file": "ubuntu-22.04.3-desktop-amd64.iso",
"magnet_link": "magnet:?xt=urn:btih:3B4C5D6E7F8A9B0C1D2E3F4A5B6C7D8E9F0A1B2C&dn=Ubuntu%2022.04.3%20LTS%20Desktop%20amd64",
"seeders": 421,
"leechers": 18,
"created_at": "2026-04-18T09:30:00+00:00",
"web_url": "https://magnetz.eu/magnet/a1B2c3D4"
}
],
"links": {
"first": "/api/magnets/search?query=ubuntu&page=1",
"last": "/api/magnets/search?query=ubuntu&page=4",
"prev": null,
"next": "/api/magnets/search?query=ubuntu&page=2"
},
"meta": {
"query": "ubuntu 22.04",
"current_page": 1,
"last_page": 4,
"per_page": 25,
"total": 100,
"from": 1,
"to": 25
}
}Error Responses
| Status | error | Cause |
|---|---|---|
| 422 | invalid_query | Query is empty or whitespace-only |
| 503 | search_backend_unavailable | Search engine is temporarily unreachable |
/api/magnets/{sqid}Retrieve full details for a single magnet by its sqid, including
all files and trackers.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
sqid | path | Yes | Short alphanumeric ID shown in the magnet's page URL |
Example Request
GET /api/magnets/a1B2c3D4Example Response 200 OK
{
"data": {
"sqid": "a1B2c3D4",
"name": "Ubuntu 22.04.3 LTS Desktop amd64",
"info_hash": "3B4C5D6E7F8A9B0C1D2E3F4A5B6C7D8E9F0A1B2C",
"size": 1580945408,
"human_size": "1.47 GB",
"score": 0.92,
"health": 0.85,
"number_of_pieces": 3008,
"piece_length": 524288,
"creator": "mktorrent/1.1",
"creation_date": "2023-08-11T00:00:00+00:00",
"is_private": false,
"is_verified": true,
"is_active": true,
"magnet_link": "magnet:?xt=urn:btih:3B4C5D...&dn=Ubuntu+22.04...",
"web_url": "https://magnetz.eu/magnet/a1B2c3D4",
"release": {
"type": "software",
"resolution": null,
"format": "ISO"
},
"trackers": [
"udp://tracker.opentrackr.org:1337/announce",
"udp://open.tracker.cl:1337/announce"
],
"files": [
{
"path": "ubuntu-22.04.3-desktop-amd64.iso",
"size": 1580945408,
"human_size": "1.47 GB"
}
]
}
}Error Responses
| Status | error | Cause |
|---|---|---|
| 404 | magnet_not_found | No active magnet exists with that sqid |
/api/magnets/infohash/{infohash}Look up a magnet by its SHA-1 info hash. Accepts either a raw 40-character hex
string or a urn:btih: prefixed value. Returns the same shape as the sqid endpoint.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
infohash | path | Yes | 40-character hex SHA-1 hash; optionally prefixed with urn:btih: |
Example Requests
GET /api/magnets/infohash/3B4C5D6E7F8A9B0C1D2E3F4A5B6C7D8E9F0A1B2C
GET /api/magnets/infohash/urn:btih:3B4C5D6E7F8A9B0C1D2E3F4A5B6C7D8E9F0A1B2CExample Response 200 OK
{
"data": {
"sqid": "a1B2c3D4",
"name": "Ubuntu 22.04.3 LTS Desktop amd64",
"info_hash": "3B4C5D6E7F8A9B0C1D2E3F4A5B6C7D8E9F0A1B2C",
"size": 1580945408,
"human_size": "1.47 GB",
"score": 0.92,
"health": 0.85,
"number_of_pieces": 3008,
"piece_length": 524288,
"creator": "mktorrent/1.1",
"creation_date": "2023-08-11T00:00:00+00:00",
"is_private": false,
"is_verified": true,
"is_active": true,
"magnet_link": "magnet:?xt=urn:btih:3B4C5D...&dn=Ubuntu+22.04...",
"web_url": "https://magnetz.eu/magnet/a1B2c3D4",
"release": {
"type": "software",
"resolution": null,
"format": "ISO"
},
"trackers": [
"udp://tracker.opentrackr.org:1337/announce",
"udp://open.tracker.cl:1337/announce"
],
"files": [
{
"path": "ubuntu-22.04.3-desktop-amd64.iso",
"size": 1580945408,
"human_size": "1.47 GB"
}
]
}
}Error Responses
| Status | error | Cause |
|---|---|---|
| 422 | invalid_infohash_format | Not a valid 40-character hex string |
| 404 | magnet_not_found | No active magnet with that info hash |
/rssRSS 2.0 feed of the 100 most recently added active magnets. Cached for 60
seconds. Returns application/rss+xml.
Example Request
GET /rssField Reference
| Field | Type | Description |
|---|---|---|
sqid | string | Short URL-safe identifier for this magnet |
info_hash | string | 40-character uppercase hex SHA-1 hash |
size | integer | Total size in bytes |
human_size | string | Human-readable size, e.g. 1.47 GB |
score | float 0–1 | Normalised quality score derived from file count and naming |
health | float 0–1 | Normalised swarm health based on seeder/leecher ratio |
is_verified | boolean | Trusted/verified source flag |
largest_file | string|null | Path of the largest file inside the torrent (search results only) |
magnet_link | string | Full magnet: URI including trackers (detail only) |
release | object | Parsed metadata: type, resolution, format, etc.
(detail only) |
trackers | string[] | Announce URLs (detail only) |
files | object[] | File list sorted by size descending (detail only) |
Error Response Shape
All error responses use the same envelope:
{
"message": "Human-readable description of the error.",
"error": "machine_readable_error_code"
}