Capture reference · v1
Rich capture, explained field by field
Rich capture is an additive layer on POST /screenshot. Use it when a binary screenshot is not enough: ask for readable Markdown, inspect the rendered DOM, capture diagnostics, clean obstructing UI, extract deterministic fields, or return a durable artifact. All rich analysis belongs in a JSON response.
How rich capture works
JSON-first
Set responseType to json whenever you request analysis or actions.
Rendered page
The browser sees the post-JavaScript DOM, not only the original HTML.
Bounded
Output, nodes, diagnostics, actions, and time all have explicit limits.
01 · Request model
Start with the capture controls
A request supplies one source and any combination of output, viewport, rendering, analysis, automation, persistence, and extraction options. Unknown or reserved fields are rejected; use the OpenAPI contract for exact validation.
URL versus HTML
A URL is navigated and rendered in a browser. Inline html is rendered without navigation and is not slow-promoted by the URL navigation rule. Do not send URL credentials such as https://user:pass@host; use scoped headers or cookies instead.
Headers and cookies
headers are scoped to requests for the target origin. Cookies require name and value and may include domain, path, secure, and sameSite. Sensitive values are not returned in diagnostics or persisted artifacts.
02 · Rendering
Control the page before you read it
Use render for browser emulation and captureMode for alternate visual passes. Applied controls and non-fatal warnings are reported in metadata.
Navigation settlingNavigation waits for DOMContentLoaded, then performs a bounded five-second network-idle settling wait. Long-lived background requests may produce warning: "network_idle_timeout" while still returning a capture. A true DOMContentLoaded timeout is terminal. Grid viewport passes retain raw inline HTML rather than resetting to a blank page. Skeleton mode captures its initial DOMContentLoaded frame before this later settling wait. Markdown extraction falls back from an empty main region to the body and then the accessibility tree when available.
03 · Inspect
Use semantic snapshots to understand the DOM
semanticSnapshot can be true for defaults or an options object for a bounded, versioned snapshot. It returns at analysis.semanticSnapshot and is useful for discovering reliable selectors before a later extraction or action.
Node IDs are evidence, not locators. IDs only identify nodes in that snapshot. For a future request, use one of the returned selector candidates or a stable locator. Snapshot output can be truncated at maxNodes (1–10,000).
04 · Diagnose
Capture structured diagnostics or a visual debug overlay
diagnostics returns a bounded, redacted HAR-like object. It is intentionally not a standards-compliant HAR and never includes cookies, authorization headers, form values, or request/response bodies.
05 · Clean
Remove visual noise without losing important content
cleanup: true enables built-in heuristics for likely cookie banners, ads, chat widgets, newsletter popups, modal backdrops, and large sticky headers or footers. It is a heuristic, not a maintained third-party rules database.
Pro+ availability: Cleanup is a Pro+ DOM-intelligence feature. The platform can temporarily pause the product group for everyone; that returns 403 FEATURE_NOT_ENABLED with a platform reason, not an account-rollout requirement.
Read the report
The response reports analysis.cleanup.removed, category counts, and removal evidence when available.
When not to use it
Do not enable cleanup when pixel fidelity or the presence of every overlay is the thing you are testing. Prefer hideSelectors when you need an explicit, deterministic hide list.
06 · Extract
Extract deterministic fields from rendered HTML
The extract object is selector-driven, not prompt-based. It works against the rendered DOM, so it can extract content that only appears after JavaScript runs. Use strict to fail the request when a required field is missing.
Field statuses
found includes the value and safe evidence. missing means the selector matched nothing. invalid_selector means the selector could not be evaluated. When a semantic snapshot is also requested, extraction evidence can include source node IDs.
07 · Operate
Understand responses, budgets, and automatic async
A successful JSON capture has status: "success". It may include markdown, markdownMeta, analysis, actionResults, tabs, performanceMetrics, base64 artifacts, and metadata.
Action budgets
The synchronous action budget is 24 seconds. Async, monitor, batch-child, and crawl-child work receive 52 seconds. A request that stacks multiple whole-DOM passes or combines rich analysis with fullPage/lazyScroll can be auto-promoted to a durable job.
08 · Safety
Handle captured data safely
Credentials
Never put credentials in target URLs. Use x-api-key for domscout auth and scoped headers/cookies for the target.
Redaction
Snapshots, diagnostics, artifacts, job metadata, and webhook payloads omit password/form values, cookies, authorization headers, and raw network bodies.
Retention
New saved artifacts use finite plan-bounded retention: 7, 30, or 90 days; 365 is Enterprise-only. Use the saved result or GET /capture/{captureId} for the effective expiry; the signed download URL is capped at one hour and never outlives that finite expiry. Historic rows with expiresAt null are legacy permanent retention, not a new unlimited option; their signed URLs still expire within one hour. Job metadata has its own operational expiry.
JavaScript
injectJS and waitForFunction are trusted-JavaScript features with plan, account-entitlement, and platform-switch requirements.