Skip to content

Interact action types

TypeRequired fieldsPurpose
navigateurlMove to a new URL inside the same session.
clickselectorClick a DOM element.
fillselector, valueFill an input or textarea.
waitmsSleep for a fixed duration.
wait_for_selectorselectorWait until the selector appears.
presskeySend a keyboard key.
scrollamount or selectorScroll the page or a target element.
screenshotnoneCapture the rendered state.
extractformatReturn markdown, html, or text.

Action planning tips

  • prefer wait_for_selector over blind sleeps whenever possible
  • use extract as the final action so the payload reflects the completed state
  • keep actions small and deterministic; split very long flows into multiple calls with profile_id

Action type baseline

```bash curl https://api.faircompany.ai/v1/crawl/interact \ -X POST \ -H "Authorization: Bearer fc_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/login", "actions": [ { "type": "fill", "selector": "#email", "value": "user@example.com" }, { "type": "fill", "selector": "#password", "value": "super-secret" }, { "type": "click", "selector": "button[type=\"submit\"]" }, { "type": "wait_for_selector", "selector": ".dashboard", "timeout_ms": 10000 }, { "type": "extract", "format": "markdown" } ] }' ```