Suport de The Movie Database

Hi,

I'm working on a project where I am attempting to only return family friendly films. I have successfully managed this using the discover and genre features of the API but I am unable to get it working for the search feature. When I attempt to search I am getting films that are not part of that genre (or shouldn't be)

Here's the url I am using: 'https://api.themoviedb.org/3/search/movie?certification_country=US&certification.lte=G&with_genres=10751&include_adult=false&sort_by=popularity.desc&api_key=API_KEY'

Any advice would be helpful, I'm quite new to this!

Thank you

Alice

4 resposta (a les p脿gines 1 de 1)

Jump to last post

Hi @al-ell, search movie doesn't have the same filters as discover movie. Genre is not a valid filter so it is being ignored in the query you are using.

Hi @robbie3999, thank you for letting me know. Does search movie take any other parameters like certification?

I found this discussion with some info on filtering a search using discover. I think I've answered my own question!

https://www.themoviedb.org/talk/6441194ffcec2e0439d8d361

I believe that @al-ell didn't even intend to use search. After all, I don't even see a query.
So just swap search for discover in the Request and everything will work perfectly.

https://api.themoviedb.org/3/search/movie?certification_country=US&certification.lte=G&with_genres=10751&include_adult=false&sort_by=popularity.desc&api_key=API_KEY

https://api.themoviedb.org/3/discover/movie?certification_country=US&certification.lte=G&with_genres=10751&include_adult=false&sort_by=popularity.desc&api_key=THE_KEY

I'm specifically trying to make a search function. Unfortunately the filter I want to use isn't compatible. The way I have worked around this is to use "&with_text_query=" with discover.

No trobeu una pel路l铆cula o una s猫rie? Inicieu la sessi贸 per a crear-la.

Global

s centra la barra de cerca
p obre el men煤 del perfil
esc tanca una finestra oberta
? obre la finestra de dreceres de teclat

A les p脿gines de materials

b torna enrere (o la superior quan sigui aplicable)
e ves a la p脿gina d鈥檈dici贸

A les p脿gines de temporades

(fletxa dreta) ves a la temporada seg眉ent
(fletxa esquerra) ves a la temporada anterior

A les p脿gines d'episodis

(fletxa dreta) ves a l'episodi seg眉ent
(fletxa esquerra) ves a l'episodi anterior

A totes les p脿gines d'imatges

a obre la finestra d'afegir imatges

A totes les p脿gines d'edici贸

t obre el selector de traducci贸
ctrl+ s envia el formulari

A les p脿gines de debat

n crea un debat nou
w canvia l'estat de visualitzaci贸
p canvia p煤blic/privat
c tanca o obre
a obre activitat
r resposta al debat
l ves a la darrera resposta
ctrl+ enter envieu el vostre missatge
(fletxa dreta) p脿gina seg眉ent
(fletxa esquerra) p脿gina anterior

Configuracions

Desitgeu valorar o afegir aquest element a una llista?

Inicieu la sessi贸