Skip to content

Using a browser session

Updated View as Markdown

Read the created session and use its returned connectUrl with a compatible Chromium CDP client. Keep connection URLs private. You can also use bounded native HTTP actions without a browser SDK.

curl -X POST "https://api.tooluse.net/v1/browsers/sessions/$SESSION_ID/actions" \
  -H "Authorization: Bearer $TOOLUSE_API_KEY" \
  -H "Idempotency-Key: tooluse-example-001" \
  -H "Content-Type: application/json" \
  -d '{"action":{"kind":"navigate","url":"https://example.com"}}'

An action returns an observation. Use that observation’s ID and element references for later click, fill or select actions. A stale reference returns 409 stale_observation. Password, card and file input fields are refused by ordinary fill actions. Human checks return an awaiting-user state; use a handoff instead of bypassing the check.

curl -X POST "https://api.tooluse.net/v1/browsers/sessions/$SESSION_ID" \
  -H "Authorization: Bearer $TOOLUSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"REQUEST_RELEASE"}'

Type to search…

↑↓ navigate↵ selectEsc close