Print

Import IMDb (OMDb) Data to Google Sheets

In this guide, we’ll walk through how to pull IMDB data from the unofficial Open Movie Database (OMDb) API directly into Google Sheets, using the API Connector add-on for Sheets.

We'll first get an API key from OMDb, and then set up a request to pull in movie data to your spreadsheet.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your OMDb API Key

  1. If you haven't already, sign up for an account at http://www.omdbapi.com/apikey.aspx. For this walkthrough, the free plan is fine.
    omdb-img1
  2. You'll be sent a verification link containing your API key. Click the link to activate it. That's it! You now have access to the OMDb API.

Part 2: Pull OMDb IMDb API Data into Sheets

For this example, we'll search the database for a query. Where it says your_api-key, substitute in your own API key.

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • ApplicationCustom
    • MethodGET
    • Request URLhttp://www.omdbapi.com/?apikey=your_api_key&s=new york
  3. Create a new tab and click Set current to use that tab as your data destination.
  4. Name your request and click Run. A moment later you’ll see movies matching your search string populate your Google Sheet:
    omdb-response

Part 3: Example OMDb API Request URLs

To view ratings from the Internet Movie Database, Rotten Tomatoes, and Metacritic, make a request for a single movie, like this:

  • by title
     http://www.omdbapi.com/?apikey=YOUR_KEY&t=dazed and confused
  • by IMDb ID
     http://www.omdbapi.com/?apikey=YOUR_KEY&i=tt0106677
  • all episodes for an entire season
     http://www.omdbapi.com/?apikey=YOUR_KEY&i=tt3107288&season=8

Part 4: Data Options

Fetch images

To pull in images, you can use Google Sheets' native IMAGE() function. Apply it to the entire column with an array formula, like this: =arrayformula(image(E2:E))
omdb-img6

Flatten data

When you fetch data by ID, by default ratings will be returned on separate rows.
omdb-rows

To flatten these into individual columns, use the Flatten fields to columns feature, with the following settings:

  • Type: custom
  • Path to header: Ratings.Source
  • Path to value: Ratings.Value
  • Flatten array: checked
    omdb-flattened

Part 5: Handle Pagination

Note that the OMDb API limits the number of records returned in each request. By default, only one page of records will be returned, containing 10 records. To get more records, fetch additional pages using the page parameter as shown in their list of parameters.

omdb-img4 

With API Connector, you can loop through pages automatically with pagination handling, like this:

  • Pagination: page parameter
  • Page parameter: page
  • Run until: choose when to stop fetching data

pagination-page-parameter

Part 6: API Documentation

Official API documentation: http://www.omdbapi.com/#parameters

2 thoughts on “Import IMDb (OMDb) Data to Google Sheets”

  1. Hello, This has worked wonderfully. but now I'm wondering if there is a way to automate the process by selecting a list populated with names. or if there are any other ways that could be done to achieve this.

    Reply

Leave a Comment

Jump To