Scrape data from a list of URLs in a Google Sheet

How to scrape data from a list of URLs in 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 data from a list of URLs, read the URLs from a Google Sheet with Read data from a Google Sheet, loop through them with Loop through data, and inside the loop open each one with Go to page, scrape the fields with Get data from bot's current page, find the URL's own row with Find row in a Google Sheet, and write the fields into it from column B with Write data to a Google Sheet, so every page's details sit beside its link. It suits pages that share one layout: a product listing, a set of profiles, a directory.

Author
Alex Barlow
Published

Build the list of URLs from a description


Describe it and click the button: the agent builds and tests the scraper in your Chrome extension. For the full worked version with a second tab and a delete-as-you-go checkpoint, see scrape every page in a list of links.

  1. Open each link in column A of my Google Sheet
  2. Ask me which data to scrape from each page
  3. Put the details in that URL's row from column B
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 one URL per row in column A, no header row, and a second tab for the results; type sheet.new in Chrome to make one. Pages with the same layout work best, so the selector picked on one finds the field on all. Leave the results tab as it is while the run adds rows to it.

Build the list of URLs 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 Sheet
    • Spreadsheet: your sheet
    • Sheet name: the tab with one URL per row in column A
    • Last cell: A21 while you test
  • 2.0 Loop through data
    • repeats for every row in [google-sheet-data]
    • 2.1 Go to page
      • URL: column A of [google-sheet-data]
    • 2.2 Get data from bot's current page
      • Select: the fields you asked for on the page, one column each
      • Max results: 1
    • 2.3 Find row in a Google Sheet
      • Spreadsheet: your sheet
      • Sheet name: the same tab
      • Values (comma separated): column A of [google-sheet-data]
      • Exact match: on
    • 2.4 Write data to a Google Sheet
      • Spreadsheet: your sheet
      • Sheet name: the same tab
      • DATA: [scrape-data]
      • Write options: Add to existing data
      • Starting cell: B[find-row-google-sheet], the found row from column B

Common questions about scraping a list of URLs


Why are some rows empty when I scrape a list of URLs?

Those pages have a different layout, so the selector finds nothing there. Reselect on that page with a custom CSS selector that covers both, or hand the failed run to the agent and it repairs the step.

Can I restart the scraper where it stopped in the list of URLs?

Yes. Add Delete rows from a Google Sheet at the end of the loop on the URL tab, with First row to delete and Last row to delete 1, so each URL is removed once scraped and a restart starts at the first one left. Scrape every page in a list of links shows that version.

How do I get the list of URLs to scrape?

Scrape them from a listing page: scrape links from a website into a Google Sheet collects them in two steps.

Can I scrape a list of URLs without code?

Yes. The four steps are added in the Chrome extension with no code; the fields are picked by clicking them on one of the pages.

Can I scrape a list of URLs into Excel or a CSV instead of a Google Sheet?

Yes. Keep the results in the Google Sheet and download it from Google Sheets as Excel or CSV once the run has finished.

Can I run the scraper on a schedule?

Yes. Save the automation and set a schedule; each run reads the URLs in column A and adds a row per page to the results tab, so a list that grows is scraped as it grows.

Where do I get help?

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

Related guides