DEV Community

How to Use the TMDB API to Find Films with the Highest Revenue

Monica Powell on November 26, 2017

Get Out has been one of the most talked about films in 2017 and as of April 2017 the highest grossing debut film based on an original screenplay ...
Collapse
 
jeffpollet profile image
Solidarity&Resist

This is so great, and exactly what I was looking for to start playing with tmdb's api, thank you! I am a newbie, but I think I found one little error. You import pandas as pd, but later do df = pandas.DataFrame(columns=columns), which should be pd.DataFrame(columns=columns).

Thanks again!

Collapse
 
mlinardy profile image
mlinardy

Hi @m0nica ,

Thanks for writing this tutorial. I am learning Python and your tutorial helps a lot!

Just a question on this bit of code please:

film_revenue = requests.get('api.themoviedb.org/3/movie/'+ str(film['id']) +'?api_key='+ api_key+'&language=en-US')

how did you know the format of the API link for revenue (the link inside requests.get)? Is there a specific documentation I can follow?

Thanks,
Marvin

Collapse
 
m0nica profile image
Monica Powell

I followed the documentation at developers.themoviedb.org/3/gettin.... I'd recommend starting there to get a better sense of what the TMDB API supports and how API requests should be formatted.