I just discovered this API, after finding out netflix had shut theirs down, checking out imdb's API, and getting interested in imdb alternative. A search on StackOverflow led me here. Anyway, enough of that.
My first impression is that this API is more actively supported and thus infuses more confidence in me that it will be worth the investment of time to learn it. My big question is, are mpaa ratings part of the data returned? One scenario is that I will already have all the other data, but am only missing that piece of information. If such is the case, can I make a REST call (C#), passing an ID value (or movie title) and get back the mpaa rating (G, PG, PG-13)?
imdb's raw data only seems to have a flag indicating whether a movie is "adult" or not...
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by ticao2 š§š· pt-BR
on September 17, 2020 at 12:16 PM
With IMDB ID no. With TMDb ID yes.
Certification or Rating MPAA is linked to release_dates.
So, if what you want is just that data, you need to make an API Request of type get / movie / {movie_id} / release_dates .
See here: https://developers.themoviedb.org/3/movies/get-movie-release-dates
Example: https://api.themoviedb.org/3/movie/550/release_dates?api_key=THE_KEY
You will receive Certication from all countries.
Of course, as long as they have been added to TMDb.
Reply by bclayshannon
on September 17, 2020 at 12:36 PM
Thanks!
I see with the second example (which returns a "boatload" of data), that the piece I am interested in is this:
Specifically I want the ""US" ... certification":"R"" part of it. Is there a way to just get that back - the US-only info?
I have a second question, but I'll make it a separate one.
Reply by bclayshannon
on September 17, 2020 at 1:19 PM
What if I don't know the release date of a movie? Is there any way to retrieve its "certification" value (MPAA rating)?
Reply by ticao2 š§š· pt-BR
on September 18, 2020 at 8:16 PM
and
I do not think so. I do not know.
Only if requested using release_dates.
The API Request can be done in the specific way I showed you before:
https://api.themoviedb.org/3/movie/550/release_dates?api_key=THE_KEY
As can also be done using the append_to_response feature in a Basic Request.
See here https://developers.themoviedb.org/3/movies/get-movie-details
And here https://developers.themoviedb.org/3/getting-started/append-to-response
Example https://api.themoviedb.org/3/movie/550?api_key=THE_KEY&language=en-US&append_to_response=release_dates
Reply by ticao2 š§š· pt-BR
on September 18, 2020 at 8:31 PM
Every Certification is linked to a release_date.
Sometimes, the film is released in theaters, with stronger cut scenes,
to be able to have a lighter certification. For example: G or PG.
Then, the film is successful, they decide to launch a Bluray with the director's version,
longer and with those scenes that were cut, and will receive a heavier Certification. For example: PG-13
Reply by bclayshannon
on September 21, 2020 at 11:27 PM
Since I don't care about the release date, and I just want the U.S. MPAA Rating based on an imdb MovieId (tconst), am I right that the following will do the trick for me (it seems to):
[ "Blade Runner" example (tt0083658) ] https://api.themoviedb.org/3/movie/tt0083658/release_dates?api_key=MY_API_KEY
?
In other words, I don't think I need to get the release date first, as the release date is not passed as an arg to the REST call above
Reply by ticao2 š§š· pt-BR
on September 22, 2020 at 9:39 AM
Yes, if you just need the certification, just this Request, just like the one I put in my first comment.
Using the IMDB ID still works on that API Request.
But at any moment it can stop working.
The guarantee is to use the TMDb ID.
Reply by bclayshannon
on September 22, 2020 at 10:05 AM
Thanks, but this part is scary: "The guarantee is to use the TMDb ID."
I'll create a new question on how to get the TMDB Id using the imdb Id.