Axuda de The Movie Database

Hi, I am using movie/now_playing to get list of movies. In api response I am getting an array of genre ids. How can i get genre names corresponding to those ids. Why is the api sending ids instead of names?

Also, there are no attributes corresponding to cast in the response. Is there any way i can get this?

11 respostas (na páxina 1 de 1)

Jump to last post

Hi harsimran8,

genre_ids are passed in so the responses are lighter and not subject to translations, this keeping it all around quicker and simpler. Most people would have already integrated our genres and probably already have access to those objects in their app. The list of genres can be found here.

We do not return any other fields in any of our "featured list" methods. There is no way to get extra fields aside from making the call to the root item.

Cheers.

Hey, Travis

Thanks for the reply and making it clear. After digging some more into your api docs, i found all the methods that I need. Great job on the api by the way.

Hi, Can You please post the updated link of the genre name for every corresponding genre ids. Previous link is not working

The method you're looking for is this one here.

Cheers.

thanks man. appreciate it :)

but can't understand how to get genre names for a particular movie. what we have to pass in the path to get genre names corresponding to their ids

@jagmeet13 With the master list of genres in hand you can then map the results of a movie. ID 28 is "Action" for example.

But how can I fetch movies by genreId ? fe i have genreId 28, which is Action, so I want to fetch all corresponding movies. Thanks

Discover would be the best way:

https://api.themoviedb.org/3/discover/movie?api_key=###&with_genres=28

Take a look at the documentation, there's over 25 filters and sort options.

Hi, I don't understand how to get the actual genre names to parse from the genre_ids (I'm using jQuery). I'm currently listing the movies now playing with posters and I want to put their genres with, but I get the ids rather than the names ( 'action' for example). I'm quite a newbie at this, so any help appreciated.

As your problem is figuring out how to program using JQuerry, I think you might not find help here in this forum.

First, visit this page and see if any of the links can help you.
https://www.themoviedb.org/documentation/api/wrappers-libraries
Another possibility is to search on https://stackoverflow.com

Non podes atopar unha película ou serie? Inicia sesión para creala.

Global

s amosar a barra de procura
p abrir menú do perfil
esc pechar e abrir xanela
? abrir xanela de atallos do teclado

En páxinas de medios

b atrás (ou á principal se aplica)
e ir a editar páxina

En páxinas de tempadas de televisión

(flecha dereita) ir á tempada seguinte
(flecha esquerda) ir á tempada anterior

En páxinas de episodios de televisión

(flecha dereita) ir ao episodio seguinte
(flecha esquerda) ir ao episodio anterior

En todas as páxinas de imaxe

a abrir a xanela de engadir imaxe

En todas as páxinas de edición

t abrir selector de traducións
ctrl+ s enviar formulario

Nas páxinas de debate

n crear un novo debate
w amosar o estado do seguimento
p mudar público/privado
c mudar abrir/pechar
a abrir actividade
r responder no debate
l ir á última resposta
ctrl+ enter eviar a túa mensaxe
(flecha dereita) páxina seguinte
(flecha esquerda) ir á páxina anterior

Configuración

Queres valorar ou engadir o elemento a unha listaxe?

Iniciar sesión