Skip to documentation

Reusable schemas

Shared browser, proxy, fingerprint, cookie, wait, and action objects used across the AdsCrawl API.

APIv1Current
On this page

cloudBrowser.runtime

runtime.status is starting, running, stopping, or stopped; starting/stopping still reserve quota. runtimeKind is neko or worker_cdp. Active sessions include sessionId and expiresAt. Only running may include connectUrl: open it directly for the instance's interactive browser, signed in as the profile owner. neko points to /cloud-browser-runtime/{sessionId}/ on the API origin and omits cdpBaseUrl. Fixed usr/pwd parameters are public viewer protocol values; authorization still uses the session cookie, without read-only cast mode. worker_cdp uses CDP Studio and may return cdpBaseUrl with a temporary token. Use returned URLs; never construct them or add API keys, cookies, or proxy credentials. If a URL is absent, query the actual status first.

FieldTypeDescription
runtimeKind"neko" | "worker_cdp"Runtime kind.
statusRequired"starting" | "running" | "stopping" | "stopped"runtime.status is starting, running, stopping, or stopped; starting/stopping still reserve quota. runtimeKind is neko or worker_cdp. Active sessions include sessionId and expiresAt. Only running may include connectUrl: open it directly for the instance's interactive browser, signed in as the profile owner. neko points to /cloud-browser-runtime/{sessionId}/ on the API origin and omits cdpBaseUrl. Fixed usr/pwd parameters are public viewer protocol values; authorization still uses the session cookie, without read-only cast mode. worker_cdp uses CDP Studio and may return cdpBaseUrl with a temporary token. Use returned URLs; never construct them or add API keys, cookies, or proxy credentials. If a URL is absent, query the actual status first.
sessionIdstringActive session ID.
expiresAtstring (RFC3339)Active session expiry.
connectUrlstringOptional direct interactive browser URL; requires the profile owner's login session.
cdpBaseUrlstringOnly worker_cdp may return this.

cloudBrowser.quotas

limit is the plan's saved-profile allowance; runningLimit is the user's concurrent running allowance; runningCount includes starting, running, and stopping across all of the user's profiles, pages, API keys, and dashboard sessions, excluding temporary /cdp/sessions. users.cloud_browser_running_limit defaults to 1 for NULL or negative values; 0 blocks new starts and a positive value sets the cap. List and each start read it live; lowering it does not stop existing instances. Global capacity still applies, without the temporary CDP per-key concurrency limit.

FieldTypeDescription
limitRequiredintegerSaved-profile allowance.
runningLimitRequiredintegerUser concurrent running allowance.
runningCountRequiredintegerTotal starting/running/stopping sessions.

browserSettings

Browser settings for CDP sessions. Omitted regions use a random trusted proxy; explicitly use GLOBAL, a region code, or a custom proxy when needed.

FieldTypeDescription
viewport{ width: number; height: number }Browser window size. CDP sessions convert it to the default window-size.
localestringBrowser locale such as en-US.
timezoneIdstringIANA timezone id such as Asia/Shanghai.
geolocation{ latitude: number; longitude: number }Optional geolocation coordinates.
proxyproxyCustom proxy configuration; cannot be combined with countryCode.
countryCode"GLOBAL" | stringManaged proxy region. GLOBAL selects a popular region; a specific region prefers trusted proxies with dynamic fallback. Omitted values prefer a random trusted proxy.
userAgentstringOverride the default User-Agent.
userAgentMode"custom" | "random"Set to random to let the server select from the User-Agent library; requests without a User-Agent default to random.
userAgentOs"windows" | "macos"Operating system used by random mode. Defaults to windows.
fingerprintfingerprintCDP fingerprint settings. When omitted, canvas and webGlImage default to real; other omitted signals use a coherent randomized profile.
cookiescookies[]Cookies injected before the session starts.

fingerprint

Every field is optional. Browser-task omissions default to random. CDP browserSettings set omitted canvas and webGlImage to real while generating other signals from a coherent randomized profile. When WebGL is real, WebGPU and hardware cannot be random.

FieldTypeDescription
webRtc"forward" | "real" | "disabled"Forward uses the proxy exit address; legacy random remains accepted as an alias.
webGl"random" | "real"WebGL vendor and renderer metadata.
webGpu"random" | "real" | "disabled"Random mode follows the WebGL GPU.
webGlImage"random" | "real"WebGL image noise.
canvas"random" | "real"Canvas noise.
audioContext"random" | "real"Audio fingerprint noise.
clientRects"random" | "real"Layout measurement noise.
speechVoices"random" | "real"OS-matched speech voice list.
fonts"random" | "real"OS-matched font list.
hardware"random" | "real"Generates CPU thread count and memory as a pair.
doNotTrack"random" | "enabled" | "disabled"Do Not Track preference.

proxy

Optional proxy configuration. Provide either server or protocol + host + port. Username and password must be supplied together.

FieldTypeDescription
serverstringFull proxy URL such as http://host:port or socks5://host:port. Credentials must not be embedded, and server cannot be combined with host.
protocol"http" | "socks5"Proxy protocol for the split form.
hoststringProxy host for the split form.
portnumber | numeric stringPort from 1 to 65535 for the split form.
usernamestringProxy username.
passwordstringProxy password.

cookies[]

Cookies written to the browser context before navigation.

FieldTypeDescription
nameRequiredstringCookie name.
valueRequiredstringCookie value.
domainRequiredstringTarget domain such as .example.com.
pathstringPath, defaults to /.
secureboolean | string | numberWhether the cookie is sent only over HTTPS.
httpOnlyboolean | string | numberWhether the cookie is inaccessible to client-side JavaScript.
hostOnlyboolean | string | numberWhether the cookie is host-only.
sameSitestringSameSite attribute.
sessionboolean | string | numberSet true for a session cookie.
expirationDate / expires / expirynumberUnix expiry timestamp in seconds; all three field names are accepted.

waitFor

Wait for a visible element or text after SPA navigation and actions. selector and text may be combined.

FieldTypeDescription
selectorstringWait for the first matching element to become visible.
textstringWait for the first element containing this text to become visible.
timeoutMsnumberDefaults to 15,000 and never exceeds the remaining task timeout.

field

SPA extract field definition. DOM fields read element content; network fields read the latest matching JSON response URL.

FieldTypeDescription
sourceRequired"dom" | "network"Field data source.
selectorstringCSS selector for a DOM field.
value"text" | "html" | "attribute"DOM read mode. Defaults to text.
attributestringAttribute name used when value=attribute.
urlIncludesstringSubstring used to match a response URL for a network field.
pathstringNetwork JSON path such as $.data.metrics[0].value.
multiplebooleanWhether a DOM field returns all matching elements.
parse"string" | "number" | "integer" | "boolean" | "json"Coerce the extracted value to the selected type.
regexstringOptional regular expression. Capture group 1 wins when present.
requiredbooleanMissing required fields return 422 SPA_REQUIRED_FIELDS_MISSING.

actions[]

Page interactions executed in array order. Each interactive step is capped at 30 seconds.

FieldTypeDescription
wait{ type: "wait"; milliseconds: number }Pause for 0-30,000ms.
waitForSelector{ type: "waitForSelector"; selector: string; timeoutMs?: number }Wait for the first matching element to become visible.
click{ type: "click"; selector: string }Click the first matching element.
fill{ type: "fill"; selector: string; value: string }Clear and fill the first matching input.
press{ type: "press"; selector: string; key: string }Press a key on the first matching element.
scroll{ type: "scroll"; selector?: string; x?: number; y?: number }Scroll an element into view or scroll the page by x/y. y defaults to 800.