Search Downloads
GET /v1/api/downloads/search
GET https://api.torbox.app/v1/api/downloads/search
- Operation ID:
search_downloads - Group: Downloads
- Auth: API key,
Authorization: Bearer <api key>(Sign in with TorBox gives the same key)
Overview
Searches the user's torrents, usenet downloads and web downloads by name and by file name, and returns the matches newest first. The items have the same fields and the same order as in Get Download List: each has download_type (torrent, usenet or webdl), and files defaults to false, so items leave out files and expires_at unless you send files=true. Nothing is cached, so results always show the current state of each download.
How the query matches
-
queryis split into words on whitespace. Every word must appear, in any order, and case is ignored. -
A word matches any part of the text, as a plain substring. Dots, dashes and underscores are ordinary characters, not word breaks, and
%and_match only themselves. -
An item matches when its name holds every word, or when the file name of one of its files holds every word.
-
Only the file's own name is searched, not its folder. Downloads with many files that are stored as a single zip only have that zip's name,
{name}.zip, to match. -
Hashes, links, paths and tags are not searched. Use
tagto narrow by tag. -
querymust have 1 to 200 characters after trimming spaces, and at most 10 different words. Otherwise, or whenqueryis missing, the response is a 422 in FastAPI's validation error format ({"detail": [...]}), not the usual response.
Filtering and paging
-
typecan be repeated, and keeps only those download types. -
cachedkeeps only cached (true) or uncached (false) items. -
tagcan be repeated (?tag=favorite&tag=important), and keeps items with at least one of the tags, ignoring case. -
Filters combine with the query by AND.
offsetandlimitthen page through the matches, and a response holds at mostlimititems. -
A value of the wrong type, such as
type=webdownloadorcached=maybe, returns a 422 response in FastAPI's validation error format.
Authorization
Requires an API key using the Authorization Bearer Header.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
offset | query | integer | no | Determines how many matching items to skip. Default is 0. Optional. |
limit | query | integer | no | Determines the number of items to receive per request. Default is 1000. Optional. |
files | query | boolean | no | Include each item's files and expires_at. Default is false, so the results leave them out unless you set files=true. Optional. |
query | query | string | yes | The words to find in the download's name or in one of its file names, ignoring case. Every word must appear. 1 to 200 characters and at most 10 words. Required. |
type | query | string[] | no | Searches only these download types, torrent, usenet or webdl. Repeat it for several types. Optional. |
cached | query | boolean | no | Shows only cached (true) or only uncached (false) downloads. Optional. |
tag | query | string[] | no | Shows only downloads with at least one of these tags, ignoring case. Repeat it for several tags. Optional. |
Responses
200Successful Response401Unauthorized403Forbidden404Not Found422Validation Error429Too Many Requests500Internal Server Error503Service Unavailable