Tutorial8 min read

How to Scrape a Website With OpenClaw

Short answer

To scrape a website with OpenClaw, ask the agent to use its built-in web_fetch tool for plain pages, its managed browser for pages that need JavaScript, or a skill that runs your own scraper script, such as a Playwright script for product listings. Add a proxy once a site starts limiting you: OpenClaw's managed browser ignores HTTP_PROXY and takes a --proxy-server flag in browser.extraArgs, and a script takes the proxy in its own code. ProxyField residential proxies work in both places 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
MethodUse it forJavaScriptWhere the proxy goes
web_fetch toolArticles, docs and other server-rendered pagesNoNot for scraping proxies (see below)
browser toolPages that render with JavaScript, clicks, scrollingYesbrowser.extraArgs: --proxy-server=...
A skill that runs a scriptRepeatable jobs: product listings, price lists, many URLsWith PlaywrightInside the script
On this page 10 sections
  1. What OpenClaw is and which tools scrape
  2. Method 1: web_fetch for static pages
  3. Method 2: the OpenClaw browser for JavaScript pages
  4. Method 3: a coding skill that scrapes product listings
  5. How to add a proxy to OpenClaw
  6. Installing scraping skills from ClawHub
  7. When OpenClaw scraping gets blocked
  8. What your OpenClaw agent may collect
  9. Sources
  10. How to Scrape a Website With OpenClaw FAQ

What OpenClaw is and which tools scrape

OpenClaw is a self-hosted gateway that connects chat apps such as Discord, Slack, Signal, Telegram and WhatsApp to AI agents: you run one Gateway process on your own machine and message your assistant from anywhere. Its documentation separates three things:

  • Tools are "callable actions," such as exec, browser, web_search and web_fetch.
  • Skills are "a SKILL.md instruction pack loaded into the agent prompt": they teach the agent a workflow with the tools it already has.
  • Plugins add new capabilities, including extra tools and web fetch or web search providers.

For scraping, that gives you three methods, from the quickest to the most repeatable.

Method 1: web_fetch for static pages

web_fetch "does a plain HTTP GET and extracts readable content (HTML to markdown or text). It does not execute JavaScript." It is on by default. Ask the agent something like "fetch https://example.com/blog and list every post title with its date," and it calls:

JavaScript
await web_fetch({ url: "https://example.com/blog", extractMode: "markdown" });

What to know before you rely on it:

  • It runs Readability, which keeps the main content of a page and drops navigation, so it suits articles better than listing grids.
  • Output defaults to 20,000 characters (tools.web.fetch.maxChars), and results are cached for 15 minutes.
  • It blocks private and internal hostnames and re-checks every redirect.
  • For JavaScript-heavy or login-protected pages, the documentation sends you to the browser.

Method 2: the OpenClaw browser for JavaScript pages

The agent gets one browser tool with actions such as open, navigate, snapshot, act, text, requests and screenshot. A snapshot returns the page as a UI tree with element references, and act uses those references to click, type or select, so the agent can open a listing, scroll, click "next page" and read what loaded. browser text extracts visible text, up to 40,000 characters, and browser requests reads the page's network log, which often shows the JSON request behind a listing: a cleaner source than the rendered HTML.

Browser settings live in ~/.openclaw/openclaw.json. Local managed profiles run headless by default; set headless: false to watch the agent work.

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

Method 3: a coding skill that scrapes product listings

For a job you will repeat, such as product listings from one store every morning, a skill is the dependable route: the agent follows the same steps each time and runs your tested script instead of improvising. Skills live in your workspace skills/ folder, one directory per skill with a SKILL.md file.

~/.openclaw/workspace/skills/product-listings/SKILL.md:

---
name: product-listings
description: Scrape product names, prices and URLs from a category page into a CSV with the bundled Playwright script.
---

# Product listings

When the user asks for product listings from a category URL:

1. Read the site's robots.txt and stop if the category path is disallowed.
2. Use the `exec` tool to run:
   `python {baseDir}/scripts/listings.py "<category URL>" --pages 5 > listings.csv`
   The script reads the proxy from SCRAPER_PROXY_USER and SCRAPER_PROXY_PASS.
3. If the script prints a 403 or 429 status, stop and tell the user; do not retry in a loop.
4. Reply with the row count and the first 5 rows, and say where listings.csv was saved.

~/.openclaw/workspace/skills/product-listings/scripts/listings.py, a Playwright scraper:

Python
# pip install playwright && playwright install chromium
import csv, os, sys
from playwright.sync_api import sync_playwright

url = sys.argv[1]
pages = int(sys.argv[sys.argv.index("--pages") + 1]) if "--pages" in sys.argv else 1
proxy = {"server": "http://gate.proxyfield.io:7000",
         "username": os.environ["SCRAPER_PROXY_USER"],   # e.g. <login>-country-us-city-new_york
         "password": os.environ["SCRAPER_PROXY_PASS"]}

out = csv.writer(sys.stdout)
out.writerow(["name", "price", "url"])
with sync_playwright() as p:
    browser = p.chromium.launch(proxy=proxy)
    page = browser.new_page()
    for n in range(1, pages + 1):
        resp = page.goto(f"{url}?page={n}", wait_until="networkidle")
        if resp and resp.status in (403, 429):
            print("status", resp.status, file=sys.stderr)
            break
        for card in page.locator(".product-card").all():  # adjust selectors to the site
            out.writerow([card.locator(".title").inner_text(),
                          card.locator(".price").inner_text(),
                          card.locator("a").first.get_attribute("href")])
        page.wait_for_timeout(2000)
    browser.close()

Check that the skill loaded with openclaw skills list, then call it by name with /skill product-listings or simply ask for "product listings from" a URL. The selectors are examples: ask the agent to open one category page in the browser, take a snapshot and adjust .product-card, .title and .price to the real page before the first full run. More on Playwright itself: Playwright web scraping.

{baseDir} is resolved to the skill's own folder, so the skill keeps working wherever the workspace lives. To run the job on a schedule, OpenClaw's automations can start an agent turn at set times.

How to add a proxy to OpenClaw

OpenClaw has three proxy settings, and only two of them are meant for scraping traffic:

  1. The managed browser. The documentation is explicit: "Gateway/provider HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY environment variables do not automatically proxy the OpenClaw-managed browser." To proxy it, "pass explicit Chrome proxy flags through browser.extraArgs, such as --proxy-server=...." Chrome's flag takes an address but no username and password, so add your Gateway machine's IP to the ProxyField allowlist and use the plain gateway address, where <port> is the port you set up in the dashboard for that IP:

    {
      browser: {
        extraArgs: ["--proxy-server=http://gate.proxyfield.io:<port>"],
      },
    }

    The documentation adds that strict SSRF mode blocks explicit browser proxy routing unless private-network browser access is intentionally enabled, so check browser.ssrfPolicy if pages stop loading after the change.

  2. Your scripts. A script run by a skill takes the proxy in its own code, with full username and password support, as in the Playwright example above. This is the most flexible place: you can set the targeting per job in the username, as in <login>-country-us-city-new_york for New York. 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.

  3. Not for scraping: proxy.proxyUrl. This setting routes OpenClaw's own HTTP and WebSocket traffic through "an operator-managed forward proxy" for egress control and SSRF protection, which would also send your model API calls through it. Likewise, web_fetch only uses an environment proxy with useTrustedEnvProxy, meant for operator-controlled proxies. Leave both for network security, not for scraping IPs.

Installing scraping skills from ClawHub

ClawHub is the registry for OpenClaw skills and plugins. Search it from OpenClaw with openclaw skills search "scraper" and install a skill with openclaw skills install @owner/skill-name. A skill runs commands with your agent's permissions, so read its SKILL.md and scripts first, and check its ClawHub security audit: the audit shows the risk level, findings and the credentials a skill asks for, though ClawHub says audits "are not a guarantee that a release is risk-free." Never paste your proxy password into a skill file; keep it in environment variables or OpenClaw's secret store.

When OpenClaw scraping gets blocked

An agent that fetches a hundred pages in a minute from your home or server IP looks like what it is, and sites answer with rate limits, 429 Too Many Requests, 403 Forbidden or CAPTCHAs. Four fixes, in order:

  1. Slow down

    Tell the skill to wait between pages, as the example does.

  2. Use the site's own data request

    Browser requests often shows a JSON endpoint behind the page; fetching that is lighter than rendering every page.

  3. Rotate IPs

    Route the browser or the script through residential proxies, with a new IP per request for listings, or one sticky IP per session for multi-step flows.

  4. Stop on CAPTCHAs and logins

    Treat them as a sign the site does not want automated access there.

ProxyField gives OpenClaw those IPs through one gateway, gate.proxyfield.io:7000: HTTP, HTTPS or SOCKS5, username and password (or an IP allowlist, on the port you set up in the dashboard), a new IP on every request or sticky sessions from 30 s to 36 h, and targeting by country, region or city. You pay per GB with no subscription, and traffic never expires. All purchases are final. More on the setup: proxies for web scraping.

What your OpenClaw agent may collect

An agent scrapes under the same rules as any scraper: public pages are generally fine; getting past logins or blocks, ignoring terms you accepted and collecting personal data carry legal risk. See is web scraping legal and, for AI-specific questions, is AI scraping legal.

Get started: set up residential proxies for your OpenClaw browser or skill. Start with the Easy Trial: 1 GB for $2.95, no subscription.

Sources

How to Scrape a Website With OpenClaw FAQ

How do I scrape a website with OpenClaw?

ProxyField residential proxies, from $1.95/GB, come in at the last of three steps: to scrape a website with OpenClaw, ask the agent to use web_fetch for plain pages, its managed browser for JavaScript pages, or a skill that runs your own scraper script for repeat jobs. Once a site starts limiting you, route the browser or the script through rotating proxies; the Easy Trial is 1 GB for $2.95.

What is OpenClaw?

OpenClaw is a self-hosted gateway that connects chat apps to AI agents: you run one Gateway process on your own machine and message your assistant from apps such as Slack, Telegram or WhatsApp. The agent works with tools such as exec, browser and web_fetch, and you teach it workflows with skills.

Does OpenClaw work with web scraping tools?

Yes. Its exec tool runs any scraper installed on the machine, such as a Python script with requests, Scrapy or Playwright, and plugins can add web fetch providers. Wrapping the scraper in a skill tells the agent exactly when and how to run it.

How is a scraping skill different from OpenClaw's built-in web search?

Web search finds pages and returns results for the agent to read; it does not collect fields from a site page by page. A scraping skill runs a script you control against the URLs you choose and writes the data to a file, the same way every time.

Can OpenClaw scrape product listings with a coding skill?

Yes. Put a SKILL.md and a scraper script in your workspace skills folder, tell the skill to run the script on a category URL with the exec tool, and the agent returns the names, prices and URLs as a CSV. Test the selectors on one page before the first full run.

Can I use a Playwright scraper skill in OpenClaw?

Yes. A skill can run a Playwright script through the exec tool, and Playwright takes a proxy with a server, username and password in its launch options. Install Playwright and its browser on the Gateway machine first.

Does OpenClaw's browser use a proxy?

Not by default. The documentation says the HTTP_PROXY, HTTPS_PROXY and ALL_PROXY variables do not proxy the OpenClaw-managed browser; you pass Chrome's --proxy-server flag through browser.extraArgs, and because that flag carries no password, you authorize the machine's IP on the proxy's allowlist.

What messaging platforms does OpenClaw support?

OpenClaw's documentation lists Discord, Google Chat, iMessage, Matrix, Microsoft Teams, Signal, Slack, Telegram, WhatsApp and Zalo, among others. You can start a scraping skill from any of them and get the agent's reply in the same chat.

Can you use OpenClaw and n8n together?

Yes. OpenClaw's inbound webhooks let an external service wake an agent or submit a turn, so an n8n workflow can usually trigger a scraping skill and pass the result on. n8n suits fixed steps; the OpenClaw agent suits tasks that need judgment, such as adjusting selectors.

Is n8n better than OpenClaw for automation?

They do different jobs. n8n runs workflows you define step by step, which is predictable for scheduled scraping, while OpenClaw runs an AI agent that decides which tools to use, which helps when pages differ. You can also combine them: n8n for the schedule, the agent for the steps that need reading.

Easy Trial: 1 GB for $2.95.

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