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: Notes and Expansions
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
Query String Example: ?term=bag raiders
Putting it together, we get the full API Request URL:
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 > Create New API Request.
- In the Create Request interface, 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.
- Create a new tab. You can call it whatever you like, but here we’ll call it ‘iTunes’. While still in that tab, click ‘Set’ to use that tab as your data destination.
- Name your request. Again we’ll call it ‘iTunes’
- Click Run and a moment later you’ll see data about your music search query data in your Google Sheet:
- 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:
With API Connector, you can either set these up as separate requests or loop through them automatically with pagination handling (paid feature):