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
Scout 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
Endpoints & parameters
Choose an endpoint — below you'll see an example request and explanations for all relevant 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
urlstring requiredTarget URL.
capture_xhrstring requiredGlob or substring for XHR/fetch URLs.
fieldsarray requiredDOM 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 Scout captures (max. 20).
fetch_mode'browser'|'http'http loads without JavaScript (static document). Default: browser.
solve_captchabooleanBest-effort Turnstile/checkbox on your own sites. Cloud: domain verify. Self-host: always allowed.
record_harbooleanOptionally records HAR (where supported by the endpoint).
respect_robotsbooleanRespect robots.txt (default: on).