refs), then use those refs to interact with elements.
The Interaction Loop
- Navigate to a URL within the session’s
allowed_domains. - Observe to capture a snapshot of the page — returns
observation_idandrefs. - Interact using the
observation_idand areffrom step 2.
Observe
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
Theobservation_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 anobservation_id and refs, interact with elements:
Click
Fill (text input)
Select (dropdown)
include_observation Shortcut
Useinclude_observation: true on a click or navigate action to get a fresh observation in the same response — saving a separate observe round-trip:
observation_id and refs for the page that resulted from the click.