Collections
Search for collections by their original, translated and alternative names.
Search for collections by their original, translated, and alternative names.
async collections(params: SearchCollectionsParams): Promise<PaginatedResponse<CollectionResultItem>>TMDB Reference: Search Collection
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. |
region | CountryISO3166_1 | ❌ | ISO 3166-1 country code to filter results by region. |
Returns
A PaginatedResponse<CollectionResultItem> containing
an array of CollectionResultItem objects.
Example
import { TMDB } from "@lorenzopant/tmdb";
const tmdb = new TMDB("your-api-key");
const { results } = await tmdb.search.collections({ query: "The Dark Knight" });
console.log(results);
// [
// { id: 263, name: "The Dark Knight Collection", ... },
// ...
// ]