🍿 @lorenzopant/tmdb

Movie

Get the list of official genres for movies.

Returns the list of official genres used to categorize movies on TMDB.

async movie_list(params?: WithLanguage): Promise<GenresResponse>

TMDB Reference: Genre Movie List

Parameters

NameTypeRequiredDescription
languageLanguageLanguage for localized genre names. Defaults to en-US.

Returns

A GenresResponse object containing an array of Genre objects.

Example

import { TMDB } from "@lorenzopant/tmdb";

const tmdb = new TMDB("your-api-key");
const { genres } = await tmdb.genres.movie_list();

console.log(genres);
// [
//   { id: 28, name: "Action" },
//   { id: 12, name: "Adventure" },
//   { id: 16, name: "Animation" },
//   ...
// ]

// With a language override
const { genres: italianGenres } = await tmdb.genres.movie_list({ language: "it-IT" });
// [
//   { id: 28, name: "Azione" },
//   { id: 12, name: "Avventura" },
//   ...
// ]

Types

On this page