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

Capture and extract

capture_xhr

XHR Capture

Record matching XHR and fetch bodies from a real browser load — when the data lives in JSON, not in the DOM.

What you can do with XHR capture

ScoutAPI captures XHR and fetch bodies whose URL matches a glob or substring. Ideal when prices, cart, or search arrive as JSON, not in the DOM.

  • Glob or substring, e.g. */api/pricing*
  • Up to 20 responses, bodies up to 32k (truncated flag)
  • Available on extract, inspect, assert, and journey
  • +1 credit per request with capture_xhr
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

Extract plus matching XHR/fetch bodies in captured_xhr[].

Example request

{
  "url": "https://shop.example/pricing",
  "capture_xhr": "*/api/pricing*",
  "fields": [
    {
      "name": "headline",
      "selector": "h1",
      "type": "text"
    }
  ]
}

Parameters

NameTypeDescription
urlreqstringTarget URL.
capture_xhrreqstringGlob or substring for XHR/fetch URLs.
fieldsreqarrayDOM fields as in 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).