Import iTunes Data to Google Sheets
iTunes is a well-known digital media player created by Apple. The iTunes Search API provides a way to search through its huge online database for information on content hosted by the iTunes Store and Apple Books Store. 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.
- Part 1: Create your API Request URL
- Part 2: Pull iTunes API Data into Sheets
- Part 3: Get More iTunes API Data
PART 1: CREATE YOUR API REQUEST URL
We’ll follow the iTunes Search API documentation to access music details for a specific artist.
- API Base URL: https://itunes.apple.com
- Endpoint: /search
- Query String: ?term=SEARCH_TERM
Putting it together, we get the full API Request URL:
PART 2: PULL ITUNES API DATA INTO SHEETS
We can now enter all our values into API Connector and import iTunes API data into Google Sheets.
- Open up Google Sheets and click Add-ons > API Connector > Open.
- In the Create screen, enter the Request URL we just created
- This is a free, public API so we don’t need to enter any headers. Just leave this section blank. We don’t need authentication either.
- Create a new tab and click ‘Set current’ to use that tab as your data destination.
- Name your request and click Run. A moment later you’ll see data about your music search query data in your Google Sheet:
PART 3: GET MORE ITUNES API DATA
- Experiment with query strings as described in the documentation to see other types of iTunes data. For example, this URL will filter for movies with ‘blade’ in the title:
- Note that the iTunes API limits the number of records returned in each request. By default, only 50 records will be returned unless you use the
limitparameter, like this:
https://itunes.apple.com/search?term=radiohead&limit=200.The limit parameter has a maximum value of 200 per page, so if you still need to retrieve more records, add in the
offsetparameter to get additional pages:
page 2:With API Connector, you can either set these up as separate requests or loop through them automatically with pagination handling (paid feature):