Capture and extract
POST /v1/extract
DOM Extraction
Named fields by selector, or ready-made inspect packs — raw data from the rendered DOM.
What you can do with extract and inspect
Pull specific fields via CSS selector or fetch a ready-made inspect pack (meta, headings, links, …). Ideal for light scraping, content checks, and agent inputs.
- Named fields via selector (text, html, attribute, count, list, exists, similar, selector)
- Adaptive relocation when classes are renamed (adaptive + match_text)
- Inspect packs via include[] without writing your own selectors
- XHR/fetch bodies via capture_xhr, optional fetch_mode=http without JS
- Wait for selectors / cookie banners before extract
- Structured data objects for CI and automation
API Call
editable
Request bodyJSON
{'{'}
:,
:,
:,
:,
:,
:,
:,
:,
:
{'}'}
Extract: adjust selector and viewport.
p
No result yet — run the API call.
Endpoints & parameters
Pick an endpoint for a sample request and a clear list of parameters.
POST /v1/extract
Extracts named fields via CSS selectors.
Example request
{
"url": "https://example.com",
"width": 1280,
"height": 720,
"fields": [
{
"name": "title",
"selector": "h1",
"type": "text"
},
{
"name": "cta_href",
"selector": "a.primary",
"type": "attribute",
"attribute": "href"
},
{
"name": "cards",
"selector": "article.card",
"type": "similar"
},
{
"name": "cta_path",
"selector": "a.buy",
"type": "selector"
}
],
"wait_for_selector": "h1",
"dismiss_cookie_banner": true,
"capture_xhr": "*/api/*"
}Parameters
| Name | Type | Description |
|---|---|---|
urlreq | string | Target URL. |
fieldsreq | array (≤50) | Or template_id — each field: name, selector, type (+ attribute when type=attribute). |
fields[].type | 'text'|'html'|'attribute'|'count'|'list'|'exists'|'similar'|'selector' | How the selector is evaluated. similar = sibling cards, selector = generated CSS path. |
fields[].adaptive | boolean | Re-resolve selector when it no longer matches. |
fields[].match_text | string | Text hint for adaptive relocation. |
template_id | string | Alternative to fields: saved extract template. |
width / height | number | Viewport. |
wait_for / wait_timeout_ms | various | Wait for selector before extract. |
dismiss_cookie_banner | boolean | Attempts to dismiss known cookie banners before measuring or checking. |
wait_for_selector | string | Waits for a CSS selector before continuing. |
wait_ms / settle_ms | number | Additional wait time after loading (depends on endpoint). |
device | string | Playwright device preset; overrides width/height/UA when set. |
color_scheme | 'light'|'dark'|'no-preference' | Preferred color scheme in the browser. |
block_ads | boolean | Blocks known ad and tracker requests. |
capture_xhr | string | Glob or substring for XHR/fetch URLs whose bodies ScoutAPI captures (max. 20). |
fetch_mode | 'browser'|'http' | http loads without JavaScript (static document). Default: browser. |
solve_captcha | boolean | Owned-site Cloudflare JS / Turnstile checkbox. Pair with stealth. Cloud: domain verify. Self-host: always allowed. Not an image-puzzle solver. |
record_har | boolean | Optionally records HAR (where supported by the endpoint). |
respect_robots | boolean | Respect robots.txt (default: on). |