- Previous: API Overview
- Up: API Overview
- Next: API Homepage - v1.0.json
JSON API
JSON API Documentation Home
The tree view below gives a quick glance of the JSON API endpoints available. It has links to sample calls, sample responses and more detailed information on each API. Also, make sure to check out the Example Code section for some quick code to get you started.
- v1.0.json - The "homepage" of our API
- movies.json - Search for movies
- movie.json - info on an individual movie
- reviews.json - the reviews for an individual movie
- cast.json - the full cast for an individual movie
- similar.json - a list of movies similar to the individual movie
- clips.json - a list of clips related to an individual movie
- movie.json - info on an individual movie
- lists.json - overview of lists available
- movies.json - movies lists available
- box_office.json - a current list of box office movies
- upcoming.json - movies that are upcoming
- in_theaters.json - movies that are in theaters
- opening.json - movies that are opening this week
- dvds.json - dvd lists available
- top_rentals.json
- current_releases.json - dvds that are currently released
- new_releases.json - dvds that are getting released
- upcoming.json - dvds that are getting released
- movies.json - movies lists available
- movies.json - Search for movies
Not enough endpoints? Let us know in the forum. We also have a catalogue endpoint that allows complete access to all the movies we have available. If you need access to that, send us a line with your needs and circumstances.
JSONP Support
The API supports JSONP calls. Simply append a callback parameter with the name of your callback method at the end of the request. See the example below of a JSON call vs a JSONP call: http://api.rottentomatoes.com/api/public/v1.0.json?apikey=[your_api_key]
{"links": {
"lists": "http://api.rottentomatoes.com/api/public/v1.0/lists.json",
"movies": "http://api.rottentomatoes.com/api/public/v1.0/movies.json"
}}
http://api.rottentomatoes.com/api/public/v1.0.json?apikey=[your_api_key]&callback=mycallbackfn
mycallbackfn(
{"links": {
"lists": "http://api.rottentomatoes.com/api/public/v1.0/lists.json",
"movies": "http://api.rottentomatoes.com/api/public/v1.0/movies.json"
}}
)
Debugging
Here are some special parameters that can be used to help work with our API (we currently only have one):
- &_prettyprint=true
-
This prints out the response in an easier to read format. For example, instead of:
{"links":{"lists":"http://api.rottentomatoes.com/api/public/v1.0/lists.json","movies":"http://api.rottentomatoes.com/api/public/v1.0/movies.json"}}The formatted code is indented to make it more human readable:
http://api.rottentomatoes.com/api/public/v1.0.json?apikey=[your_api_key]{"links": { "lists": "http://api.rottentomatoes.com/api/public/v1.0/lists.json", "movies": "http://api.rottentomatoes.com/api/public/v1.0/movies.json" }}
- Previous: API Overview
- Up: API Overview
- Next: API Homepage - v1.0.json
4 Comments
grishmax – 1 year ago
I need to access all movies available , and call them through the titles in ascending order, how it could be accessed and what is the URL for it ? Thanks
Shubhang Verma – 3 months ago
PHP example Code not working. If anyone could help It always shows Error Parsing JSON.
jpneill – 3 months ago
Is there any way to get the director of a movie?
abishekg – 2 months ago
Is there a way to get all movies in the catalogue sorted by user ratings?
Please sign in to post a comment.