- 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
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
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
successboolean in the body. A processed request returns HTTP200withsuccess: true, even when the page underneath returned an error code. - Page status (
data.metadata.statusCode): the HTTP status the website returned for the page, like200,404or500.
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 informats. 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 indata.json.
Response
Question format
Ask a question about the page. The answer comes back indata.answer.
cURL
Response
Highlights format
Get the passages of the page that match a query, indata.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
screenshot action adds a link to data.actions.screenshots. See the Advanced scraping guide for every action.