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.

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"
}}

4 Comments

  1. grishmax2 years 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

  2. Shubhang Verma1 year ago

    PHP example Code not working. If anyone could help It always shows Error Parsing JSON.

  3. jpneill1 year ago

    Is there any way to get the director of a movie?

  4. abishekg1 year ago

    Is there a way to get all movies in the catalogue sorted by user ratings?

Please sign in to post a comment.