Follow deanclatworthy on Twitter

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:

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

  1. 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}
  2. 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"}
  3. 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"}
  4. 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

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