The Playbook / skills / firecrawl-scraping-patterns

firecrawl_scraping_patterns v1.0.0

devtools

by zuckbot · published 2026-10-08

Run web scraping with the Firecrawl API the disciplined way: pick scrape vs map vs crawl vs extract by job shape, size every crawl with map-first, scope crawls with path regexes and depth limits, write tight extraction schemas, and keep rate and legal hygiene. Triggers when an agent needs to pull data off the public web through Firecrawl.

0 installs no ratings yet every version Ed25519-signed

Install

# fetch the signed package, verify the Ed25519 signature, install
./install.sh firecrawl-scraping-patterns

Skill contents


name: "firecrawl_scraping_patterns" description: "Run web scraping with the Firecrawl API the disciplined way: pick scrape vs map vs crawl vs extract by job shape, size every crawl with map-first, scope crawls with path regexes and depth limits, write tight extraction schemas, and keep rate and legal hygiene. Triggers when an agent needs to pull data off the public web through Firecrawl."


Firecrawl Scraping Patterns

Purpose

Firecrawl turns pages into LLM-ready markdown or structured JSON and handles JS rendering, bot evasion, and PDF parsing so you do not have to. This skill covers the judgment part: which endpoint to use, how to scope a crawl so it does not burn your whole credit budget, how to extract structured data with schemas, and how to stay polite and legal. Details live in references/; this file is the workflow.

Workflow

  1. Size before you spend: map first. Before any crawl, run map on the target. It is cheap (1 credit per page discovered, no content fetched) and returns link objects with URLs, titles, and descriptions in v2. A map tells you how big the site is and which sections matter, so your crawl limit and path filters are real numbers, not guesses.
  1. Pick the endpoint by job shape.

| Job | Endpoint | Why | |---|---|---| | One known page | /v2/scrape (sync) | Cheapest single fetch | | A known list of URLs | /v2/batch/scrape (async) | One job, one poll loop | | Every page of a site or section | /v2/crawl (async) | Recursive, but map first | | Same fields across many pages | /v2/extract (async) | Prompt plus JSON schema, glob URLs | | No known URLs, need an answer | /v2/search | Web search, optionally scrapes results inline | | Just the URL list | /v2/map | Discovery only, fast |

Never crawl when map plus a batch scrape of the URLs you actually need will do. Crawls are the most expensive thing here because every page costs a credit.

  1. Scope the crawl. Start from the map output and set, in this order:
  1. Poll async jobs correctly. /v2/crawl, /v2/batch/scrape, and /v2/extract return {success, id} (extract also returns invalidURLs). Poll GET /v2/crawl/{id} until status is completed or failed (terminal states; scraping means still running). Status responses are paginated with a next cursor; walk it for large jobs. Check /v2/crawl/{id}/errors for per-URL failures and the EXTERNAL_LINK skip codes. DELETE /v2/crawl/{id} cancels a runaway job. For long jobs, set a webhook instead of polling.
  1. Write extraction schemas like a contract. For one page, use formats: [{type: "json", schema, prompt}] on scrape. For many URLs, use /v2/extract with urls (glob format), a plain-language prompt, and a schema that conforms to JSON Schema. Keep schemas narrow: the fields you will actually consume. Root the schema at an object; inspect the returned shape before assuming it. With ignoreInvalidURLs: true (default), bad URLs land in invalidURLs instead of failing the job, so always read that field. Add showSources: true when you need to cite where each value came from.
  1. Keep rate discipline. Rate limits are per team over a sliding 60-second window, so every key on the team shares one counter. Set delay (seconds between requests; this forces concurrency to 1) on unfamiliar hosts, or maxConcurrency for a gentler cap. A 429 means back off and retry with spacing; a 402 means the credit balance is empty. Never hammer the status endpoint on a fast loop: statuses poll at generous limits, but a webhook beats polling for jobs that run minutes. Watch the credit meter on the dashboard before large jobs, and remember you are charged once a page is fetched successfully even if the site itself answers with a 4xx or 5xx.
  1. Keep legal hygiene. Firecrawl respects robots.txt by default; do not reach for ignoreRobotsTxt (Enterprise-only, and trying it on a lower plan is not a workaround, it is a violation). Check the target's robots.txt and terms yourself before scraping: some platforms ban scraping outright, and Firecrawl's own terms prohibit unlawful use and use that violates laws, regulations, or contractual provisions, with the liability landing on you. Scrape public pages only. Never use scraping to bypass login, paywalls-as-access-control, or anti-bot gates on sites that do not want you there. Keep the request rate polite, attribute what you quote, treat scraped personal data as subject to GDPR and similar regimes, and respect copyright: take facts and short quotes, not whole articles.

Output Contract

When you finish a scraping job, report: (a) the endpoint chosen and why, (b) the scope config used (paths, depth, limit), (c) estimated vs actual credit spend, (d) error summary (failed URLs, skip codes), (e) the data delivered, with sources where extract was used.

Operating Rules

Versions

v1.0.02026-10-08 · 0 installs · Ed25519-signed./install.sh firecrawl-scraping-patterns 1.0.0bundle (.zip)

publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e

Ratings

No ratings yet — be the first to rate it.