Important:
This service will be phased out and discontinued on March 1st 2010. Due to IMDB's recent change in the terms of the use of their public data, I am not willing to pay $15,000 USD a year to continue this non-profit site.
Introduction to the IMDB API
The IMDB API is a lightweight web service which provides efficient access to most of IMDB’s data. IMDB’s dataset is available for download, but there is no good API for retrieving information. This web service aims to bridge that gap by providing data in the following formats:
- JSON (JavaScript Object Notation)
- Plain-text
- XML (coming soon)
How to use the IMDB API
Using the API could not be simpler. Make a request to the following URL: http://www.deanclatworthy.com/imdb/ and send these parameters:
| Parameter | Required | Default Value | Description |
|---|---|---|---|
| q | Yes | n/a | The name of the movie you wish to search for (e.g. Finding Nemo, The Green Mile) |
| type | No | JSON | The data type you wish the API to return. Options are: JSON, text |
| year | No | 2010 | The year you wish to search for. If you omit the year it will automatically use the current year when searching. |
| yg | No | 0 | Either pass in a value 1 or 0. This parameter disables year guessing. If you omit the year parameter, set this option to 0 to disable it assuming the movie came out in the current year. |
| token | No | 10/td> | When returning data in the "text" format. You can specify the decimal ascii code of the character you wish to split the data tokens by. |
Examples using the IMDB API
Here are some examples of using the IMDB API
- Finding a film with just the movie title
http://www.deanclatworthy.com/imdb/?q=The+Green+Mile
{"id":"2","title":"The Green Mile","imdburl":"http:\/\/www.imdb.com\/title\/tt0120689\/","country":"USA","languages":"English,French","genres":"Crime,Drama,Fantasy","rating":"8.3","votes":"162871","screens":2875} - Finding a film with the movie title and year guessing
http://www.deanclatworthy.com/imdb/?q=Star+Trek
{"id":"1","title":"Star Trek","imdburl":"http:\/\/www.imdb.com\/title\/tt0796366\/","country":"USA","languages":"n\/a","genres":"Action,Adventure,Sci-Fi","rating":"8.4","votes":"61726","screens":3860,"year":"2009"} - Finding a film with the movie title and specifying a year
http://www.deanclatworthy.com/imdb/?q=Star+Trek&year=1996
{"id":"2","title":"Star Trek: First Contact","imdburl":"http:\/\/www.imdb.com\/title\/tt0117731\/","country":"USA","languages":"English","genres":"Action,Adventure,Sci-Fi,Thriller","rating":"7.6","votes":"40871","screens":2812,"year":"1996"} - Finding a film with the movie title and turning off year guessing
http://www.deanclatworthy.com/imdb/?q=Finding+Nemo&yg=0
{"id":"3","title":"Finding Nemo","imdburl":"http:\/\/www.imdb.com\/title\/tt0266543\/","country":"USA","languages":"English","genres":"Animation,Adventure,Comedy,Family","rating":"8.2","votes":"135728","screens":3425,"year":"2003"}
Test the IMDB API
Notes
- You are limited to 30 requests per hour. If you wish to have a special API key which allows you to make more requests per hour send me an email explaining what you will be using the API for and why you need to make more requests.
- You should be able to lookup tv shows/series but I cannot guarentee it's accuracy
Help support the IMDB API
Running a web service that handles a large volume of traffic is not cheap. Any donations to help with the cost of running the web service is most appreciated. Click the button below to donate
Changelog
- v1.2 (13/06/2009)
- Switched to a more accurate method of finding the film
- Instead of 'screens' field, it is split into 'usascreens' and 'ukscreens' now.
- v1.1 (07/06/2009)
- Added series field (0 = not a tv series, 1 = is a tv series)
- Added stv field (0 = not a STV film, 1 = is a STV film)
- Fixed issues with double quotes around tv series names
Films opening this week (US)
Top films this week (US)
- Alice in Wonderland
- Brooklyn's Finest
- Shutter Island
- Cop Out
- Avatar
- The Crazies
- Percy Jackson & the Olympians: The Lightning Thief
- Valentine's Day
- Crazy Heart
- Dear John
