How-to seriesDecember 2, 2026
How to scrape websites with Claude
One copy-paste prompt for web scraping with Claude or Claude Code: it asks what you need, connects Vaaya, then reads pages under a cost ceiling.
Claude can write a scraper, read a page you give it and turn messy HTML into a clean table. On its own it reads one page at a time with its built-in fetch tool, often fails on pages with bot protection, and cannot crawl a whole site. The prompt below asks what you need, connects Vaaya for paid scraping tools, and keeps every call under a ceiling you set.
The prompt
Paste this into Claude Code, claude.ai or Claude Desktop.
Help me scrape a website. Work in three stages and do not skip ahead.
Stage 1. Ask me these questions in one message, then wait:
1. Which site or URLs? A list of pages, or one site and a section?
2. Which fields do you need from each page (for example name,
price, date)?
3. About how many pages, and is this a one-off or a repeat job?
4. What format do you want back: CSV, JSON or a table in the chat?
5. What is the most you want to spend, in dollars?
Stage 2. Check whether you have the Vaaya tools `consult` and `use`.
If you do not, stop and tell me:
"Sign up at https://vaaya.ai, then connect Vaaya.
- Claude Code: run
claude mcp add --transport http vaaya https://vaaya.ai/mcp
(or npx -y @vaaya/mcp install --only=claude-code), restart
Claude Code, run /mcp, select vaaya and sign in.
- claude.ai or Claude Desktop: go to Customize > Connectors, click
the plus button, then Add custom connector. Name it Vaaya, paste
https://vaaya.ai/mcp and click Add. Click Connect and sign in.
In this chat, open the plus menu > Connectors and turn on Vaaya.
Tell me when it is connected."
Then wait until I say it is connected, and check the tools again.
Stage 3. Do the scrape step by step.
1. Read the site's robots.txt. Tell me if it disallows the pages I
want. Skip disallowed pages and pages behind a login.
2. Call `consult` with the job in plain words: the site, the fields,
the page count and the budget. It is free and runs nothing.
3. Show me the plan: each call, its price and the total. Wait for my
OK before you spend anything.
4. If I gave a site instead of URLs, map it first and tell me how
many pages match before you read them.
5. Read 2 or 3 pages with `use` and a `max_cost_cents` ceiling. Show
me the fields you pulled and wait for my OK.
6. Read the rest. Retry blocked pages with an unblocking tool only if
the budget allows.
7. Check every row. A challenge page such as "Just a moment..." is a
failed read. Leave missing fields empty. Do not guess.
8. Return the data in my format, a list of pages that failed and
why, and the total Vaaya charge.
Step 1: Claude asks what it needs
The fields decide the tool. A page of prose needs a reader that returns markdown. A product grid needs a renderer that runs JavaScript. The page count decides whether this is a list of URLs or a crawl with a cap. The budget becomes the ceiling Claude checks before each paid call.
Step 2: Claude checks for Vaaya
consult plans a job and quotes its price for free. use runs one call, never above its max_cost_cents, and a failed call is not charged. If the tools are missing, Claude gives you the setup steps from the install page. Without Vaaya, Claude Code can still write a Python or Node scraper for simple public pages. That is free, but blocks and JavaScript rendering are then yours to handle.
Step 3: Map, sample, then read
Prices are as consult quoted them, at the time of writing (December 2026).
For a whole site, Claude lists the URLs first. For "list all the page URLs on a site without scraping their content", consult picked firecrawl/map at about 1¢. Then Claude reads a small sample so you can check the fields.
For "scrape these 3 pages as markdown", consult picked vaaya/onescrape (OneScrape) at 2¢ per URL, 6¢ for the three. It takes 1 to 5 URLs and tries a plain fetch, then a JavaScript renderer, then an anti-bot fetch. If every URL comes back blocked, the call is not charged. For one page, consult picked jina/read (Jina Reader) at about 1¢, or firecrawl/scrape at 1¢ for a JavaScript-heavy page. For static article pages it picked exa/contents (Exa contents) at 0.1¢ per URL, about 1¢ for three.
Step 4: Blocked pages and bigger jobs
For a page behind a Cloudflare challenge, consult picked brightdata/unblock (Bright Data Web Unlocker) at about 0.15¢ a call. Vaaya checks the call against a 2¢ price first, so its max_cost_cents must be at least 2.
For "crawl the /guides section of a docs site, up to 20 pages, with a 60 cent budget", consult picked vaaya/onescrape-deep with budgetCents: 60. It maps the site, then reads each page through the full ladder in the background. Each page costs the price of the rung that read it, and a page no rung could read costs nothing. The job cannot charge more than budgetCents. Claude waits for the job instead of starting it again.
As arithmetic: a 1¢ map, three sample pages (6¢) and that 60¢ deep job come to 67¢ at most. That is an example plan, not a receipt.
Scrape responsibly
Respect robots.txt and the site's terms. Scrape public pages, keep the volume to what you need, and do not collect personal data without a reason. OneScrape refuses social platform URLs and documents such as PDFs, and does not charge for them. Pages that need a click or a login belong in a browser session, and only on accounts you are allowed to use.
Related: the tools catalog, pricing, the best way to scrape a website with an AI agent, how to extract web content and let Claude pay for tools over MCP.
Questions
Is Claude good for web scraping?
Claude is good at deciding what to extract, writing scraper code and cleaning messy pages into a table. Its built-in fetch reads one page at a time, often fails on pages with bot protection, and does not crawl a site. Paid scraping tools cover those parts.
Can Claude Code scrape a website?
Yes. Claude Code can write and run a scraper on your machine, which works for simple public pages. For pages that block scripts, pages that need JavaScript and crawls of a whole site, it can call scraping services through Vaaya and pay per page.
What should I check before scraping a site?
Read the site's terms and its robots.txt. Scrape public pages only, keep the request rate low, and do not collect personal data you have no reason to hold. The prompt below has Claude check robots.txt before it reads anything.
How much does web scraping with Claude cost through Vaaya?
At the time of writing (December 2026), consult quoted 2¢ per URL for vaaya/onescrape, about 1¢ a page for jina/read and firecrawl/scrape, and about 1¢ to map a site with firecrawl/map. A deep crawl never charges more than the budget you set. Claude shows you the plan and its price before it spends.