The Scraping API exposes everything you need to find torrents for your media items, select the right files, and start the download. You can run a quick manual scrape and get back a ranked list of streams, open a stateful session to hand-pick files from a specific magnet link, or trigger Riven’s full auto-scrape pipeline. All routes are prefixed withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/rivenmedia/riven/llms.txt
Use this file to discover all available pages before exploring further.
/api/v1/scrape and require a valid API key.
Stream model
Scrape results are returned as a dictionary ofinfohash → Stream objects:
SHA-1 hex digest of the torrent info dictionary.
The original release name string from the scraper source.
Cleaned title extracted by the RTN parser.
Full
ParsedData object from RTN containing resolution, audio, codecs, seasons, episodes, and more.RTN ranking score. Higher is better.
Levenshtein similarity ratio between the parsed title and the item’s canonical title. Range 0–1.
Whether the torrent is confirmed cached on the configured debrid service.
Scrape an item
GET /scrape
Retrieve a ranked list of torrent streams for a media item. Accepts an item identified by internal ID or any supported external ID. Passstream=true to receive results as a Server-Sent Event stream as each scraper finishes.
Internal database ID of the media item.
TMDB ID of the item. Requires
media_type=movie.TVDB ID of the item. Requires
media_type=tv.IMDb ID of the item (e.g.
tt0133093).movie or tv. Required when using tmdb_id or tvdb_id.Override the item title used for scraping. Changes are not persisted to the database.
Override the IMDb ID used for scraping. Changes are not persisted.
JSON-encoded ranking override object. Example:
{"resolutions": ["1080p", "2160p"]}.When
true, results are sent as SSE events (text/event-stream) as each scraper completes rather than waiting for all scrapers to finish.Minimum file size in MB. Overrides the configured global minimum.
Maximum file size in MB. Overrides the configured global maximum.
SSE streaming events (stream=true)
When stream=true the response is text/event-stream. Each data: line is a JSON-encoded ScrapeStreamEvent:
Event type. One of:
start, progress, streams, complete, error.Name of the scraper service that produced this event (e.g.
Torrentio). null for start/complete events.Human-readable status message.
Dictionary of new
infohash → Stream pairs found by this service. Present on streams and complete events.Running total of unique streams found so far.
Number of scraper services that have finished.
Total number of scraper services being queried.
Manual scraping sessions
A scraping session lets you add a torrent manually using its magnet link. The workflow is:- Start session — validate the magnet, probe the torrent files, get a
session_id. - Select files — tell the debrid service which file IDs to download.
- Update attributes — map selected files to specific episodes (TV shows).
- Complete session — finalize and trigger Riven’s download pipeline.
POST /scrape/start_session
Start a manual scraping session for a specific magnet link. Validates that the torrent is cached on the debrid service and returns a parsed list of files.Full magnet URI including the
xt=urn:btih: component.Internal database ID of the target item.
TMDB ID (use with
media_type=movie).TVDB ID (use with
media_type=tv).IMDb ID.
movie or tv.Minimum file size in MB.
Maximum file size in MB.
UUID identifying this session. Required for all subsequent session actions.
Database ID of the associated item.
Debrid service torrent ID.
Full torrent metadata from the debrid service.
ISO 8601 datetime when the session expires (5 minutes from creation).
POST /scrape/session/
Perform an action on an active scraping session.Session UUID returned by
POST /scrape/start_session.One of:
select_files, update_attributes, abort, complete.Required for
select_files. A map of file_id → DebridFile entries to select for download.Required for
update_attributes. Either a single DebridFile (movie) or a ShowFileData season→episode→file map (TV).Auto scrape
POST /scrape/auto
Trigger Riven’s full automatic scrape-and-download pipeline for an item. For TV shows you can optionally restrict scraping to specific season numbers. Request bodymovie or tv.Internal database ID.
TMDB ID (movies).
TVDB ID (TV shows).
IMDb ID.
For TV shows only. If provided, only these seasons are scraped; all others are paused.
Override ranking preferences for this scrape. Example:
{"resolutions": ["2160p"]}.Minimum file size in MB.
Maximum file size in MB.
Parse torrent titles
POST /scrape/parse
Parse an array of raw torrent title strings using the PTT/RTN parser. Returns structured metadata for each title. Request body A JSON array of strings:Overseerr requests
POST /scrape/overseerr/requests
Fetch pending requests from Overseerr and add any that are not already in the Riven database to the processing queue.Overseerr request status filter. One of:
all, approved, available, pending, processing, unavailable, failed, deleted, completed.Maximum number of requests to fetch from Overseerr.
412 if the Overseerr service is not enabled or not initialized.