Torrentgalaxy Api - «A-Z Top-Rated»
import requests
params = "q":"ubuntu", "page":1, "limit":10
r = requests.get("https://torrentgalaxy.to/api/search", params=params, timeout=10)
data = r.json()
for t in data:
print(t["name"], t.get("seeders"), t.get("magnet"))
Send more than 10 requests per minute from a single IP, and you will be temporarily blacklisted.
| Feature | Available? | Notes |
|---------|------------|-------|
| Search by query | ✅ Via RSS (limited) or scraping | RSS supports basic search, but not filters like category, size, seeds |
| Get torrent details | ✅ Scraping only | Title, size, files, magnet, uploader, comments |
| Categories (Movies, Games, etc.) | ✅ Via RSS category IDs | |
| Sort by seeds/date/size | ❌ Not in RSS, requires scraping | |
| Pagination | ✅ RSS has pagination via &page= | |
| Trending/recent torrents | ✅ RSS for latest uploads | |
| User uploads | ❌ No direct endpoint | |
| Login/upload via API | ❌ Not possible | |
Real example (RSS search):
https://torrentgalaxy.to/rss?search=avatar&category=1
Returns XML with title, link, size, seeds, category.
import requests from bs4 import BeautifulSoupdef search_tgx(query): url = f"https://torrentgalaxy.to/torrents.php?search=query" soup = BeautifulSoup(requests.get(url).text, "html.parser") results = [] for row in soup.select("div.tgxtablerow"): title = row.select_one("a.tgxtablecell") magnet = row.select_one("a[href^='magnet:']") if title and magnet: results.append( "title": title.text.strip(), "magnet": magnet["href"] ) return results Torrentgalaxy Api -
print(search_tgx("ubuntu")) # works until TGX changes HTML
Problem: If TGx changes CSS classes (tgxtablerow → tgx-row), code breaks. Send more than 10 requests per minute from
When users type Torrentgalaxy Api - into Google or GitHub, they are usually looking for one of three things:
Let’s address the solution for each of these.
TorrentGalaxy has been struggling financially and technically lately. They have experienced DDoS attacks and server migrations. Consequently, the API is not officially documented and has changed parameters several times in the last 12 months. but not filters like category
Here are the current limitations:
GET https://torrentgalaxy.to/torrent-details.php?id=12345
TGx often hides the magnet link behind a magnet:? link that is built via JavaScript. A simple HTML scraper won't get it. You need a headless browser (Selenium, Playwright) or reverse-engineer the JS function.
Verdict: Unless you are doing this for educational purposes, do not build your own TGx scraper. It is a waste of time. Use Jackett.