SE Home
Help
  • Documentation
  • Help centre
SEScrape Engine

Getting started

DocumentationQuickstartAuthenticationPlayground

Extracting data

Selecting valuesTransformsLists & tablesPage dataAI extractionMCP server

Fetching pages

Custom requestsTimeouts & redirectsCachingAutomatic retriesFallback strategies

Browsers & actions

BrowsersActionsRecipesScreenshots & PDFStored files

Getting past blocks

Anti-bot protectionCaptchasProxiesFingerprintsSessions

Workflows

Multi-step requestsVariablesPaginationBatchCrawlingTemplatesSchedules & monitoringAsync jobs & webhooksExport to S3, Sheets, databases & webhooks

Account & billing

CreditsSecretsPlansLimitsLogs & request idsNotificationsAccountAffiliate programmeHelp centre

Reference

POST /scrapeGET /sessions/:idGET /browsersGET /proxies/countriesGET /healthErrors
Documentation

Getting started

DocumentationQuickstartAuthenticationPlayground

Extracting data

Selecting valuesTransformsLists & tablesPage dataAI extractionMCP server

Fetching pages

Custom requestsTimeouts & redirectsCachingAutomatic retriesFallback strategies

Browsers & actions

BrowsersActionsRecipesScreenshots & PDFStored files

Getting past blocks

Anti-bot protectionCaptchasProxiesFingerprintsSessions

Workflows

Multi-step requestsVariablesPaginationBatchCrawlingTemplatesSchedules & monitoringAsync jobs & webhooksExport to S3, Sheets, databases & webhooks

Account & billing

CreditsSecretsPlansLimitsLogs & request idsNotificationsAccountAffiliate programmeHelp centre

Reference

POST /scrapeGET /sessions/:idGET /browsersGET /proxies/countriesGET /healthErrors

POST /scrape

Fetches a page and extracts values from it with CSS selectors.

Try it

Actions

Data

POST /scrape
Content-Type: application/json

Request body

{
  "target_url": "https://en.wikipedia.org/wiki/Web_scraping",
  "fields": ["h1", "h2"]
}
PropertyTypeRequiredDescription
target_urlstringyes (optional with html)Address of the page to scrape. http or https only
htmlstringnoExtract from this HTML instead of fetching target_url, 5 MB max. target_url becomes optional and only resolves relative links; only options.ai applies. See From your own HTML
fieldsarray or objectnoWhat to extract, 1 to 50 fields. Left out: { "content": { "selector": "body", "output": "markdown" } }, the whole page as markdown (nothing with options.ai, actions, a screenshot or a PDF). An array gives an array of values; an object names the values
optionsobjectnoHow to fetch the page. See Options
stepsobject[]noSeveral scrapes in a row, 1 to 10, each { target_url, fields, options } defaulting to the top-level ones. target_url and fields are then only required in each step. See Multi-step requests
continue_on_errorbooleannoWith steps: run every step even if one fails. Default false

The body must be a JSON object of at most 6 MB, sent with Content-Type: application/json. Unknown properties are ignored.

Response

200 OK

{
  "target_url": "https://en.wikipedia.org/wiki/Web_scraping",
  "final_url": "https://en.wikipedia.org/wiki/Web_scraping",
  "status": 200,
  "data": ["Web scraping", "Contents"],
  "warnings": [],
  "meta": {
    "id": "5f0c2d8e-3b1a-4c6e-9d2f-7a8b9c0d1e2f",
    "started_at": "2026-10-24T09:12:03.418Z",
    "duration_ms": 412,
    "engine_ms": 388,
    "cached": false,
    "attempts": 1,
    "strategy": 0,
    "bytes": 184213,
    "proxy": null,
    "fingerprint": null,
    "browser": null
  }
}

What the page holds comes first (data, then what the options add); how the request went is grouped in meta, last. With several pages (steps, /batch, /crawl), each page has its own meta (without id and started_at), and the response's meta describes the whole request.

PropertyTypeDescription
target_urlstringThe target_url you sent
final_urlstringAddress the data came from, after redirects
statusnumberHTTP status returned by the target site
redirect_tostringOnly with "follow_redirects": false and a redirect: where it points to
dataarray or objectOne value per field: an array for an array of fields, an object for named fields
actionsobject[]Only with actions: what each one did. See Actions
capturedobject[]Only with browser.capture: the JSON responses captured. See Capture the page's API calls
screenshotobjectOnly with screenshot: { "content_type": "image/png", "data": "<base64>" }, plus url, file_id and expires_at when the file is kept in storage (GET /v1/files/{id} with your API key, kept 1 to 90 days by plan). See Screenshots & PDF
pdfobjectOnly with pdf: { "content_type": "application/pdf", "data": "<base64>" }
sessionobjectOnly with session: its id, expiry, proxy, identity and number of cookies. See Sessions
warningsstring[]What the API adapted or couldn't do as asked, in plain words. Empty when everything went as asked
metaobjectHow the request went: see below

meta

PropertyTypeDescription
idstringThe request's id (UUID): give it to support, find it in your logs
started_atstringWhen the request reached the API (ISO 8601)
duration_msintegerTime the request took, waiting in the queue included
engine_msintegerTime spent fetching, rendering and extracting
cachedbooleantrue if the page came from the cache
cache_agenumberCached answers only: seconds since the page was fetched
attemptsnumberRequests made to the target site: 1, more with retries or fallbacks, 0 when cached
strategynumber0 if the main request got the page, n if options.fallback[n - 1] did. See Fallback strategies
bytesintegerSize of the page received from the site, 0 when cached
proxyobject or nullThe proxy used: { "source": "pool", "country": "GB", "city": "London" } or { "source": "custom", "index": 0, … }; null without proxy
fingerprintobject or nullThe fingerprint used, like { "name": "chrome", "platform": "Windows" }; null without fingerprint
browserobject or nullThe browser used: { "engine": "chromium", "driver": "playwright", "stealth": "plugin" }; null without a browser
dataarray or objectOne value per field, in the same order (array) or under the same names (object)
aiobjectOnly with options.ai: what the model returned, repairs, steps, cost. See AI extraction
configobjectOnly with options.ai.config or options.ai.example: { target_url, fields, options? }, a request that scrapes this page again without AI. See Generate a config

Failed requests return an error object instead of data. See Errors.

Fields

The simplest field is a CSS selector string. It returns the text of the first matching element, or null if nothing matched:

"fields": ["h1", "h2"]

When you need options, write the field as an object. "h1" and { "selector": "h1" } are the same field.

PropertyTypeRequiredDescription
selectorstringyes*Standard CSS selector. *One of selector, xpath or extract
attributestringnoReturn this attribute (href, src, content…) instead of the text
multiplebooleannotrue to return every match as an array. Default: false
xpathstringnoXPath instead of selector. See Selecting values
outputstringnotext, html, markdown or table
absolutebooleannoURL attributes made absolute. Default true
transformarraynoConvert values: number, price, date… See Transforms
itemsfieldsnoA list of objects, one per match. See Lists & tables
extractstringnoPage-level data instead of a selector: json-ld, microdata, open-graph, meta, markdown, text. See Page data

Strings and objects can be mixed in the same fields.

Get every match

Without `"multiple": true`, a field returns only the first match

"h2" on a page with ten <h2> returns the first one. Set "multiple": true to get all ten.

Actions

Data

{
  "data": [
    "Web scraping",
    ["Contents", "History", "Techniques", "…"]
  ]
}

With "multiple": true the value is always an array, [] if nothing matched, even when the page has a single match.

Name your values

With more than a couple of fields, positions get hard to follow. Pass fields as an object instead: each key is a name of your choice, and data comes back as an object with the same names.

Actions

Data

{
  "data": {
    "title": "Web scraping",
    "canonical": "https://en.wikipedia.org/wiki/Web_scraping",
    "sections": ["Contents", "History", "Techniques", "…"]
  }
}

Names start with a letter or _ and contain only letters, digits, _ or -, 64 characters max.

Comma-separated selectors

A selector such as "h1, h2" always returns an array, with the selectors in the order you wrote them, not in the order they appear in the page:

  • without multiple: the first match of each selector, e.g. ["Web scraping", "Contents"];
  • with "multiple": true: every match of the first selector, then every match of the next, e.g. ["Web scraping", "Contents", "History", …].

A selector that matches nothing is left out of the array.

To tell the values apart, prefer separate fields (["h1", "h2"]) or named values over "h1, h2".

Value types

The type of each value depends only on your request, never on the page, so your code always receives the type it expects:

FieldValue
One selectorstring, or null if nothing matched
One selector, "multiple": truestring[], [] if nothing matched
Comma-separated selectors, with or without multiplestring[]

Values are cleaned: whitespace collapsed and trimmed, control characters removed, 10,000 characters max per value, 1,000 values max per array.

Options

PropertyTypeDefaultDescription
methodstringGETHTTP method sent to the target: GET, POST, PUT, PATCH or DELETE. See Custom requests
headersobject—Headers sent to the target. A User-Agent here replaces the default one
cookiesobject—Cookies sent to the target, as { "name": "value" }
bodystring—Request body sent to the target, not with GET
timeoutinteger (ms)15000Time allowed per attempt, 1000 to 60000. See Timeouts & redirects
follow_redirectsbooleantruefalse returns a redirect as is, with redirect_to
max_redirectsinteger5Redirects followed before TOO_MANY_REDIRECTS, 0 to 10
proxyboolean or object—Fetch through a proxy: true, { "country": "GB" }, { "country": ["GB", "US"], "city": "London" }, or your own { "list": [...] } (HTTP, HTTPS, SOCKS4/5) with country, region and city filters. See Proxies
browserboolean, string or object—Load the page in a real browser: true, an engine ("camoufox"…) or options. See Browsers
actionsobject[]—Steps run in the page before extracting: click, fill, scroll… With or without a browser. See Actions
screenshotboolean or object—PNG or JPEG of the final page: true or { full_page, selector, type, quality }. See Screenshots & PDF
pdfboolean or object—PDF of the final page: true or { format, landscape }
aiobject—Extraction from a prompt or JSON Schema, generated selectors, repair, summary, classification. Not in fallback strategies. See AI extraction
escalatebooleantrueWhen a request is blocked by an anti-bot, retry with a stealth browser, then Camoufox. Not in fallback strategies. See Anti-bot protection
debugbooleanfalseAlso return debug: every attempt (strategy, driver, proxy, status, duration), the raw HTML and a screenshot (billed). Not in fallback strategies. See Debug mode
paginationobject—Follow next links, merge lists, serve pages of a list. Not in fallback strategies. See Pagination
sessionstring, object or true—Share cookies, proxy and identity with other requests: a name, { id, ttl } or true. Not in fallback strategies. See Sessions
fingerprintboolean, string or string[]true without a browserLook like a real browser on the wire (User-Agent, headers, TLS and HTTP/2): true, "chrome", ["firefox", "safari"]… See Fingerprints
cache_ttlinteger (s)0Accept a cached copy of the page up to this old, 0 to 86400. See Caching
retryinteger0Extra attempts when the site fails, 0 to 5. See Automatic retries
retry_oninteger[]429 and 5xxHTTP statuses worth retrying. See Choose which statuses to retry
backoffobject—Waits between retries: initial_delay, max_delay, multiplier, jitter. See Exponential backoff
fallbackobject[]—Up to 3 other ways to request the page, tried in order if the main request fails. Each accepts every option above except cache_ttl. See Fallback strategies
"options": {
  "method": "POST",
  "headers": {
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "body": "q=shoes",
  "retry": 3,
  "backoff": { "initial_delay": 1000 }
}

Turn a feature off

Set an option to false to turn it off explicitly:

Optionfalse means
retryNo retry, same as 0
backoffRetry immediately, without waiting
cache_ttlDon't read the cache, and don't store this page in it either
fallbackNo fallback strategy
proxyNo proxy
fingerprintThe API's own identity
browserA plain HTTP request, no browser
follow_redirectsReturn redirects as is

In a fallback strategy, false also stops inheriting from the main request: "proxy": false, "fingerprint": false, "browser": false, "retry": false, and "headers": false, "cookies": false or "body": false to send none of the main ones.

timeout and max_redirects can't be false: every request has a timeout, and "follow_redirects": false is the way to stop following redirects.

On this page

  • Try it
  • Request body
  • Response
  • meta
  • Fields
  • Get every match
  • Name your values
  • Comma-separated selectors
  • Value types
  • Options
  • Turn a feature off