Scrape URL
Scrape a webpage and return its content as HTML, Markdown, or plain text.
Request Body
auto mode, simple pages use fast HTTP (1 credit) and JavaScript-heavy pages use a browser (5 credits). When escalate is enabled, the system can further escalate to premium browsers (10 credits) for heavily protected sites.html— Raw HTML of the pagemarkdown— Converted to clean Markdowntext— Plain text with HTML tags stripped
raw format — to get an
unwrapped body, use raw_content.browser engine. Use this for single-page applications or pages that load content dynamically.browser, patchright, windows_chrome). If render_js is false and this is set, JS rendering is forced automatically.wait_for selector to appear. Range: 1000 – 120000.0 – 30000.browser engine. Each action is an object with a type and action-specific parameters.Supported actions:session_id to maintain login state or continue a browsing session.0 – 10.false to get the blocked response immediately.US, GB, DE, FR, JP, BR, AU.screenshot_url response field.video_url response field. Adds +3 credits. Useful for debugging, visual verification, or monitoring how a page loads.curl_cffi → browser → windows_chromeYou only pay for the engine that succeeds — costs are not cumulative. Without this flag, only the selected engine is tried.400 error if the estimated cost would exceed this budget. Useful for controlling costs when using escalate or anti_bot. Minimum: 1.X-Scrape-* response headers.Use it for two things: skipping the JSON encode/decode on large HTML payloads
(saves 300–1000 ms on 1 MB+ responses), and downloading binary files
without the ~33% base64 overhead. See
Binary files and raw bodies.Cannot be combined with ai_extract, screenshot or video — those need the
JSON envelope, so the request falls back to it automatically.ai_prompt. Adds +2 credits to the request cost. The scrape result is still returned even if AI extraction fails.ai_extract is true. Maximum 2000 characters.Response
false when all retries are exhausted and the page is still blocked.null when success is false,
and null for binary targets — those come back in content_base64.content when the target
serves a binary payload. Only present when is_binary is true. Bodies above
25 MB are not base64-encoded — re-request those with raw_content: true.Content-Type, normalised to the bare media type
(e.g. image/jpeg).html, markdown, or text.0 if the first attempt succeeded.screenshot: true was requested.video: true was requested.blocking_detected is true.null if no solver was used.ai_prompt. The shape depends on your prompt. null when ai_extract is false or extraction failed.gpt-4o-mini). null when AI extraction was not used.null on success.Binary files and raw bodies
/v1/web/scrape handles binary targets — images, PDFs, archives, fonts, audio
and video — as well as HTML. The bytes are returned exactly as the origin sent
them; nothing is decoded, parsed or re-encoded on the way through.
This works through the same anti-bot machinery as a page scrape, so a file
behind Cloudflare, DataDome or Imperva is fetched with the same engine, proxy
tier and session you would use for its parent page. Pass the same session_id
you used to scrape the page the file was linked from and the file download
reuses that session’s cookies and fingerprint.
There are two ways to get the bytes.
raw_content: true — the body itself. No base64 overhead. Best for large
files and for piping straight to disk.
content_base64 — one request, metadata included. Use this when
you also want credits_used, engine_used or the protection detections
alongside the file.
raw_content always carry
Content-Disposition: attachment and X-Content-Type-Options: nosniff, and
their Content-Type is restricted to a known-safe set — scraped bytes are
never labelled in a way that would let a browser execute them.
Bodies larger than 25 MB are not base64-encoded into JSON. Those return
content_base64: null with a detail telling you to re-request using
raw_content: true, which returns them without the base64 expansion. Very
large files are still held in memory end to end, so treat a few hundred MB as
the practical ceiling for a single request.
Examples
Basic scrape
JavaScript rendering with wait
AI extraction
Full anti-bot bypass with budget
Browser automation scenario
Error Responses
Authorizations
Body
The URL to scrape. Must be a valid HTTP or HTTPS URL.
Scraping engine tier to use.
auto, browser Output format for the scraped content.
html, markdown, text Force JavaScript rendering.
CSS selector or XPath to wait for before extracting.
Max wait time in ms for wait_for selector.
Additional ms to wait after page load.
Browser actions to perform before extracting.
Persist cookies and state across requests.
Max retry attempts on blocking detection.
Auto-retry on blocking page detection.
ISO 3166-1 alpha-2 country code for proxy geo-targeting.
Additional HTTP headers for the target request.
Capture a full-page PNG screenshot.
Record browser session as animated GIF (+3 credits).
Attempt anti-bot bypass when blocking detected.
Allow auto-escalation to stronger engines.
Maximum credits budget for this request.
Run AI extraction on scraped content.
Natural language instruction for AI extraction.
Response
Successful scrape

