When to use
- You have a specific URL and want clean content from it right now.
- You need more than Markdown — the page’s structured data, its links, or an LLM summary.
- You want control over how the page is fetched: render JavaScript-heavy pages, wait for content to settle, or fetch as if from another country.
Example request
Send aPOST to /v1/web/scrape with your key in the X-API-Key header. Omit formats for Markdown only.
Example response
The response is{ "data": ... }. Only the formats you requested appear as fields; metadata and usage are always present.
Request options
Content
string
required
The URL to scrape. Must be
http(s).string[]
default:"[\"markdown\"]"
What to return:
markdown, html, rawHtml, links, structured, summary, json. structured is the page’s own data (cheapest, no LLM); summary and json are LLM-backed and cost more. When you request json, supply jsonOptions.object
Schema and/or prompt for the
json format. Provide jsonOptions.schema (a JSON Schema describing the shape you want) and/or jsonOptions.prompt (a natural-language instruction). One is required when json is requested.boolean
default:"false"
Preserve document structure (headings, lists, tables) over prose density. Good for marketing and service pages, where the headings are the content.Leave it off and the extractor optimises for capturing every word, which scores better on articles but can return unstructured prose on listing-style pages. Check
metadata.structure in the response: if it came back plain and you wanted markdown, retry with this on.Content filters
boolean
default:"true"
Return only the main content, dropping nav and boilerplate.
string[]
CSS selectors to keep. When set, only matching elements are considered. Up to 50.
string[]
CSS selectors to strip before extraction. Up to 50.
boolean
default:"true"
Strip inline base64 images from the output.
boolean
default:"true"
Remove common ad and tracking elements.
Fetch controls
number
Extra milliseconds to let the page settle before capture. 0–30000.
number
Overall time budget for the request, in milliseconds. 1000–120000.
object
Fetch the page as if from a given region.
location.country is an ISO 3166 alpha-2 code (e.g. "us"); location.languages is a list of preferred content languages, most-preferred first (e.g. ["en-US", "en"]).object
Extra request headers to send when fetching the page.
Caching
number
Serve from cache if a capture of this URL is younger than this many milliseconds. Omit for the default window;
0 always fetches fresh. Capped at 7 days (604800000).boolean
default:"false"
Only serve from cache. If there is no fresh cached copy, return
404 instead of fetching.boolean
default:"true"
Persist the capture for later re-extraction.
Async
boolean
default:"false"
Return a job id immediately instead of waiting for the result. Poll
GET /v1/web/scrape/{id}.Response fields
object
Synchronous by default
A scrape waits and returns{ "data": ... } with the page. It never degrades to a job id on its own, so one URL means one response shape: the page, or an error explaining why not.
The synchronous budget is 90 seconds. A page that runs past it returns 504 with code REQUEST_TIMEOUT. The fetch keeps going in the background, so the capture usually lands in the cache and an immediate retry is fast and cheap.
Set your own client timeout below 90s if you want to give up sooner. Anything above it will never
fire, because ours cuts in first.
async: true and get a job id instead:
status (waiting, active, completed, or failed), plus data once completed or error if it failed.
A standard scrape is one credit. LLM-backed formats (
summary, json) cost more. Every response reports what it consumed in usage.creditsUsed and your balance in usage.creditsRemaining, and you are only charged on success.Next steps
Scrape API reference
Full request and response schema with a live playground.
Formats
Markdown, structured data, extracted JSON, and more.
Crawl a whole site
Discover and scrape every page as one job.
Scrape a list of URLs
Provide an explicit set of URLs to scrape together.