Skip to content

API Documentation

A simple JSON API to search and retrieve torrent metadata. No authentication required. All endpoints return application/json.

Base URLhttps://magnetz.eu
Download OpenAPI 3.1 spec (openapi.yaml)
GET/api/magnets/search

Search magnets by keyword. Returns paginated results sorted by relevance, with ready-to-use magnet URIs plus swarm and timestamp metadata for each hit.

Parameters

NameTypeRequiredDescription
querystringYesSearch keyword (at least one non-whitespace character)
pageintegerNoPage number, defaults to 1. 25 results per page, max 100 total.

Example Request

GET /api/magnets/search?query=ubuntu+22.04&page=1

Example 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

StatuserrorCause
422invalid_queryQuery is empty or whitespace-only
503search_backend_unavailableSearch engine is temporarily unreachable
GET/api/magnets/{sqid}

Retrieve full details for a single magnet by its sqid, including all files and trackers.

Parameters

NameInRequiredDescription
sqidpathYesShort alphanumeric ID shown in the magnet's page URL

Example Request

GET /api/magnets/a1B2c3D4

Example 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

StatuserrorCause
404magnet_not_foundNo active magnet exists with that sqid
GET/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

NameInRequiredDescription
infohashpathYes40-character hex SHA-1 hash; optionally prefixed with urn:btih:

Example Requests

GET /api/magnets/infohash/3B4C5D6E7F8A9B0C1D2E3F4A5B6C7D8E9F0A1B2C
GET /api/magnets/infohash/urn:btih:3B4C5D6E7F8A9B0C1D2E3F4A5B6C7D8E9F0A1B2C

Example 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

StatuserrorCause
422invalid_infohash_formatNot a valid 40-character hex string
404magnet_not_foundNo active magnet with that info hash
GET/rss

RSS 2.0 feed of the 100 most recently added active magnets. Cached for 60 seconds. Returns application/rss+xml.

Example Request

GET /rss

Field Reference

FieldTypeDescription
sqidstringShort URL-safe identifier for this magnet
info_hashstring40-character uppercase hex SHA-1 hash
sizeintegerTotal size in bytes
human_sizestringHuman-readable size, e.g. 1.47 GB
scorefloat 0–1Normalised quality score derived from file count and naming
healthfloat 0–1Normalised swarm health based on seeder/leecher ratio
is_verifiedbooleanTrusted/verified source flag
largest_filestring|nullPath of the largest file inside the torrent (search results only)
magnet_linkstringFull magnet: URI including trackers (detail only)
releaseobjectParsed metadata: type, resolution, format, etc. (detail only)
trackersstring[]Announce URLs (detail only)
filesobject[]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"
}