Skip to main content
POST
Submit a page URL and extraction configuration to retrieve structured data from a JavaScript-rendered SPA. You can use custom field definitions, a built-in template, or inspect mode to discover what data is available on a page.
string
Full HTTP(S) URL for the target SPA using port 80 or 443. Required for most templates. For google-trends-explore, prefer the keyword field instead. SimilarWeb requires a full page URL, not a bare domain.
string
Recommended for google-trends-explore. Provide 1 to 5 unique, non-empty comma-separated keywords, each at most 100 Unicode characters (for example, "adspower,playwright"). The server builds the canonical Trends URL automatically. Explicit null, numeric, or empty-string values return INVALID_KEYWORD and never fall back to url.
string
Extraction mode. Defaults to "extract".
string
Built-in site template ID. When provided, fields are supplied by the template rather than your request. Available template IDs:
  • "similarweb-overview" — website traffic, engagement, and ranking metrics.
  • "google-trends-explore" — interest-over-time data and relative averages for up to 5 keywords.
  • "chrome-web-store-app-info" — extension metadata from the Chrome Web Store (with CRX manifest fallback).
object
Template-specific parameters declared by the selected template. Refer to the template’s input specification from GET /spa-extract/templates.
string
Navigation event to wait for before extraction. Custom extraction defaults to "domcontentloaded". Site templates use the request value first, then the template default, then "domcontentloaded".
object
Wait for a specific element or text to appear after SPA navigation and actions complete. selector and text may be combined.
array
Optional page interactions executed in array order before extraction. Each step is capped at 30 seconds.
object
Record of named field definitions for extract mode. Each key becomes a property in the response data object. Use this when you are not using a template.
object
Legacy alias for fields, used only when fields is absent. String values are treated as DOM CSS selectors. Does not validate the response JSON and does not return schemaValid or schemaErrors fields. Prefer fields for all new integrations.
number
Maximum time to wait for the task to complete, in milliseconds. Must be a positive integer no greater than 3,600,000.
object
Viewport dimensions used when rendering the page.
string
Browser locale, for example "en-US". May follow trusted proxy metadata when omitted.
string
IANA timezone identifier, for example "Asia/Shanghai". May follow trusted proxy metadata when omitted.
object
Geolocation coordinates exposed to the page via the Geolocation API.
object
Custom proxy configuration. Cannot be combined with countryCode.
string
Managed residential proxy region. Cannot be combined with proxy.
  • "GLOBAL" — dynamic exit from 15 popular regions.
  • Two-letter country code — prefers a trusted proxy with dynamic fallback.
  • Omitted — a random trusted proxy is selected automatically.
string
"random" lets the server pick a User-Agent from its library. Requests without an explicit userAgent default to "random".
string
Operating system used when userAgentMode is "random". Accepted values: "windows" (default) or "macos".
string
Explicit User-Agent string. Overrides the random selection.
object
Browser fingerprint settings. When omitted, every signal defaults to random while keeping OS, GPU, CPU, memory, fonts, and device signals coherent.
array
Cookie list injected into the browser context before navigation.
google-trends-explore ignores omitted, null, or empty-array values. Any non-empty or malformed cookies on a Trends request return 400 INVALID_TRENDS_COOKIES.

Response

string
"extract" or "inspect", mirroring the request mode.
object
Page metadata.
object
Extracted structured data. Keys match your fields definition or the template’s output fields.
array
List of field keys that were not found.
string
"sunbrowser" — result came from a live browser collection. "cache" — result was served from the server cache. Present on Trends responses.
boolean
Whether this response was served from cache.
boolean
Whether the cached result is stale.
string
RFC3339Nano timestamp of when the result was actually collected.
number
Collection attempt count. Cache HIT responses use 0; stale responses use the attempt count at the time the Worker reported them.
object
Present in inspect mode. DOM and network extraction candidates discovered on the page.
object
Present in inspect mode. A plan with fields and schema you can copy into a future extract request.
One credit is consumed after request validation but before the task is enqueued. Request bodies are limited to 1 MiB.

More examples