/scraperapi:scraperapi-crawlerfrom ScraperAPI
Reference for ScraperAPI's Crawler product: automatically discovers and scrapes linked pages from a seed URL. Covers job creation, URL regex patterns, depth vs budget, per-page scraping parameters, job states, webhooks, scheduling, and credit costs.
Ships in ScraperAPI. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The Crawler discovers and scrapes linked pages automatically, starting from a seed URL and following links that match your regex pattern. Use it when you need data from many pages of a site but don't have the URLs upfront.
api.scraperapi.com).max_depth: 1.| Action | Method | URL |
|---|---|---|
| Start a crawl | POST | https://crawler.scraperapi.com/job |
| Cancel a crawl | DELETE | https://crawler.scraperapi.com/job/<jobId> |
Auth: include api_key in the JSON body (POST) or as a query parameter (DELETE).
Starting a job returns {"status": "initiated", "jobId": "<jobId>"}.
import requests
API_KEY = "YOUR_API_KEY"
job = requests.post(
"https://crawler.scraperapi.com/job",
json={
"api_key": API_KEY,
"start_url": "https://example.com/blog/",
"url_regexp_include": "(?<full_url>https?://example\\.com/blog/.*)",
"url_regexp_exclude": ".*\\.(pdf|png|jpg|zip)",
"max_depth": 3,
"crawl_budget": 500,
"api_params": {
"country_code": "us",
"render": False,
},
# Required: results are delivered to this webhook (see Webhooks)
"callback": {
"type": "webhook",
"url": "https://yourapp.com/crawler-results"
},
}
).json()
job_id = job["jobId"]
print(f"Started: {job_id}")
| Parameter | Description |
|---|---|
api_key | Your ScraperAPI key (read from env, never hardcode) |
start_url | Seed URL — where the crawl begins |
url_regexp_include | Regex defining which URLs to crawl (see patterns below) |
max_depth or crawl_budget | Must provide at least one; providing both applies whichever limit is hit first |
callback | {"type": "webhook", "url": "..."}. Only webhook callbacks are supported |
url_regexp_include and url_regexp_exclude are standard regexes. Include patterns must use
named capture groups: (?<full_url>...) for absolute URLs, (?<relative_url>...) for relative.
# All pages on a domain
(?<full_url>https?://example\.com/.*)
# Only blog posts
(?<full_url>https?://example\.com/blog/.*)
# Only HTML pages — exclude files by requiring no extension
(?<full_url>https?://example\.com/[^.]*$)
# Relative paths (for sites that use relative links)
(?<relative_url>/products/.*)
Exclusion patterns (url_regexp_exclude — plain regex, no capture group needed):
# Skip binary files
.*\.(pdf|png|jpg|jpeg|gif|svg|zip|mp4)
# Skip auth and admin pages
.*(login|logout|signup|admin|auth).*
Start with a narrow url_regexp_include and validate on a small test run before scaling up — a
pattern like .* will follow external links and crawl the entire internet.
Use max_depth when | Use crawl_budget when |
|---|---|
| Site structure is known and bounded | Site size is unknown |
| You want a specific section (e.g., 3 hops from landing page) | You want to cap credit spend |
| Small site | Large site with unpredictable link density |
Use both together for safe exploration: max_depth: 3, crawl_budget: 500 stops at whichever
limit is hit first.
Depth 0 = start URL only. Depth 1 = start URL + every page it links to. Depth 2 = one level deeper, and so on.
api_params)Controls how each discovered page is fetched. All standard ScraperAPI parameters are supported:
{
"render": true,
"premium": false,
"ultra_premium": false,
"country_code": "us",
"device_type": "desktop",
"output_format": "markdown"
}
Add render: true only if the site uses JavaScript to load content — it multiplies the credit
cost of every crawled page. Test without it first.
There is no documented endpoint for polling a crawl's progress. Track it through the webhook:
each scraped page arrives as its own payload, and a final summary payload arrives when the crawl
ends. Job states: delayed → running → completed / failed / cancelled → in delivery →
delivered.
callback is required. ScraperAPI POSTs to your endpoint as each page is scraped (not just at
the end). Per-page payloads include jobId, url, status, credits (this page's cost),
currentCost (running total) and currentDepth; failed pages carry a failReason.
The final summary payload includes jobId, jobState, jobCost, crawlBudget, and the
completed, cancelled and failed URL lists.
{
"callback": {
"type": "webhook",
"url": "https://yourapp.com/crawler-results"
}
}
The webhook URL must be publicly reachable. ScraperAPI retries failed deliveries, and a failed webhook does not stop the crawl itself. Results are stored for up to 7 days (a scheduled crawl's new results replace the previous ones), so save each payload as it arrives.
Omit schedule for a one-time crawl. Add it to run on a recurring interval:
{
"schedule": {
"name": "weekly-blog-crawl",
"interval": "daily"
}
}
Available intervals: once, hourly, daily, weekly, monthly. Scheduling requires a paid
plan — free accounts can only run one-time crawls at max_depth: 1.
Crawler credit cost = sum of all individual page requests in the crawl. Each page costs the
same as a direct Standard API call with the same api_params (render, premium, etc.), at the
site's rate: 1 on a normal site, 10 behind Cloudflare and similar, 5 on Amazon/Walmart/eBay.
Set crawl_budget to cap total credits. The crawl stops gracefully when the budget is reached —
it will not exceed it. 200 and 404 pages are charged; failed (500) ones are not.
Each webhook payload's credits field shows that page's cost and currentCost the total so far,
and the summary's jobCost gives the total; use them to calibrate crawl_budget for future runs.
If a single page would cost more than crawl_budget, the job fails to start.
| Code | Meaning | Action |
|---|---|---|
| 200 | Job created | Continue |
| 400 | Malformed request | Check required fields and regex syntax |
| 401 | Invalid API key | Check your API key |
| 403 | Free plan limit hit: max_depth above 1, or a schedule | Lower max_depth to 1, drop schedule, or upgrade |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub scraperapi/scraperapi-skills --plugin scraperapi20 skills in this plugin
/scraperapi-agent-onboardingEntry point for agents and developers new to ScraperAPI. Read first when integrating ScraperAPI into an agent or app, setting up the MCP server for Claude Code or other LLM tools, choosing the right ScraperAPI product, or getting an API key. Trigger on: "how do I use ScraperAPI", "set up ScraperAPI", "connect ScraperAPI to Claude", "which ScraperAPI product should I use", "get web data for my agent", "add web scraping to my project", "ScraperAPI getting started". After reading, route to the narrower skill that owns the chosen path. If the user already named a language or SDK, n8n, Zapier, or the sapi CLI, use that skill directly instead.
Note: Transmits user-supplied queries, URLs, and content to ScraperAPI.
/scraperapi-asyncReference for ScraperAPI's Async Jobs REST API: submit scraping jobs in the background and get results by polling or webhook, including batch jobs. Consult when the user is scraping many URLs, needs non-blocking requests, or wants webhook delivery. Use when user asks: "how do I scrape 1000 URLs with ScraperAPI", "ScraperAPI async jobs", "batch scraping with ScraperAPI", "submit a scraping job and poll for results", "ScraperAPI webhook callback", "ScraperAPI batchjobs endpoint". Covers single and batch jobs, webhook callbacks, apiParams, async-only parameters, binary responses, retention, and error handling. It is language-agnostic: for SDK client code, use the language's SDK skill; to crawl a whole site by following links, use scraperapi-crawler.
Note: Transmits user-supplied queries, URLs, and content to ScraperAPI.
Other plugins' skills for the same job