Search API Connector Documentation

Print

Import OMDb / IMDb 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: Create Your OMDb/IMDb API Request URL

We’ll first search movies for a keyword.

  • API root:http://www.omdbapi.com/
  • Query String:?apikey=YOUR_KEY&s=SEARCH_QUERY

Putting it all together, we get the full API Request URL:

http://www.omdbapi.com/?apikey=a12345b2&s=new york

Just substitute in your own API key and search string.

Part 3: Pull OMDb IMDb API Data into Sheets

We can now enter that URL into API Connector.

  1. Open up Google Sheets and click Extensions > API Connector > Open.
  2. In the Create screen, enter the Request URL we just created
    omdb-img2
  3. Leave the OAuth section set to None. Leave the headers section blank too as we don’t need any headers for this request.
  4. Create a new tab and click Set current to use that tab as your data destination.
  5. Name your request and click Run. A moment later you’ll see movies matching your search string populate your Google Sheet:omdb-img3

Part 4: Get More OMDb API Data

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

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

Part 5: Handle Pagination

Note that the OMDb API limits the number of records returned in each request, which may be an issue when searching by keyword. By default, only the first page of records will be returned unless you use the ‘page’ parameter as shown in their list of parameters.

omdb-img4 

Each page contains 10 records. To access more than 10 records, edit the “page” parameter as shown above.

With API Connector, you can loop through pages automatically with pagination handling (paid feature), 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

Previous Import Okta Data to Google Sheets
Next Import OpenSea Data to Google Sheets

Leave a Comment

Table of Contents