Skip to main content
The API uses a semantic observation model: instead of clicking on pixel coordinates, you observe the DOM to get element references (refs), then use those refs to interact with elements.

The Interaction Loop

  1. Navigate to a URL within the session’s allowed_domains.
  2. Observe to capture a snapshot of the page — returns observation_id and refs.
  3. Interact using the observation_id and a ref from step 2.

Observe

Full tree and refs are available in the original successful submission response when the action completes within wait_seconds. GET polling and idempotent replays return observation metadata with tree: "", refs: {}, and ref_count instead of the full snapshot. After a 202, wait for the action to finish, then submit a fresh observe with wait_seconds=25 to obtain usable refs. Do not reuse sample refs from this page.

Response Fields

Why observation_id Expires

The observation_id is invalidated when the page navigates. After any navigate action (including a click that triggers a navigation), you must call observe again to get a fresh observation_id and refs. Attempting to use a stale observation_id fails the action. The response is still HTTP 200 — the failure is on the action resource:

Interact by Ref

Once you have an observation_id and refs, interact with elements:

Click

Fill (text input)

Select (dropdown)

include_observation Shortcut

Use include_observation: true on a click or navigate action to get a fresh observation in the same response — saving a separate observe round-trip:
The response will include a new observation_id and refs for the page that resulted from the click.