Search API Connector Documentation

Print

Import iTunes Data to Google Sheets

In this guide, we’ll walk through how to pull media data from the iTunes Search API directly into Google Sheets, using the API Connector add-on for Sheets.

This API doesn’t require any authentication, so let’s jump right in.

Contents

Before You Begin

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

Part 1: Pull Data from iTunes to Sheets

The easiest way to get started with the iTunes API is through API Connector’s built-in integration.

  1. Select iTunes from the drop-down list of applications
    itunes-application
  2. Select an endpoint.  These endpoints are all open so you don’t need an API key. For this example we’ll choose the /search endpoint, which lets us search the iTunes library by name.
    itunes-endpoints
  3. Under parameters, fill in a search term and (optionally) any other parameters you’d like to filter by.
  4. Choose a destination sheet, name your request, and hit Run.
    itunes-parameters

Part 2: Create a Custom API Request

Alternatively, you can run custom requests to the iTunes API instead of using API Connector’s built-in integration. To run a custom request, enter the full API URL into the request URL field.
itunes-results1

To easily convert from a preset request to a custom API URL, tick the Add request URL box before running your preset request (under Output options). This will print out your complete API URL, which you can then copy/paste into the request URL field.

Part 3: Handle Pagination

Note that the iTunes API limits the number of records returned in each request. By default, only 50 records will be returned unless you set the limit parameter.

The limit parameter has a maximum value of 200 per page, so if you still need to retrieve more records, add in the offset parameter to get additional pages. With API Connector, you can either set these up as separate requests or loop through them automatically with pagination handling, like this:

  • Pagination: offset-limit
  • Offset parameter: offset
  • Limit parameter: limit
  • Limit value: 200
  • Run until: choose when to stop fetching data
    itunes-pagination-offsetlimit

Part 4: API Documentation

Official API documentation: https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/

Tags:
Previous Import Intercom Data to Google Sheets
Next Import Jira Data to Google Sheets

Leave a Comment

Table of Contents