# Web Scraper to Google Sheets

> Turns any public, paginated listing site into a Google Sheet or CSV. Your agent checks robots.txt, adapts the selectors, retries failed pages, paces requests politely and skips duplicate rows on every re-run. Node.js, no API keys, 13 offline tests included.

Web Scraper to Google Sheets is a paid AI agent skill on Agensi by Yousef, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $3 (one-time purchase)
- Creator: [Yousef](https://www.agensi.io/creators/yo9sefbest)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/web-scraper-to-google-sheets
- Tags: database, automation, ecommerce

## About this skill

### What it does

Give your AI agent a public listing site (a product catalogue, directory, price list or book store) and it collects the data into a **Google Sheet** or a **CSV file**: title, price, currency, rating, stock status, link, image and the time it was scraped.

It is built on a tested Node.js scraper, so your agent runs proven code instead of improvising a new script every time.

### Why it's useful

- **Checks first.** The agent reads robots.txt and the site's terms before scraping, and stops if scraping isn't allowed.
- **Adapts to your site.** Only one file holds the site-specific selectors. The agent edits it, shows you a one-page sample, and scales up only after you approve it.
- **Polite and reliable.** It retries timeouts, 429 and 5xx errors with backoff, fails fast on 403 and 404, pauses between pages, and never follows a link to a different website.
- **No duplicates.** Re-run it daily or weekly. Only new rows are added, matched by URL, including repeats inside the same run.
- **Safe for your sheet.** Values are written as plain data, so scraped text can never run as a spreadsheet formula.

### What's included

- A SKILL.md workflow for your agent
- The scraper source (Cheerio and the Google Sheets API) with 13 offline tests
- Guides for adapting the parser and for the one-time Google Sheets setup

### Good to know

- It works on static HTML pages. Pages behind a login, or that only load data with JavaScript, aren't supported.
- It won't bypass CAPTCHAs, blocks or rate limits. If a site says no, the agent stops.
- Google Sheets is optional. CSV works with no accounts at all.
- The demo targets a book websi, a practice site built for scraping.

## Requires

- Node.js 20+
- npm
- Optional: Google account
- Optional: Google Cloud project (Google Sheets output only)
- Optional: Google service account key (JSON file)

Google Sheets is optional. Without it, results are saved as a CSV file in scripts/output/ and no account is needed.

## Known limitations

- Static HTML pages only. It can't log in, solve CAPTCHAs, or read pages that load their data with JavaScript. It won't bypass blocks or rate limits.
- The selectors in scripts/src/parser.js are written for the demo site (books.toscrape.com). For any other site your agent edits that one file and re-tests. The fields are fixed: title, price, currency, rating, in stock, URL and image.
- It follows "next page" links only. Infinite scroll and "load more" buttons aren't supported. It stays on the same website as the start URL and scrapes up to 50 pages per run.
- Each product is saved once, matched by its URL. It adds new rows but never updates or deletes existing ones, so it doesn't track price changes over time.
- Duplicate detection reads the URL column (column F). If you rearrange the sheet's columns, update scripts/src/format.js too.
- Price parsing expects numbers like 51.77 and recognises the £, $ and € symbols. Other currencies or formats like 1.234,56 need a small tweak.
- It's deliberately slow (one page at a time, with a pause between pages). It isn't built for large-scale crawling, proxies or scheduled runs. Use cron or a task scheduler to run it regularly.
- The offline tests use saved pages and a simulated Google Sheets client. Check the real Google Sheets setup with your own sheet before you rely on it.
- You are responsible for scraping only where a site's terms and robots.txt allow it.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Web Scraper to Google Sheets skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Q: Does it work on any website?

A: It works on public, static HTML listing pages (product catalogues, directories, price lists). Your agent adapts one file of selectors to the site and shows you a sample before scraping more. Pages behind a login, or that load data only with JavaScript, aren't supported.

### Q: Do I need a Google account?

A: Only if you want the data in Google Sheets. Without one, the skill saves a CSV file and needs nothing else.

### Q: Is scraping allowed?

A: That depends on the website. The skill makes your agent check robots.txt and the site's terms first, and it stops if scraping isn't allowed. You're responsible for scraping only where it's permitted.

### Q: Will it get around blocks or CAPTCHAs?

A: No. If a site blocks it or rate-limits it, the agent stops and tells you.

### Q: What happens if I run it again?

A: Only new rows are added to your sheet. Rows are matched by URL, so you won't get duplicates, even if the same URL shows up twice in one run.

### Q: What if the website changes its layout?

A: The selectors may need updating. The included guide shows your agent how to fix them in one file and re-test.

### Q: Does it need API keys?

A: No. It uses no paid tools. Google Sheets output needs a free Google service account, and the setup guide walks through it.

### Q: Which systems does it run on?

A: It's plain Node.js 20+. The 13 offline tests pass on Linux, and it should also run on Windows and macOS. If you hit a system-specific problem, message me here on Agensi.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
