API Documentation

Access SolidTorrents's torrent database programmatically with our RESTful API

Free Tier
200 requests/day
No API key required
Authenticated
1,000 requests/day
Free account + API key

Quick Start

🎉 No API Key Required!

Start using the API immediately with 200 free requests per day without creating an account. For higher limits (1,000 requests/day), create a free account and generate an API key.

1

Option A: Use Free Tier (No Account Needed)

Make API requests directly without authentication. Limited to 200 requests per day per IP address.

curl "https://solidtorrents.eu/api/v1/search?q=ubuntu&limit=5"
2

Option B: Create Account for Higher Limits (Recommended)

Sign up for a free account to get 1,000 requests/day.

Authentication

Authentication is optional. You can use the API in two ways:

Free Tier

No authentication required

curl "https://solidtorrents.eu/api/v1/search?q=ubuntu"

✓ 200 requests per day per IP
✓ No signup required

Authenticated

Include your API key

curl -H "x-api-key: YOUR_API_KEY" \
     "https://solidtorrents.eu/api/v1/search?q=ubuntu"

✓ 1,000 requests per day
✓ Free account + API key

Rate Limits

Free Tier (No API Key)

Maximum requests per day from a single IP address

200

Authenticated (With API Key)

Maximum requests per day per user account (across all API keys)

1,000

Rate Limit Headers: All responses include rate limit information in headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

API Endpoints

GET /api/v1/search

Search for torrents with various filters and sorting options.

Query Parameters:

q
required

Search query string

category

Filter by category ID (optional, see Category IDs below)

subCategory

Filter by subcategory ID (optional, requires category parameter)

sort

Sort by: relevance, date, seeders, size, leechers (default: relevance)

order

Sort order: asc, desc (default: desc)

page

Page number (default: 1)

limit

Results per page, max 100 (default: 20)

Example Request:

curl -H "x-api-key: YOUR_API_KEY" \
     "https://solidtorrents.eu/api/v1/search?q=ubuntu&category=5&subCategory=2&sort=seeders&limit=10"

Example Response:

{
  "success": true,
  "query": "ubuntu",
  "results": [
    {
      "id": "507f1f77bcf86cd799439011",
      "infohash": "a1b2c3d4e5f6...",
      "title": "Ubuntu 22.04 LTS Desktop",
      "size": 3221225472,
      "category": "Software",
      "seeders": 1234,
      "leechers": 56,
      "verified": true,
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "perPage": 10,
    "total": 150,
    "totalPages": 15,
    "hasNext": true,
    "hasPrev": false
  },
  "took": 23
}

GET /api/v1/torrent/:id

Get detailed information about a specific torrent.

Parameters:

id
required

Torrent ID or infohash

Example Request:

curl -H "x-api-key: YOUR_API_KEY" \
     "https://solidtorrents.eu/api/v1/torrent/507f1f77bcf86cd799439011"

Example Response:

{
  "success": true,
  "torrent": {
    "id": "507f1f77bcf86cd799439011",
    "infohash": "a1b2c3d4e5f6...",
    "title": "Ubuntu 22.04 LTS Desktop",
    "size": 3221225472,
    "category": "Software",
    "tags": ["ubuntu", "linux", "os"],
    "verified": true,
    "swarm": {
      "seeders": 1234,
      "leechers": 56
    },
    "files": [
      {
        "path": "ubuntu-22.04-desktop-amd64.iso",
        "size": 3221225472
      }
    ],
    "trackers": ["udp://tracker.example.com:1337/announce"],
    "magnetUri": "magnet:?xt=urn:btih:...",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

Category & Subcategory IDs

Use these IDs when filtering search results by category and subcategory:

1 Other

  • Audiocategory=1&subCategory=1
  • Videocategory=1&subCategory=2
  • Imagecategory=1&subCategory=3
  • Documentcategory=1&subCategory=4
  • Programcategory=1&subCategory=5
  • Androidcategory=1&subCategory=6
  • DiskImagecategory=1&subCategory=7
  • Source Codecategory=1&subCategory=8
  • Databasecategory=1&subCategory=9
  • Archivecategory=1&subCategory=11

2 Movies

  • All Moviescategory=2
  • Dub/Dual Audiocategory=2&subCategory=1

3 TV

  • All TV Showscategory=3

4 Anime

  • All Animecategory=4
  • Dub/Dual Audiocategory=4&subCategory=1
  • Subbedcategory=4&subCategory=2
  • Rawcategory=4&subCategory=3

5 Softwares

  • All Softwarecategory=5
  • Windowscategory=5&subCategory=1
  • Maccategory=5&subCategory=2
  • Androidcategory=5&subCategory=3

6 Games

  • All Gamescategory=6
  • PCcategory=6&subCategory=1
  • Maccategory=6&subCategory=2
  • Linuxcategory=6&subCategory=3
  • Androidcategory=6&subCategory=4

7 Music

  • All Musiccategory=7
  • MP3category=7&subCategory=1
  • Losslesscategory=7&subCategory=2
  • Albumcategory=7&subCategory=3
  • Videocategory=7&subCategory=4

8 AudioBook

  • All AudioBookscategory=8

9 Ebook/Course

  • All Ebooks/Coursescategory=9

10 XXX

  • Adult Contentcategory=10

Example: To search for PC Games, use: ?q=minecraft&category=6&subCategory=1

Error Codes

400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing API key
403 Forbidden - API key deactivated
404 Not Found - Resource doesn't exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Something went wrong

Best Practices

  • Store your API key securely and never commit it to version control
  • Implement exponential backoff when rate limited (429 response)
  • Check rate limit headers to avoid hitting limits
  • Use pagination to retrieve large result sets efficiently
  • Cache responses when appropriate to reduce API calls
```