Search & Query For Details
Learn how to search and query for a movie.
A common workflow on TMDB involves searching for a movie (or TV show, or person) and then retrieving its details.
Here’s a quick overview of how that process works:
1. Search
To begin, you’ll query for a movie, TV show, or person using the search methods.
We’ll use Jack Reacher
and the movie endpoint for this example:
This request returns an object, but the key you’ll want to focus on is the results
array.
The results
array contains standard movie list objects. Here’s an example of the first item:
2. Query for Movie Details
With the item above in hand, you can see an id: 75780
this represent a movie ID. You can use this id
to fetch for the movie detail like this:
This request returns all the main movie detail, as outlined in the movie details documentation.
For more efficiency, check out the append to response feature, which allows you to make multiple sub-requests in one. For example, to get videos along with movie details:
This helps streamline your queries and reduce the number of API calls.