Skip to content

Latest commit

 

History

History
123 lines (95 loc) · 6.67 KB

tmdbsearch.md

File metadata and controls

123 lines (95 loc) · 6.67 KB

Search Movies Or Tv Shows By Query Text

Search movies or tv shows by query text.

URL : /api/tmdbsearch/type/{type}/lang/{lang}/page/{page}/text/{text}

Method : GET

Query Parameters :

Parameter Type Description
type string Switch between searching movies or tv shows.
lang string ISO 639-1 two-letter language code.
page integer Specify the page of results to query.
text string Text query to search. Space characters must be replaced with minus or non-breaking space characters. This value should be URI encoded.

Accepted Values [ type ] :

Value Description
movie Discover movies.
tv Discover tv shows.

Success Response

Code : 200 OK

Main Object :

Name Type Description
success bool Indicates whether the query was successful.
results array[object] Contains the complete TMDB API response.

Object [ results ] :

Name Type Description
page integer Current page number.
total_results integer Total number of movies or tv shows.
total_pages integer Total number of ages.
results array[object] Array of movie or tv show objects.

Object [ results ] :

Movie results TV Show results
NameType
poster_pathstring or null
adultbool
overviewstring
release_datestring
genre_idsarray[integer]
idinteger
original_titlestring
original_languagestring
titlestring
backdrop_pathstring or null
popularitynumber
vote_countinteger
videobool
vote_averagenumber
NameType
poster_pathstring or null
popularitynumber
idinteger
backdrop_pathstring or null
vote_averagenumber
overviewstring
first_air_datestring
origin_countryarray[string]
genre_idsarray[integer]
original_languagestring
vote_countinteger
namestring
original_namestring
  

Decode Table [ genre_ids ] :

Movie genre_ids TV Show genre_ids
ValueGenre
28Action
12Adventure
16Animation
35Comedy
80Crime
99Documentary
18Drama
10751Family
14Fantasy
36History
27Horror
10402Music
9648Mystery
10749Romance
878Sci-fi
53Thriller
10752War
37Western
ValueGenre
10759Action & Adventure
16Animation
35Comedy
80Crime
99Documentary
18Drama
10751Family
10762Kids
9648Mystery
10763News
10764Reality
10765Sci-fi & Fantasy
10766Soap
10767Talk
10768War & Politics
37Western
  
  

Error Response

Code : 404 (Not Found)

Main Object :

Name Type Description
success bool Indicates whether the query was successful.
message string Text message that describes the response.

Examples

Request :

GET http://localhost:9000/api/tmdbsearch/type/tv/lang/en/page/1/text/raised-by-wolves

Success Response :

{
    "success": true,
    "results": [{
        "page": 1,
        "total_results": 2,
        "total_pages": 1,
        "results": [{
            "original_name": "Raised by Wolves",
            "genre_ids": [10765, 18],
            "name": "Raised by Wolves",
            "popularity": 168.868,
            "origin_country": ["US"],
            "vote_count": 433,
            "first_air_date": "2020-09-03",
            "backdrop_path": "\/na2xUduK8HviOFT97TiFG2MkJmY.jpg",
            "original_language": "en",
            "id": 85723,
            "vote_average": 7.7,
            "overview": "After Earth is ravaged by a great religious war, an atheistic android architect sends two of his creations, Mother and Father, to start a peaceful, godless colony on the planet Kepler-22b. Their treacherous task is jeopardized by the arrival of the Mithraic, a deeply devout religious order of surviving humans.",
            "poster_path": "\/mTvSVKMn2Npf6zvYNbGMJnYLtvp.jpg"
        }, {
            "original_name": "Raised by Wolves",
            "genre_ids": [35],
            "name": "Raised by Wolves",
            "popularity": 5.674,
            "origin_country": ["GB"],
            "vote_count": 8,
            "first_air_date": "2015-03-16",
            "backdrop_path": "\/cSA5pPdkEgFDWFcjdr4S2IohLXd.jpg",
            "original_language": "en",
            "id": 62160,
            "vote_average": 7.5,
            "overview": "Set on a Wolverhampton council estate, Raised By Wolves is modern day reimagining of the childhood of Caitlin Moran and her brothers and sisters.\n\nSingle-mum Della lives in a three bedroom council house with Germaine, Aretha, Yoko, Mariah, Wyatt and baby Cher. She is attempting to raise the children by herself, but does have visits from Grampy, who likes to come around to dispense his wisdom to his grandchildren.",
            "poster_path": "\/54ONCnoHQZdMnPZU90QN8ezjhS2.jpg"
        }]
    }]
}

Error Response :

{
    "success": false,
    "message": "No TMDB data found."
}