Skip to content

How to scrape a website to CSV in Claude

How-ToToolRouter Editorial Team
How to scrape a website to CSV in Claude

Source review · Checked . Based on the linked documentation and tool definitions. Examples are illustrative unless a run receipt is provided. Editorial standards

To scrape a website into a CSV in Claude, connect ToolRouter, collect the listing URLs you are allowed to fetch, then call Web Scraper extract_data with a schema that includes a source URL on every row. Ask Claude to emit CSV only after you have checked row counts, required fields, and blanks against those URLs.

This rewrite is source-reviewed against the Web Scraper skills and Firecrawl Extract. It is not a live crawl. The prompt is illustrative. Collect only public pages you have a right to use, and follow the site's terms and robots rules.

Connect, then bound the job

Follow Connect Claude and enable ToolRouter in the conversation. Confirm Web Scraper is in the catalog Claude loaded. The Claude endpoint is policy-filtered, so availability can differ from other clients.

All Web Scraper skills used here are paid. Successful calls are billed at max($0.005, provider cost); failed paid calls do not charge. See Billing and pricing.

extract_data requires urls (a non-empty array) and either a JSON schema or a plain-language prompt. The handler forwards those fields to Firecrawl's extract endpoint. Firecrawl documents glob URLs such as https://example.com/* as a broader crawl; that path is experimental on their side. Prefer an explicit list of listing pages you already inventoried.

Useful inventory skills:

SkillRequired inputDefault boundWhat you get
map_siteurl1000 URLsLink list, no page bodies
crawl_siteurl50 pagesMarkdown/HTML per discovered page
extract_dataurls plus schema or promptOne call over the URLs you passStructured object or array matching your schema
scrape_pageurlOne pageMarkdown/HTML to inspect before you lock a schema

crawl_site also accepts maxDepth, includePaths, and excludePaths. Use path filters when the directory lives under /blog or /docs rather than crawling the whole host.

Schema, then a CSV you can check

Declare the columns you will keep, including the page the value came from. Example shape for a public directory:

json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "url": { "type": "string" },
          "location": { "type": "string" },
          "source_url": { "type": "string" }
        },
        "required": ["name", "source_url"]
      }
    }
  }
}

Paginated indexes are extra URLs. extract_data has no pagination parameter. Map or crawl first, keep every ?page= (or equivalent) you care about, then pass that list. A single first page is a first-page extract.

After the skill returns, validate before you trust the file:

  1. URL count vs row count. If you sent 12 listing URLs and got 9 records, list which URLs produced nothing.
  2. Required fields. name and source_url present on every row.
  3. Blanks. Empty location is empty, not guessed.
  4. Spot-check. Open three source_url values and compare the live text to the row.

Claude can format the checked array as CSV. Keep the evidence URL column in the file you save.

Connect your assistant, then try the task described in this guide.

Illustrative prompt

text
Use ToolRouter Web Scraper.
1. Call map_site on https://example.com/directory with search "directory" and limit 50.
2. From that list, keep only public listing pages (no login or cart paths).
3. Call extract_data on those URLs with a schema for name, url, location, source_url.
4. Return CSV with those columns.
5. Also return: URLs requested, records returned, rows missing required fields,
   and any URL that produced zero rows.
Do not fill blank cells. If a call fails, report the error and stop.

For turning company domains from that sheet into sourced contacts, continue with How to research leads in Claude. Open Web Scraper after you connect at toolrouter.com/connect.

*Source-reviewed 13 September 2026 against the Web Scraper skill contract and Firecrawl Extract docs linked above. Not a live Claude crawl.*

T
Product documentation and research
Share this article

Related Posts