ScoutAPI in development · launch 1 Dec 2026. Try it live · docs

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.
No request yet
{
  "message": "Not run yet"
}

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

NameTypeDescription
urlreqstringTarget URL.
fieldsreqarray (≤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[].adaptivebooleanRe-resolve selector when it no longer matches.
fields[].match_textstringText hint for adaptive relocation.
template_idstringAlternative to fields: saved extract template.
width / heightnumberViewport.
wait_for / wait_timeout_msvariousWait for selector before extract.
dismiss_cookie_bannerbooleanAttempts to dismiss known cookie banners before measuring or checking.
wait_for_selectorstringWaits for a CSS selector before continuing.
wait_ms / settle_msnumberAdditional wait time after loading (depends on endpoint).
devicestringPlaywright device preset; overrides width/height/UA when set.
color_scheme'light'|'dark'|'no-preference'Preferred color scheme in the browser.
block_adsbooleanBlocks known ad and tracker requests.
capture_xhrstringGlob 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_captchabooleanOwned-site Cloudflare JS / Turnstile checkbox. Pair with stealth. Cloud: domain verify. Self-host: always allowed. Not an image-puzzle solver.
record_harbooleanOptionally records HAR (where supported by the endpoint).
respect_robotsbooleanRespect robots.txt (default: on).