Search People
Search for people by their name and also known as names.
tmdb.search.person(options: {
query: string;
page?: number;
language?: string;
include_adult?: boolean;
}): Promise<PaginatedResponse<PersonResultItem>>
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | ✅ | Search query text |
include_adult | boolean | ❌ | Whether to include adult content (default: false) |
language | string | ❌ | Language code (default: en-US) |
page | number | ❌ | Page number (default: 1) |
Reference
Example
const results = await tmdb.search.person({ query: "Brad Pitt" });
Response
{
"page": 1,
"results": [
{
"adult": false,
"gender": 2,
"id": 287,
"known_for_department": "Acting",
"name": "Brad Pitt",
"original_name": "Brad Pitt",
"popularity": 11.2917,
"profile_path": "/cckcYc2v0yh1tc9QjRelptcOBko.jpg",
"known_for": [
{
"adult": false,
"backdrop_path": "/hwNtEmmugU5Yd7hpfprNWI0DGIn.jpg",
"id": 16869,
"title": "Inglourious Basterds",
"original_title": "Inglourious Basterds",
"overview": "In Nazi-occupied France during World War II, a group of Jewish-American soldiers known as \"The Basterds\" are chosen specifically to spread fear throughout the Third Reich by scalping and brutally killing Nazis. The Basterds, lead by Lt. Aldo Raine soon cross paths with a French-Jewish teenage girl who runs a movie theater in Paris which is targeted by the soldiers.",
"poster_path": "/7sfbEnaARXDDhKm0CZ7D7uc2sbo.jpg",
"media_type": "movie",
"original_language": "en",
"genre_ids": [
18,
53,
10752
],
"popularity": 17.9182,
"release_date": "2009-08-02",
"video": false,
"vote_average": 8.216,
"vote_count": 23692
},
...
],
"total_pages": 1,
"total_results": 1
}
Types
export type PersonResultItem = {
adult: boolean;
gender: number;
id: number;
known_for_department: string;
name: string;
original_name: string;
popularity: number;
profile_path: string;
known_for: [MovieResultItem & { media_type: MediaType }];
};
export type MediaType = "movie" | "tv";
type PaginatedResponse<T> = {
page: number;
total_pages: number;
total_results: number;
results: T[];
};