- Home
- Skills
- Data & Databases
- Web Scraper to Google Sheets
Works with the AI Agents you already use
Web Scraper to Google Sheets
by Yousef
It is built on a tested Node.js scraper, so your agent runs proven code instead of improvising a new script every time.
$3
Web Scraper to Google Sheets
Example session with this skill installed
Use the web scraper skill to collect the first 3 pages of https://books.toscrape.com/ into a CSV, then show me the first 5 rows.
- Read your context and instructions
- Compiled the web scraper to
- Generated the data export
Summary
Checked robots.txt (the demo site allows this), installed dependencies, ran the 13 offline tests (all passing), then scraped 3 pages. Saved
[N] books to output/books.csv.
What I ran
cd scripts && npm install && npm test
node src/index.js --csv-only --pages 3 --delay 500
Output
Page 1: https://books.toscrape.com/
found 20 books
Page 2: https://books.toscrape.com/catalogue/page-2.html
found 20 books
Page 3: https://books.toscrape.com/catalogue/page-3.html
found 20 books
Scraped 60 books.
Saved CSV: D:\Projects\GitHub\New folder\books-scraper-google-sheets\output\books.csv
Skipped Google Sheets (--csv-only).
First 5 rows
| Title | Price | Currency | Rating | In stock | URL |
|---|---|---|---|---|---|
| A Light in the Attic | 51.77 | GBP | 3 | Yes | https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html |
| Tipping the Velvet | 53.74 | GBP | 1 | Yes | https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html |
| Soumission | 50.1 | GBP | 1 | Yes | https://books.toscrape.com/catalogue/soumission_998/index.html |
| Sharp Objects | 47.82 | GBP | 4 | Yes | https://books.toscrape.com/catalogue/sharp-objects_997/index.html |
| Sapiens: A Brief History of Humankind | 54.23 | GBP | 5 | Yes | https://books.toscrape.com/catalogue/sapiens-a-brief-history-of-humankind_996/index.html |
Next steps
- Open the CSV and check the columns.
- To send it to Google Sheets, follow
references/google-sheets-setup.md, setSPREADSHEET_ID, and run again without--csv-only. Re-runs add only new rows.
books.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
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.
- 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
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 days ago
- Accounts
GitHub
Google Drive
Feross
Dotenvx
Opencollective
- Software
Node.js 20+npm
- Optional
- Google accountGoogle Cloud project (Google Sheets output only)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.
Permissions
Allowed Hosts
File Scopes
All file access stays inside this skill's own folder. The agent edits scripts/src/parser.js (and the matching tests) to fit the target website, writes results to scripts/output/, and reads a .env settings file. credentials.json is read only if the user turns on Google Sheets output, and its contents are never printed or sent anywhere. Network access is limited to the website being scraped, the Google Sheets API, and the npm registry during npm install. Terminal access is used only to run npm install, npm test and node src/index.js.
What's inside
Frequently Asked Questions
New in Data & Databases
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.