{"endpoint":"POST /web/v1/scrape","description":"Processes a page and returns every output you ask for in `formats` at once. A partial failure does not void the rest.","request":{"url":"string — page to process (or `html`)","html":"string — raw HTML instead of `url`","formats":"array — html, markdown, links, screenshot, pdf, elements, json, accessibility, controls (defaults to [\"markdown\"])","selectors":"array of string — required with the `elements` format","json":"{ prompt, schema } — required with the `json` format","screenshot":"{ fullPage, type, quality, omitBackground, selector, viewport }","pdf":"{ format, landscape, printBackground, scale }","links":"{ visibleOnly, excludeExternal }","controls":"{ visibleOnly, limit } — options for the `controls` format","wait":"{ until, selector, timeout }","request":"{ headers, cookies, userAgent, auth }","block":"{ resourceTypes, urlPatterns }","documents":"a url pointing at a PDF, Word, Excel, CSV or OpenDocument file is converted to markdown without a browser. Only `markdown` comes out of a document","maxAge":"number — accept an answer up to this many ms old. A cache hit costs $0.0002 instead of the format price, and the price already says so","binaryAs":"base64 (the only value for now; \"url\" arrives with storage)","viewport":"{ width, height, deviceScaleFactor }"},"response":{"success":"true when at least one format came out","data":"one key per requested format that succeeded","errors":"one key per format that failed, with the reason","metadata":"url, formats, renders, browserMsUsed, ms, title"},"notes":["Today every format consumes a browser render: 4 formats = 4 renders. `metadata.renders` and `metadata.browserMsUsed` say so in every response.","The PDF and the screenshot arrive base64-encoded inside the JSON.","`controls` returns what can be acted on (role, name, selector, box on screen) in a single render: it is the map an agent needs to decide where to click.","Send `maxAge` to reuse a recent render: `metadata.cached` lists which formats came from the cache, and those are priced at $0.0002. Requests carrying cookies, auth or custom headers are never cached, because the cache is shared."],"example":{"url":"https://example.com/product","formats":["markdown","links","pdf","json"],"json":{"prompt":"Product name, price and availability"},"pdf":{"format":"a4"},"wait":{"until":"networkidle0"}}}