Scrape turns any URL into clean Markdown or structured data for AI agents, including JavaScript-heavy pages and dynamic apps.
  • It manages the complexities: browser rendering, caching, ads and cookie banners
  • Handles dynamic content: JavaScript-rendered sites, and clicks and waits before reading
  • Outputs clean Markdown, structured data, screenshots or HTML
For details, see the Scrape Endpoint API Reference.
If a request fails, see Errors for the error codes and what to do about each one.

Scraping a URL with ScreenshotRender

/scrape endpoint

Used to scrape a URL and get its content.

Installation

Usage

For more details about the parameters, refer to the API Reference.
PDFs and documents: to read a PDF or another document from a URL, or to upload one from disk, use Parse.
Each scrape costs 1 credit. JSON, question and highlights formats cost 4 more credits per page. See Billing for every cost.

Response

SDKs return the data object directly. cURL returns the payload exactly as shown below.
Response

Response metadata and status codes

There are two status layers in a scrape response:
  • Request status: the HTTP status of the call itself, with the success boolean in the body. A processed request returns HTTP 200 with success: true, even when the page underneath returned an error code.
  • Page status (data.metadata.statusCode): the HTTP status the website returned for the page, like 200, 404 or 500.
So first check that the request succeeded (success: true), then check data.metadata.statusCode for how the page itself responded. Other metadata fields include title, description, language, sourceURL (the URL you asked for), url (the URL after redirects), contentType, and cacheState with cachedAt when the page came from the cache (see maxAge).

Scrape Formats

Choose the formats you want in formats. You can ask for several at once, and each one comes back under its own key in data. A request with several formats costs 1 credit for the page plus the extra for each paid format.
cURL
Response

Extract structured data

/scrape (with json) endpoint

Used to extract structured data from scraped pages. Describe the data with a JSON Schema (or a Pydantic model in Python), and it comes back in data.json.
Output:
Response
You can also extract without a schema, with only a prompt. See JSON mode.

Question format

Ask a question about the page. The answer comes back in data.answer.
cURL
Response

Highlights format

Get the passages of the page that match a query, in data.highlights.
cURL
Response

Interacting with the page with Actions

Run actions on the page before it is read: wait, click, and take screenshots along the way. Actions run in order.
cURL
Response
Each screenshot action adds a link to data.actions.screenshots. See the Advanced scraping guide for every action.

More page options

Read only the main content, keep or drop parts of the page, wait for late content, load the page from another country or as a phone, send your own headers, and accept cached pages. See the Advanced scraping guide.