• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Rakuten RapidAPI Blog

The World's Largest API Marketplace

  • Enterprise
    • Product
    • eBooks
    • Contact Us
  • Marketplace
    • Product
    • Sign Up
    • Docs
  • Resources
    • API Blog
    • API Tutorial
    • Developer Showcase
  • EnglishEnglish
    • 日本語日本語
You are here: Home / API Tutorial / IMDb API Tutorial – World’s Largest Movie Database API

IMDb API Tutorial – World’s Largest Movie Database API

December 23, 2019 By Shyam Purkayastha Leave a Comment

IMDb API is the API for interacting with the IMDb, or the Internet Movie Database. IMDb is an online repository of movies, films, television & web series, and more. You can visit the website and browse through its exhaustive source of information about the cast, the crew, plot summaries, and trivia.

What is IMDb API?

The IMDb API is a set of web services that allow developers to access the data on IMDb.com. The API design is flexible and easy to use, allowing developers to integrate the data into their applications. The IMDb API is a free service that enables developers to query the database of information on over 250,000 movies and TV shows. API provides access to over 3 million data items, including cast & crew info, plot summaries, release dates, and ratings. It also offers an image server with over 1 million images related to movies and TV shows. The API is available in REST architecture with JSON responses.

The IMDb API makes it easy to search and find information about movies and TV shows. It has an extensive set of API endpoints to query each aspect of a movie. In this tutorial, you will learn about the information that you can retrieve from the IMDb API. IMDb API is integrated with Rakuten RapidAPI so you can log in to your account and access it using your universal subscription key.

Table of Contents

  • 1 Does IMDb Have an API?
    • 1.1 Unofficial Alternate IMDb APIs
  • 2 API Overview
  • 3 Get Data With the API
    • 3.1 Search for a Movie Name
    • 3.2 Searching for a Movie Cast
    • 3.3 Getting Information About Movie Crew
  • 4 Benefits of the API
  • 5 Wrapping Up
    • 5.1 Share this:

Does IMDb Have an API?

Yes, IMDb has an API called Search Suggestions. This API is undocumented and in public JSON-P format that cannot be customized. This limits its functionality and the usefulness of any search suggestions it may provide. For a more comprehensive API with customizable formats for different needs such as language or formatting preferences, try out our Open Movie Database (IMDB Alternative) on Rakuten RapidAPI.

Unofficial Alternate IMDb APIs

There are alternate third-party movie APIs that fill the gap for a reliable and easy-to-use Internet Movie Database API. Here are some of them.

  • IMDb API mimics IMDb. It has endpoints to query information on films, actors, characters, crew, and more.
  • Entertainment Data Hub – This API offers granular search options. This API supports movies, soaps, web series, crew and cast information, movie specifications, images, posters, trailers, ratings, Wikipedia articles, and more.

 

API Tutorial IMDb API

In case you don’t have an account on Rakuten Rapid API, sign up now and get your universal API key to access the IMDb API and thousands of other APIs hosted on Rakuten Rapid API.

Connect to API

API Overview

What’s the first thing that comes to your mind when you hear about an upcoming movie? The cast comprising of the actors and the actresses. The crew, consisting of the director, the writer, and maybe the cinematographer. You would also want to know the release date and get a summary of the plot. You can query all this and more with the IMDb API.

The IMDb API is organized into several specific endpoints that provide all the above information and more. To get a closer look, jump to the IMDb API console.

IMDb API Console

Check out the list of endpoints on the left side of the API console, and you can see how neatly it is organized in a way to query different aspects of a movie.

API FullList

This is a good example of a well-defined information architecture about a subject, which in this case, is a movie, a television show, or a streaming entertainment video.

Since the endpoint list is extensive, a complete description of all the endpoints is beyond the scope of this tutorial. However, we will cover the main endpoints which are in line with your curiosity questions when you hear about a new movie release.

Before you begin, take a look at the Pricing tab in the API console. The IMDB API has a freemium pricing model with a BASIC subscription tier that gives you 500 API calls free, per month. Make sure you opt for the BASIC subscription before you proceed with this tutorial further.

Get Data With the API

Let’s take a look at some of the prominent endpoints of IMDb API which provide key information about a movie.

Be sure to subscribe to the API and keep the API console page open to test the endpoints that we are going to explain now.

 

How do I Use IMDb API?

  1. Sign up for a free Rakuten RapidAPI user account.
  2. Navigate to the API pricing page and subscribe to a pricing plan. The free tier allows 1,000 free requests per day.
  3. Navigate to the documentation & endpoints page.
  4. Pick any endpoints of your choice and select your preferred programming language from the dropdown menu. The IMDb API is compatible with Node.js, PHP, Python, Ruby, Objective-C, Java (Android), C# (.NET), and cURL.
  5. Build a request by providing the necessary parameters.
  6. Click “Test Endpoint” button to test the API in your browser.
  7. Integrate the “request snippet” in your website or application.

Search for a Movie Name

The “GET title/find” endpoint is used to search for a movie by its name. This endpoint accepts a string as the name of a movie or TV show to search for. It returns a list of all movies and shows which match the string, even if it is a partial match.

Select the “GET title/find” endpoint and try searching for “titanic”.

IMDb API Find Movies

And the API response is somewhat like this.

IMDb API Find Movies Response

Under the “results” key you can see a list of all the matching movies. The first one is the popular movie featuring  Leonardo DiCaprio & Kate Winslet. You can see their name inside the “principals” key.

Another important thing to remember about the search results is the id of each movie.

IMDb API Find Movies Response Id

In the case of Titanic, the id is “/title/tt0120338/”. The string prefixed with “tt” followed by a number sequence is the unique identifier for this movie. The IMDb API uses this id to search for other information related to this movie.

So if you want to perform further queries on any movie, then you must make a note of the id. Now that we know the id of Titanic, let’s find out some more information about this movie.

Connect to API

Searching for a Movie Cast

After you know the movie’s name, the next logical thing is to know the cast. Although the “GET title/find” endpoint gives you the names of the leading actors, it does not provide the full list of cast.

To get the list of complete cast, you can use the “GET title/get-top-cast”. This endpoint takes the movie id as a parameter returns the cast list. So if you choose “GET title/get-top-cast” endpoint on the API console and feed in the id of the movie “Titanic”, this is what the request looks like.

IMDb Top Cast List Request

Trigger the API and you will get a list of the cast as follows.

IMDb Top Cast List Response

The API response is a list of ids of the cast. Similar to the movie id, each person also has an id starting with nm followed by a number.

In order to get the name and other details of the cast, you need to call another endpoint, “GET title/get-charname-list”. This endpoint takes in the movie id and cast id as parameters. Select this endpoint and enter the movie id of “Titanic” and the name id of the first item you got from the API response of “GET title/get-top-cast”.

IMDb Top Character List Request

You should now see some meaningful information about the cast.

IMDb Top Character List Respond

Here you go. The API response contains the name of the cast along with information about the character in the movie. In this way, you can call this endpoint for all the name ids, and get individual information about them and their role in the movie.

Getting Information About Movie Crew

“GET title/get-top-crew” returns the list of crew, mainly the director and the writer for a movie id.

IMDb Top Crew

Let’s see what does it return for the crew of “Titanic”.

{

  "directors":[1 item

    0:{7 items

      "akas":[...]4 items

      "disambiguation":"I"

      "id":"/name/nm0000116/"

      "image":{...}4 items

      "legacyNameText":"Cameron, James (I)"

      "name":"James Cameron"

      "category":"director"

    }

  ]

  "writers":[1 item

    0:{10 items

      "akas":[...]4 items

      "disambiguation":"I"

      "id":"/name/nm0000116/"

      "image":{...}4 items

      "legacyNameText":"Cameron, James (I)"

      "name":"James Cameron"

      "category":"writer"

      "job":"written by"

      "writerCategoryBilling":1

      "writerTeamBilling":1

    }
  ]
}

 

 

You have your answer.

Benefits of the API

The IMDb API is a great way to get information about movies, TV shows, and actors. It’s also a great way to get data for your projects. Here are some of the benefits of using the IMDb API:

  • It’s free! You can use it as much as you want without paying anything.
  • It’s fast! The IMDb API is very fast and reliable. You won’t have any problems with slow response times or downtime when using this service.
  • It has a lot of data! The IMDb database contains information on over 3 million movies, TV shows, actors, directors, producers, writers, and more! This means that there are plenty of opportunities for you to find interesting data that will help you create something new and exciting with your project or app idea. For example: If you wanted to create an app that helps people find new movies they might like based on their favorite genres, then the IMDb API would be perfect for helping you do just that. If your app idea was something like “What movie should I watch tonight?” then the IMDb API could help by providing recommendations based on what other users liked in similar situations.

Connect to API

Wrapping Up

We have just covered the tip of the iceberg in this tutorial. Go ahead and try the API and search for your favorite movies. You can even retrieve information about awards, reviews, shooting locations and images and more. This is a complete treasure trove of data. You can build movie quizzes and perform data analytics to unearth useful information.

Also if you are looking to build apps around movies and entertainment then check out our other APIs related to movies.

5 / 5 ( 3 votes )

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)

Filed Under: API Tutorial

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Accelerate tech modernization

To compete in the digital age, Rakuten RapidAPI helps enterprises deploy scalable and flexible IT systems to allow for ongoing experimentation and iteration at speed.

Learn More
Try Rakuten RapidAPI for free
  • Enterprise
  • Marketplace
  • Resources
  • EnglishEnglish

© 2022 Rakuten RapidAPI. All rights reserved.