Reputation: 1476
I could get popular, now playing movies from TMDB. I wanna get the Horror movies. If there are any API URL and solution, let me know, please
https://api.themoviedb.org/3/movie/popular
https://api.themoviedb.org/3/movie/now_playing
https://api.themoviedb.org/3/genre/movie/list
I got popular movies like this
$popularMovies = Http::withToken(config('services.tmdb.token'))
->get('https://api.themoviedb.org/3/movie/popular')
->json()['results'];
Upvotes: 3
Views: 8151
Reputation: 1
try this: https://api.themoviedb.org/3/search/movie?api_key=&language=en-US&query=horror&page=1&include_adult=false
Upvotes: 0
Reputation: 830
One can also try these steps
To get list of genres-
https://api.themoviedb.org/3/genre/movie/list
To get movies for a particular genre
https://api.themoviedb.org/3/list/{GENRE_ID}
Ex - https://api.themoviedb.org/3/list/27
since, 27 is the genre id for Horror
Upvotes: 4
Reputation: 15936
Try using the API to search by genre (ID number).
As you can see from the link below, Horror films are classed under genre 27:
https://www.themoviedb.org/genre/27-horror/movie
So maybe you can try:
https://api.themoviedb.org/27/movie/horror
Or else:
https://api.themoviedb.org/3/discover/movie?api_key=XXXXX&with_genres=27
Upvotes: 4