/scraperapi:scraperapi-research-agentfrom ScraperAPI
Sets up a Python script that plans Google searches, scrapes top sources via ScraperAPI, uploads them to Anthropic Files API, and generates a cited markdown report. For standalone repeatable research outside the chat.
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.
Read when SKILL.md points to them.
End-to-end autonomous research: ScraperAPI finds and fetches sources → Anthropic Files API ingests them as cited documents → Claude synthesizes a report.
Run it: save the script from references/research-agent-script.md
as research_agent.py in the user's project, then:
# Install dependencies (a recent anthropic SDK: the script uses the Files API)
pip install -U requests anthropic
# Replace YOUR_API_KEY and YOUR_ANTHROPIC_API_KEY at the top of research_agent.py
# Run
python research_agent.py \
--question "What are the best practices for rate limiting in web APIs?" \
--max-sources 5 \
--output report.md
Before starting a research run, establish:
--max-sources (5). Do not loop indefinitely.1. PLAN
↓ Claude decomposes the question into 2–3 targeted search queries
2. DISCOVER
↓ ScraperAPI google/search structured endpoint → list of (url, title, snippet)
3. DEDUPLICATE
↓ Filter to top N unique URLs (default: 5), skipping PDFs and low-quality domains
4. FETCH
↓ ScraperAPI scrape each URL as markdown (output_format=markdown)
↓ Skip pages returning < 200 characters (blocked, error pages)
5. UPLOAD
↓ Upload each scraped page to Anthropic Files API as a text/plain artifact
↓ Store file_id for each source
6. SYNTHESIZE
↓ Claude (claude-opus-4-8, adaptive thinking) reads all document artifacts
↓ Returns structured report with inline citations [1], [2]...
7. CLEAN UP
↓ Delete uploaded file artifacts from Anthropic
↓ Write or print the final report
STOP when: max_sources reached, or all queries exhausted (whichever comes first).
The agent stops when any of the following is true:
--max-sources reached (default: 5): that many pages scraped successfully.2 × --max-sources URLs from the searches, then stops even if fewer pages succeeded.Together these bound a run: at most 3 searches and 2 × --max-sources page fetches, so --max-sources is the credit cap.
| Flag | Default | Description |
|---|---|---|
--question | (required) | Research question |
--max-sources | 5 | Max pages to scrape (credit budget) |
--output | stdout | Write report to file |
--country | us | ScraperAPI country code for geo-targeted results |
--model | claude-opus-4-8 | Anthropic model for synthesis |
See assets/report_template.md for the report structure.
The report is a markdown document with:
[N] citationsScraperAPI credits per run, from the public credit costs:
| Sources | Searches (1–3 × 25) | Page fetches, normal sites (1 each) | ScraperAPI total | Anthropic tokens |
|---|---|---|---|---|
| 3 | 25–75 | 3–6 | ~28–81 | ~15K in / ~2K out |
| 5 | 25–75 | 5–10 | ~30–85 | ~25K in / ~3K out |
| 10 | 25–75 | 10–20 | ~35–95 | ~50K in / ~5K out |
Page fetches range up to 2 × --max-sources because the script tries extra candidates when a page fails. Pages behind bot protection cost 10 credits each, so a run on protected sites can reach 75 + 20 × --max-sources. Only successful (200) and not-found (404) responses are charged.
GET https://api.scraperapi.com/structured/google/search — finds source URLsGET https://api.scraperapi.com/?output_format=markdown — fetches page contentSee ScraperAPI docs for rate limits and credit costs.
Requires an Anthropic API key with access to claude-opus-4-8 and the Files API.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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