Skip to main content

Search

Endpoints for searching releases across configured indexers.

Authentication​

All search endpoints require authentication.

EndpointAuth Level
GET /api/searchrequireAuth
POST /api/download/grabrequireAuth

Search releases​

Performs a multi-indexer search for releases matching the query parameters.

GET /api/search

Request parameters​

ParameterTypeRequiredDescription
querystringNoSearch query string
typestringNoMedia type (movie, tv)
tmdbIdintegerNoTMDB ID to search for
tvdbIdintegerNoTVDB ID for TV shows
seriesIdstringNoSeries UUID to search for
movieIdstringNoMovie UUID to search for
seasonNumberintegerNoSeason number (TV only)
episodeNumberintegerNoEpisode number (TV only)
indexersstringNoComma-separated indexer IDs
categoriesstringNoComma-separated category IDs
minSeedersintegerNoMinimum seeders (torrent)
maxAgeintegerNoMaximum age in days
limitintegerNoMaximum results (default: 100)

Query types​

TypeRequired parametersDescription
manualqueryFree-form search
moviemovieId or tmdbIdSearch for specific movie
tvseriesId or tmdbIdSearch for TV shows
episodeseriesId, seasonNumber, episodeNumberSearch specific episode

Response codes​

CodeDescription
200Success
400Invalid parameters
401Authentication required
404Movie/series not found

Response schema​

{
"releases": [
{
"guid": "string",
"title": "string",
"size": "integer",
"indexer": "string",
"indexerId": "string",
"publishDate": "string",
"downloadUrl": "string",
"infoUrl": "string",
"category": ["string"],
"seeders": "integer",
"leechers": "integer",
"protocol": "string",
"quality": {
"quality": "string",
"resolution": "string",
"source": "string",
"modifier": "string"
},
"qualityScore": "integer",
"customFormatScore": "integer",
"rejections": ["string"],
"approved": "boolean",
"releaseGroup": "string",
"language": "string",
"mappedMovie": {
"id": "string",
"title": "string",
"year": "integer"
},
"mappedSeries": {
"id": "string",
"title": "string"
},
"mappedEpisode": {
"seasonNumber": "integer",
"episodeNumber": "integer"
}
}
],
"indexerResults": [
{
"indexerId": "string",
"indexerName": "string",
"resultCount": "integer",
"status": "string",
"errorMessage": "string"
}
],
"totalResults": "integer",
"searchDuration": "number",
"searchTime": "string"
}

Release quality fields​

FieldDescriptionValues
qualityQuality nameBluray-1080p, WEBDL-720p, HDTV-1080p, etc.
resolutionVideo resolution480p, 720p, 1080p, 2160p
sourceMedia sourceBluray, WEB, HDTV, DVD
modifierQuality modifierREMUX, x265, HDR, DV

Rejection reasons​

ReasonDescription
Unknown movieCannot map to library movie
Unknown seriesCannot map to library series
Unknown episodeCannot map to specific episode
Release rejectedDoes not meet quality requirements
Custom format cut-off unmetBelow custom format score threshold
Release is blacklistedIn blacklist

Example request​

curl -H "x-api-key: cinephage_your_key_here" \
"http://localhost:3000/api/search?movieId=550e8400-e29b-41d4-a716-446655440000&limit=10"

Example response​

{
"releases": [
{
"guid": "Indexer1-12345",
"title": "Inception.2010.1080p.BluRay.x264-Group",
"size": 10485760000,
"indexer": "Indexer1",
"indexerId": "a10e8400-e29b-41d4-a716-446655440010",
"publishDate": "2024-01-15T08:00:00Z",
"downloadUrl": "https://example.com/download/12345",
"infoUrl": "https://example.com/details/12345",
"category": ["Movies", "HD"],
"seeders": 150,
"leechers": 12,
"protocol": "torrent",
"quality": {
"quality": "Bluray-1080p",
"resolution": "1080p",
"source": "Bluray",
"modifier": "x264"
},
"qualityScore": 100,
"customFormatScore": 1500,
"rejections": [],
"approved": true,
"releaseGroup": "Group",
"language": "English",
"mappedMovie": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Inception",
"year": 2010
}
}
],
"indexerResults": [
{
"indexerId": "a10e8400-e29b-41d4-a716-446655440010",
"indexerName": "Indexer1",
"resultCount": 15,
"status": "success",
"errorMessage": null
}
],
"totalResults": 15,
"searchDuration": 2.345,
"searchTime": "2024-01-15T10:30:00Z"
}

Grab release​

Downloads a specific release to the download client.

POST /api/download/grab

Request body schema​

FieldTypeRequiredDescription
guidstringYesRelease GUID from search
indexerIdstringYesIndexer ID
movieIdstringNoMovie UUID (for movies)
seriesIdstringNoSeries UUID (for TV)
seasonNumberintegerNoSeason number (TV)
episodeIdsarrayNoEpisode UUIDs (TV)

Response codes​

CodeDescription
201Grab successful
400Invalid request
401Authentication required
404Release or media not found
409Release already grabbed

Response schema​

{
"success": "boolean",
"downloadId": "string",
"queueId": "string",
"title": "string",
"message": "string"
}

Example request​

curl -X POST \
-H "Content-Type: application/json" \
-H "x-api-key: cinephage_your_key_here" \
-d '{
"guid": "Indexer1-12345",
"indexerId": "a10e8400-e29b-41d4-a716-446655440010",
"movieId": "550e8400-e29b-41d4-a716-446655440000"
}' \
http://localhost:3000/api/download/grab

Example response​

{
"success": true,
"downloadId": "dl_550e8400-e29b-41d4-a716-446655440020",
"queueId": "q_550e8400-e29b-41d4-a716-446655440021",
"title": "Inception.2010.1080p.BluRay.x264-Group",
"message": "Release sent to download client"
}

Scoring and ranking​

Quality score​

Quality scores range from 0 to 100, with higher values indicating better quality.

QualityScore
Bluray-2160p100
WEBDL-2160p90
Bluray-1080p80
WEBDL-1080p70
HDTV-1080p60
Bluray-720p50
WEBDL-720p40
HDTV-720p30
DVD20
SDTV10

Custom format score​

Custom format scores are calculated based on matching conditions:

FieldDescription
customFormatScoreTotal score from all matching Custom Formats
rejectionsReasons if score is below cutoff

Release approval​

A release is approved when:

  • It maps to a library movie/episode
  • It meets quality requirements
  • It meets custom format score cutoff
  • It is not blacklisted

Search providers​

Cinephage supports searching across multiple indexer types:

TypeProtocolsDescription
UsenetNZBNewznab-compatible indexers
TorrentMagnet, Torrent fileTorznab and RSS indexers
Live TVM3ULive TV sources

See Also​

  • Movies - Movie library endpoints
  • TV - TV shows and episode endpoints
  • Download - Queue and download management