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

FeaturePOST /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 body
{'{'}
:,
:,
:,
:,
:
{'}'}

Extract: adjust selector and viewport.

Response
h1

No result yet — run the API call.

curl
No request yet
json
{
  "message": "Not run yet"
}

Endpoints & parameters

Choose an endpoint — below you'll see an example request and explanations for all relevant parameters.

POST /v1/extract

Extracts named fields via CSS selectors.

Example request

json
{
  "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

  • urlstring required

    Target URL.

  • fieldsarray (≤50) required

    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[].adaptiveboolean

    Re-resolve selector when it no longer matches.

  • fields[].match_textstring

    Text hint for adaptive relocation.

  • template_idstring

    Alternative to fields: saved extract template.

  • width / heightnumber

    Viewport.

  • wait_for / wait_timeout_msvarious

    Wait for selector before extract.

  • dismiss_cookie_bannerboolean

    Attempts to dismiss known cookie banners before measuring or checking.

  • wait_for_selectorstring

    Waits for a CSS selector before continuing.

  • wait_ms / settle_msnumber

    Additional wait time after loading (depends on endpoint).

  • devicestring

    Playwright device preset; overrides width/height/UA when set.

  • color_scheme'light'|'dark'|'no-preference'

    Preferred color scheme in the browser.

  • block_adsboolean

    Blocks known ad and tracker requests.

  • capture_xhrstring

    Glob or substring for XHR/fetch URLs whose bodies Scout captures (max. 20).

  • fetch_mode'browser'|'http'

    http loads without JavaScript (static document). Default: browser.

  • solve_captchaboolean

    Best-effort Turnstile/checkbox on your own sites. Cloud: domain verify. Self-host: always allowed.

  • record_harboolean

    Optionally records HAR (where supported by the endpoint).

  • respect_robotsboolean

    Respect robots.txt (default: on).