Scrape a Spotify discography into a Google Sheet
How to scrape a Spotify discography into a Google Sheet: install the Chrome extension, click Build with Browser agent, tell the agent what you want, and follow its prompts. A working bot is built and tested in minutes.
Here is how the automation works. To scrape a Spotify discography, loop through artist links in a Google Sheet, open each artist's discography page, collect the album links with Get a list of links to pages from bot's current page, and in a second loop open each album and scrape its title, release date and copyright with Get data from bot's current page into another tab. Each artist is deleted from the sheet once done.
Build the Spotify discography from a description
Describe it and click the button: the agent builds and tests the scraper in your Chrome extension. It is a loop inside a loop: artists, then their albums.
- Open each artist link in the Artists tab
- Go to the artist's full discography
- Open every album and scrape the title and date
- Add them to the Data tab and delete the artist
You need a Google Sheet with two tabs: Artists, one Spotify artist URL per row in column A with no header, and Data, empty. Leave both tabs as they are while the run adds albums to Data and deletes each finished artist from Artists.
The video shows the agent building the Spotify discography scraper from the four lines above, in a few minutes.
Build the Spotify discography step by step
The steps the agent builds, as the Builder shows them: each step by its name, with the fields to set under it. Add them yourself in this order in the step-by-step builder, or open the agent's result there to adjust it.
- 1.0
Read data from a Google SheetSpreadsheet: your sheetSheet name: Artists, the tab with one artist link per row in column A
- 2.0
Loop through data- repeats for every row in
[google-sheet-data]
- 2.1
Go to pageURL: the link column of[google-sheet-data]followed by/discography/all
- 2.2
Click elementSelect: the grid layout icon on the discography page
- 2.3
Get a list of links to pages from bot's current pageSelect: one album in the grid
- 2.4
Loop through data- repeats for every row in
[link-data]
- 2.4.1
Go to pageURL: the album link of[link-data]
- 2.4.2
Get data from bot's current pageSelect: the title, release date and copyright line on the album page, one column eachMax results: 3
- 2.4.3
Write data to a Google SheetSpreadsheet: your sheetSheet name: DataDATA:[scrape-data]Write options: Add to existing data
- repeats for every row in
- 2.5
Delete rows from a Google SheetSpreadsheet: your sheetSheet name: ArtistsFirst row: 1Last row: 1
- repeats for every row in
Common questions about scraping a Spotify discography
Why does the Spotify artist page not load the discography?
The URL is missing its ending. Check the Go to page URL ends with /discography/all after the inserted artist link.
Why are the Spotify album links not found?
The albums are not all showing. The grid layout icon has to be clicked first so the albums are visible, then reselect one album in Get a list of links to pages from bot's current page. When a run fails, hand it to the agent and it repairs the step.
Why is the same Spotify artist scraped every time?
The wrong tab is cleared. Delete rows from a Google Sheet must point at the Artists tab, not Data.
Can I scrape other fields from a Spotify album?
Yes. Open the agent's result in the builder and reselect the fields in Get data from bot's current page: any field on the album page, such as the track count or the label, and raise Max results to match.
Can I scrape a Spotify discography without code?
Yes. The automation is built from the four lines above and runs in your Chrome extension; there is no script and no Spotify API key.
Can I stop the Spotify scraper and carry on later?
Yes. Each artist is deleted from the Artists tab once its albums are in Data, so a run you stop or that fails part way starts again from the first artist left in the tab, with no albums repeated.
Can I get the Spotify discography as a CSV or Excel file?
Yes. The albums land in the Data tab of your Google Sheet, and Google Sheets downloads any tab as CSV or Excel from its File menu.
Where do I get help?
Get in touch with support, or ask in the axiom.ai community.
Related guides
Scrape Google Transparency Report copyright data into a Google Sheet
- Search the report for each term in my sheet
- Save the copyright owner links to the Owners tab
- Open each owner and scrape domains and reporters
- Add them to the Data tab
Scrape Instagram users from a hashtag into a Google Sheet
- Open the Instagram hashtag page in my Google Sheet
- Collect the links to every post on it
- Open each post and get the poster's profile link
- Write the post and profile links to my sheet
Scrape Instagram post likes into a Google Sheet
- Open each Instagram post link in my sheet
- Like the post and scrape the users who liked it
- Add them to the data tab with the post link
- Delete the post link once it is done