
"Search by ID or Title" Request parameters
Please note while both i and t are optional at least one argument is required.
| Parameter | Value | Description |
|---|---|---|
| i | string (optional) | a valid IMDb movie id |
| t | string (optional) | title of a movie to search for |
| y | year (optional) | year of the movie |
| r | JSON, XML | response data type (JSON default) |
| plot | short, full | short or extended plot (short default) |
| callback | name (optional) | JSONP callback name |
|
|
true (optional) | adds rotten tomatoes data |
Sample Request (URL: http://www.imdbapi.com/?t=True Grit&y=1969):
The following is an example search for "The Social Network" by its IMDb ID.
example code using AJAX:
<script type="text/javascript">
// IMDb ID to Search
var imdbLink = "tt1285016";
// Send Request
var http = new ActiveXObject("Microsoft.XMLHTTP");
http.open("GET", "http://www.imdbapi.com/?i=" + imdbLink, false);
http.send(null);
// Response to JSON
var imdbData = http.responseText;
var imdbJSON = eval("(" + imdbData + ")");
// Returns Movie Title
alert(imdbJSON.Title);
</script>
Implemented, In Progress, unavailable
Title, Director, Writer, Actors, Plot, Poster, Runtime, Rating, Votes, Genre, Released, Year, Rated, ID (IMDb ID), Cast, Crew, Critics, Trivia, Quotes