Quickstart
import { Steps, Aside } from ‘@astrojs/starlight/components’;
From zero to a working html scrape, then an analyse call. Use browser when the page needs JavaScript or interaction.
-
Get an API key
- Sign up and confirm your email.
- Open API keys and click Generate key.
- Copy the plaintext
sf_…value shown on creation.
You can also call the API from the dashboard’s built-in Run scrape page (no key required — the browser session is bound to your account), but for anything outside the browser you need a bearer token.
-
First scrape — html
The action DSL maps each output key to a selector string:
"selector@extractor"(CSS by default — nocss=prefix needed).Terminal window curl -sS -X POST https://api.scrapesilo.com/scrape \-H "Authorization: Bearer sf_…" \-H "Content-Type: application/json" \-d '{"url": "https://scrapesilo.com/fixtures/article","engine": "html","actions": {"title": "h1","body": "p","cta": "a.sf-cta@href"}}'/scrapealways returns an array (one item per URL):[{"url": "https://scrapesilo.com/fixtures/article","data": {"title": "How to pin an article field","body": "This lead is the body field. Select the first paragraph after the heading.","cta": "https://scrapesilo.com/docs/quickstart"},"tookMs": 312,"executionId": "ex_…","antibot": []}]Open the /executions page in the dashboard to inspect the full request/result/error JSON for the run.
-
Interpretation — analyse
For outlines, summaries, or “is X present?” use
POST /analyse(or the MCPanalysetool). That is a separate surface — scrape only runs anactionsplan. Do not sendqueryon/scrape.Terminal window curl -sS -X POST https://api.scrapesilo.com/analyse \-H "Authorization: Bearer sf_…" \-H "Content-Type: application/json" \-d '{"url": "https://scrapesilo.com/fixtures/prose","query": "Outline the article sections and state the main claim in one sentence."}' -
Need JS or clicks? Use browser
htmlis a plain HTTP fetch — no JavaScript. Switch to"engine": "browser"when the page is a SPA, needs clicks/fills, or fields come back empty. Sameactionstree; 5 credits per URL. See Engines.
Every scrape spends credits from your plan’s monthly pool (the free tier starts with 1,000). Cost depends on the engine — html is 1 credit, analyse is 3, browser is 5.
Copy for an agent
Section titled “Copy for an agent”ScrapeSilo API: https://api.scrapesilo.comAuth: Authorization: Bearer $SCRAPESILO_API_KEY
Rules:- POST /scrape extracts exact fields. Required: url, engine ("html" | "browser"), actions. No query field. CSS selectors, no css= prefix (e.g. h1@text). Response is always an array of { url, data, tookMs, executionId, antibot }.- POST /analyse interprets a page (outline, summary, flags). Required: url, query. Not a CSS plan.- Credits per URL: html 1, analyse 3, browser 5. Use browser only when the page needs JS or interaction.
curl -sS -X POST https://api.scrapesilo.com/scrape \ -H "Authorization: Bearer $SCRAPESILO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://scrapesilo.com/fixtures/article", "engine": "html", "actions": { "title": "h1", "body": "p", "cta": "a.sf-cta@href" } }'
curl -sS -X POST https://api.scrapesilo.com/analyse \ -H "Authorization: Bearer $SCRAPESILO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://scrapesilo.com/fixtures/prose", "query": "Outline the article sections and state the main claim in one sentence." }'Where to next
Section titled “Where to next”- Engines — pick HTML or Browser.
- Actions DSL — full selector + attribute reference.
- Pricing & quotas — credit costs, plans, and limits.
- MCP — drive scrapes from Claude Code or another MCP client.