Movies
Search for movies by their original, translated and alternative titles.
Search for movies by their original, translated, and alternative titles.
async movies(params: SearchMoviesParams): Promise<PaginatedResponse<MovieResultItem>>TMDB Reference: Search Movies
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | ✅ | Search query text. |
include_adult | boolean | ❌ | Include adult (18+) content in results. Defaults to false. |
language | Language | ❌ | Language for localized results. Defaults to en-US. |
page | number | ❌ | Page number for paginated results. Defaults to 1. |
primary_release_year | string | ❌ | Filter by primary release year (YYYY). |
region | CountryISO3166_1 | ❌ | ISO 3166-1 country code to filter results by region. |
year | string | ❌ | Filter by any release year (YYYY). |
Returns
A PaginatedResponse<MovieResultItem> containing
an array of MovieResultItem objects.
Example
import { TMDB } from "@lorenzopant/tmdb";
const tmdb = new TMDB("your-api-key");
const { results } = await tmdb.search.movies({ query: "Inception" });
console.log(results);
// [
// { id: 27205, title: "Inception", release_date: "2010-07-15", ... },
// ...
// ]
// With filters
const filtered = await tmdb.search.movies({
query: "Inception",
language: "it-IT",
region: "IT",
year: "2010",
});