Torrentgalaxy Api - Instant
TorrentGalaxy does not provide a public, official API for general developers. Instead, the community relies on unofficial scraping APIs, RSS feeds, and specialized indexer managers to programmatically access its database of verified movies, TV shows, and games. Popular Unofficial APIs
Because no official documentation exists, developers often use open-source wrappers that scrape TorrentGalaxy's visual interface.
Torrents-Api (Node.js): A comprehensive scraper available on GitHub that provides structured data from TorrentGalaxy and multiple other trackers.
Unofficial Public Trackers API: Another Node.js implementation on GitHub that includes MongoDB support and methods for bypassing site protections like cookies.
Torrentgalaxy NPM Package: A lightweight JavaScript library found on NPM specifically designed to interact with the site's content. RSS Feeds vs. API Search Torrentgalaxy Api -
For basic automation, TorrentGalaxy offers RSS feeds, which are widely used in BitTorrent clients like qBittorrent or rTorrent.
Can't add RSS feeds due to 1 feed being glitch #1249 - GitHub
Sample Code: Quick Python Script
Want to see it in action? Here is a basic scraper for the current active API structure:
import requests
import json
6. Risks & Limitations
| Issue | Severity | Details |
| :--- | :--- | :--- |
| No Official API | High | Endpoints change without notice, breaking clients. |
| Cloudflare Protection | Critical | TGx uses DDoS-Guard / Cloudflare. Direct API calls without browser fingerprinting get 403/1020 errors. |
| CAPTCHA Interstitial | High | After ~50 requests, a CAPTCHA page blocks scrapers. |
| IP Bans | Medium | Temporary ban (1-24 hours) for aggressive polling. |
| Fake/Malicious Torrents | Low-Medium | No API validation; standard for public trackers. | TorrentGalaxy does not provide a public, official API
Part 6: Alternative Torrent APIs (When TGx Fails)
Torrentgalaxy is reliable, but not infallible. If the site is down or you cannot get an API response, here are fallback indexers with better (actual) API support:
| Indexer | API Type | Ease of Use | Reliability |
| :--- | :--- | :--- | :--- |
| 1337x | Unofficial (via Jackett) | Moderate | High |
| Nyaa.si (Anime) | Official REST API (/api) | Very Easy | Excellent |
| SolidTorrents | Open API (Torrents JSON) | Easy | Low (Low seeds) |
| BT4G | REST API | Easy | Moderate |
| Knaben (Meta-search) | Official API (requires key) | Moderate | High |
For Linux ISOs and open-source software, use Legit Torrents or Linuxtracker, which often provide direct RSS feeds (a form of API).
3. DOM Parsing
Unlike an API that returns JSON, TGx returns messy HTML. You need to parse torrent tables, extract magnet links from inside onclick attributes, and decode encoded titles. Sample Code: Quick Python Script
Want to see it in action
- Solution: Use
BeautifulSoup (Python) or Cheerio (Node.js). You will spend 80% of your time fixing broken selectors every time TGx updates its theme.
4. Data Schema (Unofficial JSON via Scraping)
Since no native JSON exists, developers must parse the HTML. Typical extracted fields:
"id": "12345",
"name": "Ubuntu.22.04.ISO",
"size": "3.2 GB",
"seeders": 245,
"leechers": 12,
"uploader": "GalaxyUser",
"magnet": "magnet:?xt=urn:btih:...",
"category": "Software",
"timestamp": "2025-01-15 10:23:00"
1. The Search API (JSON)
This is the heavy lifter. You can send GET requests to fetch structured data.
- Endpoint:
/torrents-api.php
- Parameters:
search (keyword), category, limit, and page.
- Output: Clean JSON containing
torrent_id, name, size, seeders, leechers, and the all-important magnet link.
1. Executive Summary
TorrentGalaxy (TGx) is a prominent public torrent indexer. Unlike its predecessor (ExtraTorrent) or competitor (RARBG), TGx does not maintain a robust, documented, public REST API. However, a semi-functional unofficial API exists, primarily reverse-engineered from its web interface and RSS feeds. This report outlines the current state of the TGx API, its endpoints, limitations, and the risks involved.