BTN API

BTN API v1

24 methods over a single JSON-RPC endpoint.

Calling the API

Every method is a POST of a single JSON envelope to https://api.broadcasthe.net/. The method name is in the body, not the URL.

POST https://api.broadcasthe.net/
Content-Type: application/json

{"id": 1, "method": "getChangelog", "params": {}}

This is JSON-RPC 1.0-shaped rather than 2.0: there is no jsonrpc field, and id must be present and non-empty. An empty or absent id is treated as a notification, and the server returns an empty 200 with no body — including when the request was malformed, so a client that omits id cannot tell success from a parse failure.

Try it without a key. getChangelog takes no API key and is not IP-gated, so it works before you have credentials.

Authorisation

Authenticated methods take your API key as the key parameter. There is no header form.

Keys are also bound to source IPs. A call from an address the tracker has not seen before is rejected with -32004 and the address is recorded for approval — it is not accepted and audited later. This is the failure almost every new integration hits first, and it means a working key can still fail from a new host:

MessageWhat happened
IP address needs authorization — please check your notices on BTNThe address is unrecognised. It has been logged as pending; approve it from your notices on the site, then retry.
Unauthorized IP addressThe address is known and explicitly denied. Approving it is a site-side change.

Errors

An error response carries result: null alongside error, which JSON-RPC 2.0 forbids. Test for the presence of the error key; do not test whether result is falsy.

CodeMeaning
-32001Invalid API key
-32002Call limit exceeded
-32003User account disabled
-32004IP needs authorisation, or is explicitly denied
-32005HTTPS required — rejected before dispatch
-32601No such method
1002Series not found
0Everything else

0 is not a catch-all by design — several call sites raise an error without assigning a code, and those surface as 0 with a descriptive message. Treat the message as the signal there, and do not switch on 0.

Types

Numbers come back as strings. The database connection stringifies every scalar it fetches, so Upload, Snatches, ClassLevel and friends are "12345", not 12345. The schema records this honestly: a field shown as string (numeric) is a JSON string that always holds a number. Parse it rather than assuming a type.

Methods

Blog

getBlogGet the 5 latest blog posts
getBlogByIdGet a single blog post by ID

Forums

getForumsIndexGet the forum index
getForumsPageGet the threads in a forum

Inbox

getInboxGet a list of recent PMs for the user
getInboxConversationGet a conversation by IDMutating
sendInboxConversationReply to a conversation by IDMutating

Meta

getChangelogReturns the API changelog

News

getNewsGet the 5 latest news posts
getNewsByIdGet a single news post by ID

Series & Schedule

getNewSeriesGet the list of new series from the past month
getScheduleGet the television scheduleDeprecated
getSeriesByIdLook up a series by its ID

TV News

getTVNewsGet the 5 latest TV news posts
getTVNewsByIdGet a single TV news post by ID

Torrents

getTorrentByIdLook up a torrent by its ID
getTorrentsSearch for torrents
getTorrentsBrowseGet the torrents browse pageDeprecated
getTorrentsSearchGet the torrents search pageDeprecated
getTorrentsUrlGet a torrent's download link

User

getUserSnatchlistGet a user's HnR list
getUserStatsGet site-wide account statistics by class
getUserSubscriptionsGet a user's forum subscriptions
userInfoReturns basic information about the user calling this method