Tutorial8 min read

Web Scraping With Claude

Short answer

Claude can scrape websites in three ways: it reads single pages with its web fetch and web search tools, it drives a browser through Claude in Chrome, the browser use tool or a browser MCP server, and in Claude Code it writes and runs a full scraper on your own machine, which you can save as a skill and reuse. It does not force its way past sites that block it: Claude in Chrome pauses at logins and CAPTCHAs and hands them to you, and Anthropic's crawlers respect anti-bot measures. When Claude's scraper runs at volume, ProxyField residential proxies give it rotating IPs from $1.95/GB; start with the Easy Trial: 1 GB for $2.95.

residential IPs
412M+
from, traffic never expires
$1.95/GB
Easy Trial
1 GB for $2.95
At a glance
Claude toolWhat it does for scrapingJavaScript pagesWhere the requests come from
Web fetch tool (Claude API)Reads the full text of a URL or PDF into the conversationNoAnthropic's servers
Web search tool (Claude API)Finds pages and answers with citations–Anthropic's servers
Claude in Chrome, Claude Code with ChromeOpens tabs in your Chrome, reads and extracts data, fills formsYesYour browser
Browser use tool (Claude API)Lets Claude navigate and act in a browser your application runsYesYour browser setup
Claude Code (WebFetch, Bash)Fetches pages, writes and runs scraping scriptsWith a browser libraryYour machine
SkillsPackages a scraping workflow and its scripts for reuseDepends on the scriptWhere the skill runs
MCP serversConnect Claude to browser and fetch servers, such as Playwright MCPBrowser servers: yesWhere the server runs
On this page 10 sections
  1. Can Claude scrape websites? What each tool does
  2. Web fetch and web search: reading pages, not crawling sites
  3. Claude Code: let Claude write and run the scraper
  4. A Claude scraper skill
  5. Claude with MCP: browser servers for JavaScript pages
  6. Claude in Chrome: pages you are signed in to
  7. Do websites block Claude, and when do you need proxies?
  8. What Claude and your scraper may collect
  9. Sources
  10. Web Scraping With Claude FAQ

Can Claude scrape websites? What each tool does

Yes, but which Claude you use decides how far it goes. A chat can read pages for you; Claude Code can build and run a scraper; the API tools let you build Claude into your own pipeline. The table above sums it up; the sections below show how each one works and where a proxy fits.

One rule holds for all of them: Claude is good at reading pages, extracting fields and writing scraping code, and the volume work, a queue of thousands of URLs that runs every day, belongs in a script.

Web fetch and web search: reading pages, not crawling sites

On the Claude API, two server tools bring web content into the conversation:

  • Web fetch "allows Claude to retrieve full content from specified webpages and PDF documents." Claude fetches only URLs that already appeared in the conversation, and the tool "currently does not support websites dynamically rendered with JavaScript." You can cap it with max_uses, limit it to allowed_domains and truncate long pages with max_content_tokens. Web fetch costs nothing beyond standard token costs.
  • Web search finds pages and answers with citations, for $10 per 1,000 searches plus token costs.

Both run on Anthropic's side, so you cannot add a proxy to them, and both suit a few pages per request, not a crawl. When a question to Claude needs a web page, Anthropic says Claude "may access websites using a Claude-User agent," which site owners can block in robots.txt.

Claude Code: let Claude write and run the scraper

Claude Code is where Claude becomes a practical scraper, because it runs on your machine with the same network access as any other program. Two of its tools matter here:

  • WebFetch fetches a URL, converts the page to Markdown and runs your extraction prompt over it in a separate model call. Anthropic calls it "lossy by design": Claude receives the extracted answer, not the raw page. It reads up to 100,000 characters per call and caches each response for 15 minutes.
  • Bash runs anything you could run in a terminal, including curl for the raw HTML and the Python or Node.js scrapers Claude writes.

A good session looks like this: ask Claude to fetch one page with curl and save it, let it study the HTML and write a scraper, run the scraper on a small sample, check the output, then run the full job. Claude fixes errors as they come up, and you review each command before it runs.

Put the proxy in the scraper, not in Claude Code's environment. Claude Code respects the standard HTTPS_PROXY and HTTP_PROXY variables for its own traffic, so setting them before you launch it would also send Claude Code's connection to Anthropic through the proxy and spend proxy traffic on it. Give the proxy to the script instead:

Python
# scrape.py: written by Claude, run by Claude Code through Bash
# pip install requests beautifulsoup4
import json, os, sys
import requests
from bs4 import BeautifulSoup

PROXY = os.environ["SCRAPER_PROXY"]  # http://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000
proxies = {"http": PROXY, "https": PROXY}

for url in sys.argv[1:]:
    html = requests.get(url, proxies=proxies, timeout=30).text
    soup = BeautifulSoup(html, "html.parser")
    title = soup.title.string if soup.title else None
    print(json.dumps({"url": url, "title": title, "h1": [h.get_text(strip=True) for h in soup.find_all("h1")]}))

Run it with SCRAPER_PROXY=... python scrape.py https://example.com/a https://example.com/b, so only the scraper's requests use the proxy. <login>-country-us-city-new_york in the username asks the ProxyField gateway for a New York IP; other targeting in the username: -region-<region>, -session-<id> and -ttl-<seconds> (30 to 129,600 seconds, 20 minutes by default) after the location, as in <login>-country-us-region-new_york-city-new_york-session-he9f2qga-ttl-600. For JavaScript-heavy pages, ask Claude for a Playwright version; the proxy setup is in Playwright proxy setup.

Easy Trial: 1 GB for $2.95.
Try for the price of 1 GB, no subscription, traffic never expires.

A Claude scraper skill

A skill is a folder with a SKILL.md file of instructions, plus any scripts and reference files it needs. Claude loads the skill's name and description at startup and reads the rest only when a request matches, so a scraper skill costs almost nothing until you use it. In Claude Code, personal skills live in ~/.claude/skills/ and project skills in .claude/skills/.

A minimal scraper skill, .claude/skills/page-scraper/SKILL.md:

---
name: page-scraper
description: Scrape public web pages into JSON lines with the bundled script. Use when the user asks to scrape, extract or collect data from one or more URLs.
---

# Page scraper

1. Check that the user named public pages, and read the site's robots.txt first.
2. Run `python scripts/scrape.py <url> [<url> ...] > out.jsonl`. The script reads the
   proxy from the SCRAPER_PROXY environment variable; never print its value.
3. Fetch at most one page every 2 seconds per site. Stop on 403 or 429 responses
   and report them instead of retrying in a loop.
4. Show the user the first 5 records, then write the rest to the file they asked for.

Put the script from the previous section in .claude/skills/page-scraper/scripts/scrape.py, and ask Claude to "scrape these three URLs". Where the skill can reach the network depends on where it runs: in Claude Code it has your machine's network access; skills on the Claude API run "in a sandboxed container with no network access"; on claude.ai, network access depends on your settings. Before you install a skill someone else wrote, read every file in it, as Anthropic recommends, and look for network calls that do not match its purpose.

Claude with MCP: browser servers for JavaScript pages

The Model Context Protocol lets Claude call tools on an MCP server, and browser servers give it a real browser. To add Microsoft's Playwright MCP server to Claude Code:

Shell
claude mcp add playwright npx @playwright/mcp@latest

Claude can then open pages, take accessibility snapshots, click and read rendered content. To route that browser through a proxy, start the server with its --proxy-server option, for example --proxy-server=http://gate.proxyfield.io:<port> with your server's IP on the ProxyField allowlist, where <port> is the port you set up in the dashboard, or pass a username and password through the server's configuration file. Setup for each client, other servers and how to choose: MCP servers for scraping.

Claude in Chrome: pages you are signed in to

Claude Code can connect to the Claude in Chrome extension and work in your own browser: it "opens new tabs for browser tasks and shares your browser's login state." Anthropic lists data extraction among its uses: "pull structured information from web pages and save it locally." The actions run in a visible Chrome window, and "when Claude encounters a login page or CAPTCHA, it pauses and asks you to handle it manually."

This is the right tool for small jobs on sites you use, such as a report inside a web app you have an account with. Collect only data your account is entitled to, and check the site's terms first. Because the extension uses your browser, the requests come from your IP, or from whatever proxy your Chrome uses (Chrome proxy setup).

Do websites block Claude, and when do you need proxies?

Websites can block Anthropic's own robots by name. Anthropic lists three: ClaudeBot collects content that may be used for training, Claude-User fetches pages when users ask Claude something, and Claude-SearchBot improves search results. All three honor robots.txt, and Anthropic says its bots "respect anti-circumvention technologies."

Scrapers that Claude writes are a different matter: they run as ordinary programs from your machine, so sites see your IP and your request rate. A few pages work from your own connection. Hundreds or thousands from one site will run into rate limits and errors such as 429 Too Many Requests unless the requests are paced and spread over many IPs.

ProxyField gives Claude's scraper those IPs through one gateway, gate.proxyfield.io:7000: a new IP on every request or a sticky session from 30 s to 36 h, over HTTP, HTTPS or SOCKS5, with unlimited concurrent threads. Residential proxies start at $2.95/GB for 1 GB and fall to $1.95/GB from 1,000 GB, with no subscription, and the traffic never expires. All purchases are final.

What Claude and your scraper may collect

Claude's tools do not change the rules: public pages are generally fine to read; getting past logins or blocks, ignoring terms you accepted, or collecting personal data carries legal risk. Read is web scraping legal for the general rules and is AI scraping legal for using models on scraped data.

Get started: let Claude write the scraper, then run it through residential proxies. Start with the Easy Trial: 1 GB for $2.95; traffic never expires.

Sources

Web Scraping With Claude FAQ

Can Claude scrape websites?

ProxyField residential proxies, from $1.95/GB, are what a Claude-written scraper runs through at volume: Claude can scrape websites page by page in a chat, and at volume through a scraper that Claude Code writes and runs on your machine. That scraper runs best through rotating IPs, and the Easy Trial is 1 GB for $2.95.

What is a Claude scraper skill?

A folder with a SKILL.md file that tells Claude how to scrape, plus the scripts it runs, such as a Python scraper that writes JSON lines. Claude loads the skill only when a request matches its description, so you can keep a tested scraping workflow ready without repeating instructions in every chat.

How do I use Claude for data scraping?

For a few pages, give Claude the URLs and ask for the fields you need. For a real job, open Claude Code, let it save one page with curl, write a scraper from the HTML, test it on a sample and then run the full list, with the proxy set inside the script.

What software do I need for Claude web scraping?

For chat-based reading, only Claude. For scraping at volume, Claude Code plus Python or Node.js and the libraries Claude chooses, such as requests and Beautiful Soup or Playwright; for work in your own browser, the Claude in Chrome extension; and for many sites, a proxy service.

Do I need a paid Claude account for web scraping?

It depends on the tool. On the Claude API, web fetch costs only standard token costs and web search costs $10 per 1,000 searches plus tokens. Which Claude app plans include Claude Code and Claude in Chrome is listed on Anthropic's pricing page.

Is Claude's browser use tool hosted by Anthropic?

No. The browser use tool lets Claude navigate and act in "a browser that your application runs," so the browser runs in your environment and Claude sends it actions such as navigate, read_page and left_click. Web fetch and web search, by contrast, run on Anthropic's side.

Does Claude's browser use tool have a residential proxy setting?

Not in the tool itself, because your application launches the browser. Set the proxy where you start that browser, for example in Playwright's launch options with the server, username and password, and every page Claude opens goes through it.

Does a residential proxy also route my requests to the Claude API?

Only if you set it globally. Claude Code respects HTTPS_PROXY and HTTP_PROXY for its own traffic, so a proxy set in those variables carries Claude's API connection too; set the proxy inside the scraper or the browser launch instead, so only the scraping traffic uses it.

Can Claude scrape JavaScript-heavy pages?

Not with web fetch, which "currently does not support websites dynamically rendered with JavaScript." Use a real browser instead: Claude in Chrome, the browser use tool, a browser MCP server such as Playwright MCP, or a Playwright script that Claude Code writes.

Do websites block Claude?

They can. Site owners can block ClaudeBot, Claude-User and Claude-SearchBot in robots.txt, and Anthropic's bots honor it. A scraper Claude writes is blocked like any other script when it sends too many requests from one IP, which pacing and rotating proxies prevent.

Show 1 more questionShow fewer questions

What are alternatives to Claude for AI-powered scraping?

Other assistants follow the same pattern: ChatGPT reads pages and writes scrapers, OpenClaw runs an agent with a browser and skills on your own machine, and any MCP client can drive a browser server. Whichever you pick, the scraping at volume runs as code with proxies.

Easy Trial: 1 GB for $2.95.

Try for the price of 1 GB, no subscription, traffic never expires.