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
찾으시는 영화나 TV 프로그램이 없나요? 로그인 하셔서 직접 만들어주세요.
이 항목을 평가하거나 목록에 추가할까요?
회원이 아닌가요?
robbie3999님의 댓글
10월 4, 2023 at 1:36 오후
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.
al-ell님의 댓글
10월 5, 2023 at 5:20 오전
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
ticao2 🇧🇷 pt-BR님의 댓글
10월 5, 2023 at 8:17 오전
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.
al-ell님의 댓글
10월 5, 2023 at 11:15 오전
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.