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

6 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 Verma2 years 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?

  5. Flames2 months ago

    My Key was deactivated but my application is still very much in use and supported. When I query the API with the key it says {"error":"Account Inactive"}". When I Login it looks like my key was removed, and so I generated a new one but it still not working. I would like to get my old key reactivated if possible so that it doesn't require an updated app to be uploaded. Please help.

  6. ekoz1 month ago

    To everyone that's having issues with invalid accounts, I noticed that if I removed the brackets from [your-api-key] here in the query it worked for me.

    Cheers

Please sign in to post a comment.