Scrape a page
Choose formats, content filters, browser actions, cache behavior, and proxy policy.
POST /scrape is the general-purpose endpoint for one URL. It renders the page, applies optional actions and filters, and returns the formats requested in the body.
{
"url": "https://example.com/docs",
"formats": ["markdown", "links"],
"onlyMainContent": true,
"proxy": "auto",
"maxAge": 3600000
}Formats
Use plain string formats for standard outputs. Some formats accept an object when they need options.
| Format | Use it for |
|---|---|
markdown | Agent context, retrieval, and summarization |
html | Processed page markup |
rawHtml | Unmodified rendered document markup |
links | Discovered links from the page |
images | Image URLs and metadata |
screenshot | A page image; accepts full-page, type, quality, viewport, and clip options |
pdf | A PDF representation |
json | Structured extraction against a supplied JSON schema |
summary | A compact AI-written summary |
The base operation is 1 credit for a successful uncached scrape. Proxy escalation is included and never changes the customer price. Screenshots, PDFs, and JSON extraction add 4 credits each; summaries add 2. Failed, blocked, and cached responses are free.
Main-content filtering
Set onlyMainContent to remove navigation, cookie banners, footers, and repeated chrome. Use includeTags and excludeTags when a page needs more precise selection. If exact DOM fidelity matters, request rawHtml and leave main-content filtering off.
Cache control
maxAge is the maximum acceptable cache age in milliseconds. Set it to 0 to force a refresh. A larger value favors speed and lower infrastructure cost; a smaller value favors freshness.
Proxy policy
auto: start direct and escalate only when the response is blocked or challenged.noneorbasic: do not use a proxy; return a clean failure if direct access cannot succeed.residentialorstealth: start at that explicit paid tier.
The response metadata records the fetch and proxy tier used, which makes cost and reliability audits possible without exposing proxy credentials.
When enabled for a controlled production cohort, Berrycrawl can start one delayed secondary IPRoyal route on the residential rung and accept the first valid response. Browser actions, screenshots, PDFs, and Bright Data never use this hedge.
Browser actions
Actions let a scrape wait, click, type, press keys, scroll, or run supported page interactions before extraction. Keep action sequences short and deterministic. Prefer selectors tied to stable attributes over presentation classes.
Avoid blind retries
Retry timeouts and transient upstream failures. Do not retry a 400 caused by
an invalid format, selector, URL, or schema until the request changes.