The actions array lists browser interactions performed before extraction, in order. It is accepted by scrape_unblocker, get_html and discover_api_endpoints, and works in browser mode only. The same array may also be placed inside options.actions; the two placements are equivalent.

Action fields

  • type (required) — wait, click, scroll, type, hover or fill_form.
  • selector (string) — the target element. For scroll, the CSS selector of a scrollable element to scroll inside instead of the page; fails if it matches nothing.
  • milliseconds (number) — duration for wait.
  • direction ("up" \| "down", default down) — for scroll.
  • amount (number, default 800) — pixels for scroll.
  • text (string) — the text to type for type.
  • fields (array of { selector, value }) — required for fill_form. value is always a string, even for numbers; for a checkbox or radio target the element and send "true".
  • submit (string) — for fill_form, the CSS selector of the submit element. It is clicked after filling and navigation is awaited.

Basic sequence

"actions": [
  { "type": "wait", "milliseconds": 1000 },
  { "type": "click", "selector": "#accept-cookies" },
  { "type": "scroll", "direction": "down", "amount": 800 },
  { "type": "wait", "selector": ".product-grid" }
]

Scrolling inside an element

{ "type": "scroll", "selector": "#results-list", "amount": 1200 }

With a selector, only that element scrolls and the page stays put, which is what infinite-scroll lists and scrollable dropdowns need.

Filling and submitting a form

{
  "type": "fill_form",
  "fields": [
    { "selector": "input[name=q]", "value": "running shoes" },
    { "selector": "select#size", "value": "42" },
    { "selector": "input[name=in_stock]", "value": "true" }
  ],
  "submit": "button[type=submit]"
}

fill_form is the correct way to submit an HTML form in browser mode. options.method: "POST" is rejected there; it exists for http mode only.

Waking a lazy endpoint

With discover_api_endpoints, actions exist to make lazily-triggered endpoints fire: scroll to a paginated section, click a "Reviews" tab, run a search with fill_form. The page always renders in a real browser there, so every action type is available.

Only these six action types are accepted by the MCP schema. Other actions the REST API may support, such as screenshots or executing arbitrary JavaScript, are not exposed here and will fail validation before anything is sent.

Order matters. Dismiss overlays first, put a wait after each interaction so the DOM can update, and raise options.timeout_seconds as the chain grows.

Last updated: September 22, 2026