Quickstart
From zero to a working html scrape, then an analyse call. Use json for JSON APIs (omit actions for the whole document). 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.
Caution: The key is only displayed once — it is hashed at rest and cannot be recovered. If you lose it, revoke and generate a new one.
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/html \-H "Authorization: Bearer sf_…" \-H "Content-Type: application/json" \-d '{"url": "https://scrapesilo.com/fixtures/article","actions": {"title": "h1","body": "p","cta": "a.sf-cta@href"}}'A completed
/scrape/htmlHTTP 200 response returns an array (one item per distinct 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,"jobId": "job_…","antibot": []}]HTTP 202 instead returns job rows when the wait deadline expires or
?wait=falseis used. Poll those IDs without resubmitting.Open the /jobs 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 deterministically extracts fields or a JSON document. 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/scrape/browserwhen 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 and json are 1 credit, analyse is 3, browser is 5. Query-driven /scrape/ai is 50 credits per job.
Read a page as Markdown with MCP
Section titled “Read a page as Markdown with MCP”Call scrape_markdown with a URL; no CSS selectors or actions are needed:
{ "url": "https://scrapesilo.com/fixtures/article", "mode": "full", "engine": "html" }mode is full (default) or article; engine is html (default) or browser. Full mode preserves the page body; article mode uses main-article detection and can omit content. Choose browser for JavaScript-rendered pages. Read the completed result’s data.markdown. See MCP for setup, batch limits and polling.
Copy for an agent
Section titled “Copy for an agent”ScrapeSilo API: https://api.scrapesilo.comAuth: Authorization: Bearer $SCRAPESILO_API_KEY
Rules:- MCP page reading: scrape_markdown({ url, mode: "full", engine: "html" }); no actions or selectors. Use mode="article" for main-article detection or engine="browser" for JavaScript. Defaults are full/html.- POST /scrape/html, /scrape/json and /scrape/browser extract exact fields. Omit engine; actions required for html/browser, optional flat paths for json. Legacy POST /scrape remains supported with engine. No query field. CSS selectors, no css= prefix (e.g. h1@text). HTTP 200 returns an array of { url, data, tookMs, jobId, antibot }.- POST /analyse interprets a page (outline, summary, flags). Required: url, query. Not a CSS plan.- Credits per URL: html/json 1, analyse 3, browser 5. Use browser only when the page needs JS or interaction.
curl -sS -X POST https://api.scrapesilo.com/scrape/html \ -H "Authorization: Bearer $SCRAPESILO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://scrapesilo.com/fixtures/article", "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 — compare HTML, JSON, Browser and AI.
- Actions DSL — full selector + attribute reference.
- Pricing & quotas — credit costs, plans, and limits.
- MCP — drive scrapes from Claude Code or another MCP client.
Let AI select the extraction tools
Section titled “Let AI select the extraction tools”Call POST /scrape/ai with { "url": "https://example.com/", "query": "Extract the page heading as title" }. AI uses Jev for rendering selection, tests actions through existing engines and returns the successful engine result with its recipe, within one 50-credit job. Use ?wait=false and poll the returned job ID for longer runs. See AI requests and limits.