Import 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.

 

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 follow the OMDb API documentation to search for information about movies.

  • API root:http://www.omdbapi.com/
  • Query String:?apikey=YOUR_KEY&s=SEARCH_QUERY
    Query String Example:?apikey=a12345b2&a=New York

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

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

(Of course, you should substitute in your own API key and search string.)

 

PART 3: PULL OMDb IMDb API DATA INTO SHEETS


We can now enter all our values into API Connector and start importing IMDB data into Google Sheets.

  1. Open up Google Sheets and click Add-ons > API Connector > Create New API Request.
  2. In the Create Request interface, enter the Request URL we just created
    omdb-img2
  3. Leave the headers section blank as we don’t need any headers for this request.
  4. Create a new tab. You can call it whatever you like, but here we’ll call it ‘OMDb’. While still in that tab, click ‘Set’ to use that tab as your data destination.
  5. Name your request. Again we’ll call it ‘OMDb’
  6. Click Run and a moment later you’ll see movies matching the search string “new york” populate the OMDb tab in your Google Sheet:
    omdb-img3

 

PART 4: SHEETS + OMDb API NOTES AND EXPANSIONS

 

    1. 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
    2. 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 to your URL path, like this:

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

      With API Connector, you can either set these up as separate requests or loop through them automatically with pagination (paid feature) for added efficiency, like this:
      omdb-img5

    3. 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

Leave a Comment