API Documentation
Access SolidTorrents's torrent database programmatically with our RESTful API
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.
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"
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
Authenticated (With API Key)
Maximum requests per day per user account (across all API keys)
Rate Limit Headers: All responses include rate limit information in headers:
X-RateLimit-Limit,
X-RateLimit-Remaining,
X-RateLimit-Reset
API Endpoints
/api/v1/search
Search for torrents with various filters and sorting options.
Query Parameters:
q
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
}
/api/v1/torrent/:id
Get detailed information about a specific torrent.
Parameters:
id
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
- Audio
category=1&subCategory=1 - Video
category=1&subCategory=2 - Image
category=1&subCategory=3 - Document
category=1&subCategory=4 - Program
category=1&subCategory=5 - Android
category=1&subCategory=6 - DiskImage
category=1&subCategory=7 - Source Code
category=1&subCategory=8 - Database
category=1&subCategory=9 - Archive
category=1&subCategory=11
2 Movies
- All Movies
category=2 - Dub/Dual Audio
category=2&subCategory=1
3 TV
- All TV Shows
category=3
4 Anime
- All Anime
category=4 - Dub/Dual Audio
category=4&subCategory=1 - Subbed
category=4&subCategory=2 - Raw
category=4&subCategory=3
5 Softwares
- All Software
category=5 - Windows
category=5&subCategory=1 - Mac
category=5&subCategory=2 - Android
category=5&subCategory=3
6 Games
- All Games
category=6 - PC
category=6&subCategory=1 - Mac
category=6&subCategory=2 - Linux
category=6&subCategory=3 - Android
category=6&subCategory=4
7 Music
- All Music
category=7 - MP3
category=7&subCategory=1 - Lossless
category=7&subCategory=2 - Album
category=7&subCategory=3 - Video
category=7&subCategory=4
8 AudioBook
- All AudioBooks
category=8
9 Ebook/Course
- All Ebooks/Courses
category=9
10 XXX
- Adult Content
category=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