Skip to main content
POST
From 1 credit See the guide for examples and usage. Use a custom parser or pre-built parser to return structured data in parsed.data.

Authorizations

Authorization
string
header
required

Send your API key as Authorization: Bearer <API_KEY>. Keys have full access unless restricted to specific permissions.

Body

application/json
url
string<uri>
required

Public HTTP or HTTPS URL to scrape.

Minimum string length: 1
Pattern: ^[Hh][Tt][Tt][Pp][Ss]?://
formats
object
required

Outputs to return. Set at least one to true.

sharedParams
object

Browser and content settings shared by all outputs.

markdownParams
object

Options for the markdown output. Requires formats.markdown: true.

screenshotParams
object

Options for the screenshot output. Requires formats.screenshot: true.

imageParams
object

Options for the images output. Requires formats.images: true.

parseParams
object
conditionally required

Custom rules or a prebuilt parser for the parsed output. Required when formats.parse is true, and allowed only then.

productParams
object

Options for the product output. Requires formats.product: true.

highlightsParams
object
conditionally required

Query for the highlights output. Required when formats.highlights is true, and allowed only then.

jsonParams
object
conditionally required

Schema and instructions for the json output. Required when formats.json is true, and allowed only then.

maxAgeMs
integer
default:259200000

Maximum age of a cached result, in milliseconds. 0 always fetches fresh. Defaults to 3 days (259200000 ms). Maximum: 1 year (31536000000 ms).

Required range: 0 <= x <= 31536000000
timeoutOpts
object

Request deadline and what to return when it passes.

zdr
enum<string>
default:disabled

enabled turns on zero data retention. Returns 403 ZDR_NOT_ENABLED unless your organization has ZDR.

Available options:
enabled,
disabled
tags
string[]

Labels for this request. Filter usage and request logs by them in the dashboard or with GET /org/logs.

Maximum array length: 20
Required string length: 1 - 50
Example:
policies
string[]

Access policy IDs to apply; each URL must pass all of them. Requires access policies enabled for your organization; otherwise returns ACCESS_POLICIES_NOT_ENABLED.

Example:

Response

Every output key is present. Check each output's success; failed outputs include error_code and message. An output that is not ready by the deadline fails with REQUEST_TIMEOUT under either timeoutOpts.behavior. If every requested output times out, the response is still 200 and is not billed.

url
string<uri>
required

Final URL after redirects and browser actions.

Pattern: ^https?://
html
object
required

Rendered HTML of the page, after content filters.

markdown
object
required

Page content as Markdown, after content filters.

screenshot
object
required

Screenshot as a base64 image data URL.

images
object
required

Images found on the page, after content filters. [] when there are none.

bytes
object
required

The original HTTP response body, unchanged by waits, actions, and filters.

parsed
object
required

Custom rules return fields after content filters; unmatched fields are null ([] for lists). Prebuilt parsers return source-specific structured data. See https://docs.context.dev/scrape/prebuilt-parsers for output schemas and request options.

product
object
required

Product details found on the page.

highlights
object
required

Relevant Markdown excerpts in page order. [Heading] adds context; … marks omitted text.

json
object
required

Object matching jsonParams.schema.

profile
object | null
required

Browser profile used for this scrape. null when no profile was requested.

metadata
object
required

Page metadata. Fields are omitted when not found.

cache_metadata
object
required

Cache status of this response.

request_id
string<uuid>
required

Unique ID of this request, also in X-Request-Id. Include it when contacting support.

Example:

"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"

isPartial
boolean

true when at least one requested output succeeded but others failed or are incomplete. Absent otherwise.

key_metadata
object

Credits this request used and your remaining balance.