How to Scrape Spotify Webplayer for Artists 5 most recent Albums

With the Axiom.ai Spotify template, you can transform the chore of scraping album data from Spotify into a piece of cake. Get your music playing and let Axiom do all the work for you - no coding skills required! Enjoy your favorite tunes as it takes care of everything in just minutes.

# Install the Spotify Webplayer scraper template

To install this Spotify Axiom click 'Install template'. If you are a new user you will be required to create an Axiom.ai account before you can edit the template.

# Quick start guide

  1. Create a new Google Sheet. Insert Spotify Artists links from the web app. Add a second blank tab to the sheet.
  2. Configure the 'Read data from Google Sheet' step - with your sheet. Set the First and last Cells to A1 in step 1.
  3. Set up the 'Write Data to a Google Sheet' step to store the scraped Spotify data in step 6.
  4. Add your sheet to the 'Delete rows from a Google Sheet' Step in step 7.
  5. Set up the 'Jump to another step' step, and set max cycles to 1 in step 8.
  6. Do a test run.

Need help getting the Spotify Axiom working? This Axiom is fully customisable as it is with all Axiom's. You can edit the 'Get Data' steps to scrape other data if your wish. Read on to learn how each step is set up, watch the video or contact support.

  1. Create a new Google Sheet. You can do this in your Chrome browser by entering the shortcut 'sheet.new', presuming you already have an account.
  2. Name your sheet something like 'Spotify Scraper’.
  3. Set up a tab called 'Links'. Insert your Artist links into this tab.
  4. Add a final tab called 'data'.
google sheet for scraping spotify

# Set up the 'Read data from Google Sheet' step

  1. Spreadsheet - In the field called 'Spreadsheet', you can search for the Google Sheet you created. Once found, click to select.
  2. Sheet name - Choose the sheet tab called 'Links'.
  3. First cell - If the links are in column a set to 'A1'.
  4. Last cell - Enter 'A1' the bot will now only pass a single row of data. Just the link.
  5. You should now see a preview of the data.

# Interact with a page's interface - Collect Artist Name

This step scrapes the Artists name and requires no-configuration.

  1. Go to page - The data should already be inserted into this field '[google-sheet-data?*&0]'.
  2. Get data from a webpage - The Artists title is already selected and max-results set to one.
scrape album title using axiom

# Interact with a page's interface - Collect First 5 Albums

This step interacts with Spotify changing the display, then scapes the album links. Again this step is pre-configured.

  1. Click Element Show All - Interacts with the Show All button the Artists page.
  2. Click Element Switch View - Changes the display to a grid format.
  3. Get a list of links to pages - Scrapes the links of the first five albums. If you want more than 5 links change the result count.
scrape album data from Spotify using Axiom into a Google Sheet

# Interact with a page's interface - Collect Date and Label name for Albums

This step loops through the album links scraped in the previous step.

  1. Go to page - The data should already be inserted into this field '[all-interaction-data?*&0]'.
  2. Get data from a webpage - The Artists title is already selected and max-results set to one.
select the album date you want to scrape form Spotify

# Append your Spotify Data

This step joins the Artists Name to the scraped album data. No set-up required here.

  1. Data A - The following data is insereted here 'all-interaction-data_3'.
  2. Data B - The following data is insereted here 'all-interaction-data_2'.

The data should look like this when written on the Google sheet.

select the album date you want to scrape form Spotify

# Set up the 'Write Data to a Google Sheet' step to store the scraped Spotify data

  1. Spreadsheet - In the field called 'Spreadsheet', you can search for the Google Sheet you created. Once found, click to select.
  2. Sheet name - Choose the tab you created.
  3. DATA - Select the 'Interact data'.
  4. Clear data before writing | Add to existing data - Set this option to 'Add to existing data' or the Spotify product data will be overwritten every run.

# Set up the 'Delete rows from a Google Sheet' step

This step deletes the Spotify Artist link, previously scrapped. Now the Axiom will loop through a new link on its next run.

  1. Spreadsheet - In the field called 'Spreadsheet', you can search for the Google Sheet you created. Once found, click to select.
  2. Sheet name - Choose the tab you created for links.
  3. First row - set to 1.
  4. Last row - set to 1.

# Set up the 'Jump to another step' step

This step loops the Axiom; set the number of times you wish to loop. This step should jump to the 'Read data' step at the start.

  1. Jump to step - set the step you want to jump to make the bot loop in this case step one.
  2. Maximum cycles - set the amount of loops the bot must perform.

# Test run your Spotify Webplayer Scraper

We always recommend doing a test run - In the 'Jump Step,' set cycles to a low amount, perhaps 2-3, then click run. Once the run stops, check the correct data is in the Google Sheet.

# Troubleshooting the Spotify Scraper

Try the following if your Spotify Axiom is not working. We would also recommend you watch the video to troubleshoot.

  • Axiom does not run on Desktop with Spotify - use the cloud runner.
  • Issue with step 2.1 - Insure you have links in the Google Sheet.
  • Issue with step 2.2 - Re-select the artist title.
  • Issue with step 3.1 and 3.2 - Re-select select elements to click.
  • Issue with step 3.3 - Re-select select album links.
  • Issue with step 4.2 - Re-select the date and titles.
  • Axiom loops through the same Artists - check step seven is configured correctly

# More web scraping templates