Scrape every page in a list of links into a Google Sheet

How to scrape every page in a list of links 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 every page in a list of links, put the links in a Google Sheet and loop through them: a Loop through data step opens each link, Get data from bot's current page scrapes the fields you want, and Write data to a Google Sheet files them in a second tab. Each link is deleted once it is scraped, so a stopped run carries on where it left off.

Author
Alex Barlow
Published

Describe it and click the button: the agent builds and tests the scraper in your Chrome extension. To collect the links first, see scrape links from a website.

  1. Open each link in the Links tab of my sheet
  2. Scrape the title, price and description
  3. Add them to the Data tab
  4. Delete the link row once it is scraped
Click to launch the Chrome extension. Not installed? You can create an account and try it free.Opens the Chrome extension. Free account to try.

You need a Google Sheet with two tabs: Links, one page URL per row in column A with no header, and Data, empty. Leave both as they are while the run fills Data and clears Links.

The video shows the agent building the link scraper from the four lines above, in a few minutes.


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 Sheet
    • Spreadsheet: your sheet
    • Sheet name: Links, the tab with one link per row in column A
  • 2.0 Loop through data
    • repeats for every row in [google-sheet-data]
    • 2.1 Go to page
      • URL: the link column of [google-sheet-data]
    • 2.2 Get data from bot's current page
      • Select: the title, price and description on the page, one column each
      • Max results: 3
    • 2.3 Write data to a Google Sheet
      • Spreadsheet: your sheet
      • Sheet name: Data
      • DATA: [scrape-data]
      • Write options: Add to existing data
    • 2.4 Delete rows from a Google Sheet
      • Spreadsheet: your sheet
      • Sheet name: Links
      • First row: 1
      • Last row: 1

In Read data from a Google Sheet, set Last cell. A100 reads the first hundred links.

Why does the scraper find the wrong field, or nothing, on some pages?

The pages in the list differ. In Get data from bot's current page, click Select again on the page that failed and reselect, or paste a custom CSS selector. When a run fails, hand it to the agent and it repairs the step.

The scraper retries when it finds nothing. Open Configure scraper on the scrape step and set No. of retries to 1, and keep Max results equal to the number of fields.

Why is nothing written to the Data tab?

In Write data to a Google Sheet, check that DATA is [scrape-data] and Sheet name is Data.

Why does each run overwrite the last scraped data?

Set Write options on the sheet step to Add to existing data.

Can I scrape a list of URLs without code?

Yes. The scraper is built from the four lines above, with no code: the sheet holds the links, and the steps open, scrape and file each page.

Yes. Save the automation and set a schedule. Each run scrapes the links then in the Links tab and deletes them as it goes, so add new links to the tab and the next run picks them up.

Yes. Put Write data to an Excel Sheet in place of Write data to a Google Sheet and the scraped rows land in an Excel sheet instead.

How do I scrape linked pages with different layouts?

Let AI read them instead of fixed selectors: scrape any website with ChatGPT. For the problems scrapers run into and how to write selectors that last, see five problems with web scrapers and CSS attribute selectors.

Where do I get help?

Get in touch with support, or ask in the axiom.ai community.

Related guides