Skip to content

Actions

actions lets you run browser interactions (click/type/wait/scroll/execute JS) before extracting content.

  • actions run sequentially
  • up to 50 actions per request
  • combined wait time (wait actions + waitFor) should not exceed 60s
  • actions are not supported for PDFs: if the URL resolves to a PDF, avoid actions or the request will fail

Wait by duration or wait until an element is visible (choose one).

{ type: 'wait', milliseconds: 1000 }
{ type: 'wait', selector: '#content' }
FieldTypeNotes
millisecondsnumberFixed delay
selectorstringWait until visible (30s timeout)
{ type: 'click', selector: '#accept' }
{ type: 'click', selector: '.expand', all: true }
FieldTypeNotes
selectorstringCSS selector
allbooleanClick all matches
{ type: 'click', selector: '#q' }
{ type: 'write', text: 'firecrawl' }
FieldTypeNotes
textstringText to type (usually requires a prior click to focus)
{ type: 'press', key: 'Enter' }
FieldTypeNotes
keystringe.g. Enter/Tab/Escape
{ type: 'scroll', direction: 'down' }
{ type: 'scroll', selector: '.list' }
FieldTypeNotes
direction"up" | "down"Defaults to down
selectorstringScroll a specific container
{ type: 'screenshot', fullPage: true, quality: 80 }
FieldTypeNotes
fullPagebooleanFull page
qualitynumberQuality setting
viewportobject{ width, height }
{ type: 'scrape' }

Captures current HTML into data.actions.scrapes.

{ type: 'executeJavascript', script: "document.title" }

Return values are captured in data.actions.javascriptReturns.

{ type: 'pdf', format: 'A4', landscape: false, scale: 1 }
FieldTypeNotes
formatstringe.g. A0-A6 / Letter / Legal
landscapebooleanLandscape mode
scalenumberScale factor