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

Test and verify

POST /v1/assert

Assert API

Several DOM rules in one navigation — pass/fail with results[] for CI and smoke tests.

What you can do with assert

Multiple DOM rules in one navigation: visible, text, counts, href, attribute — pass/fail including soft fails for CI gates and smoke tests.

  • Up to 25 rules per call
  • Operators: visible, exists, count_min/max, contains, matches, href_contains, attr, adaptive, …
  • Soft fails that do not kill the entire run
  • Clear passed boolean plus results[]
API Call
editable
Request bodyJSON
{'{'}
:,
:,
:,
:,
:,
:,
:,
:
{'}'}

Two rules in one call — selector, visible, and count_min are editable.

Not run yet

p visible=true · a count_min=1

Run assert to see pass/fail and rule evidence.
No request yet
{
  "message": "Not run yet"
}

Endpoints & parameters

Pick an endpoint for a sample request and a clear list of parameters.

POST /v1/assert

Multi-rule assertions after one page load.

Example request

{
  "url": "https://example.com/pricing",
  "width": 1280,
  "height": 720,
  "scroll_into_view": true,
  "dismiss_cookie_banner": true,
  "assert": [
    {
      "selector": "h1",
      "visible": true,
      "contains": "Pricing"
    },
    {
      "selector": "a[href*=\"signup\"]",
      "visible": true,
      "href_contains": "signup"
    },
    {
      "selector": ".plan",
      "count_min": 3
    }
  ]
}

Parameters

NameTypeDescription
urlreqstringTarget URL.
assertreqarray (1–25)Rules; each requires selector.
assert[].visible / exists / not_coveredbooleanVisibility/existence expectations.
assert[].count / count_min / count_maxnumberCount expectations.
assert[].contains / text / matchesstringCheck text content.
assert[].href_contains / attrvariousLink and attribute checks.
assert[].softbooleanSoft fail counts but does not kill passed.
scroll_into_view / ignore_selectorsvariousHelpers for overlays.
width / heightnumberViewport.
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).