Person Details
Explore methods to retrieve personal details and credits for cast and crew members from the TMDB API. Learn to access individual movie credits, TV credits, and combined credits for a comprehensive view of a person's works in film and television.
In this lesson, we’ll focus on how to fetch two main things—details of a person in a TV show or a movie and all the credits for a person in either a TV show or a movie.
The details of a person
Like movies and TV shows, we can fetch the details for each person as well. We can use the person endpoint to get the basic information about any person. A person can be any cast or crew member of any movie or TV show. This endpoint takes in an integer path parameter person_id and returns the details of that person in a single JSON response.
Here is the base URL in focus:
https://api.themoviedb.org/3/person/{person_id}?api_key={ourTMDBapikey}
The input query parameters required by this endpoint are as follows:
Name | Type | Category | Description |
| string | optional | This is an |
| string | optional | This is used to append requests within the same namespace to the response. It follows the pattern ([\w]+). |
The objects in the output JSON response are as follows:
Object | Type | Category | Description |
| boolean | optional | This is the flag that shows whether or not the person is a part of adult content. |
| string or null | optional | This returns the date of birth of the person. |
| string | optional | This returns the department name for which the person is famous. For example, Matthew Perry is famous for acting. |
| null or string | optional | This returns the date of death of the person (only if applicable). |
| integer | optional | This is the ID associated with the person on TMDB (it's the same, we pass it as an input parameter). |
| string | optional | This is the original name of the person. |
| array[string] | optional | This returns all the names by which the person is commonly known. |
| integer | optional | This returns an integer representing the gender of the person. The value |
| string | optional | This returns a few lines or a short paragraph of text that presents a biography of the person. |
| number | optional | This is the popularity score of the person on TMDB. |
| string or null | optional | This returns the birthplace of the person. |
| string or null | optional | This returns the path to the profile picture of the person. |
| string | optional | This returns the IMDB ID (an external ID) associated with the person on IMDB. |
| null or string | optional | This returns the URL to the homepage of the person if any. |
The code widget below shows how the basic ...