Firecrawl icon

Firecrawl

Scrape, crawl, map, search, and extract structured data from websites using Firecrawl API

Interact → Execute interaction

AI-generated

Overview

This node interacts with a web page based on a previous scrape job using the Firecrawl API. It allows users to resume a browser session at the exact page state from a scrape and perform interactions either by natural language prompts or by executing code (JavaScript with Playwright, Python with Playwright, or Bash commands). This is useful for automating web interactions such as clicking buttons, typing into fields, scrolling, extracting data, or running custom scripts in the browser context.

Use Case Examples

  1. Automate login by describing the action in natural language, e.g., 'Click the Sign In button and wait for the login form to appear'.
  2. Run custom Playwright code to navigate through pages and extract information.
  3. Use Bash commands to perform simple browser interactions with predefined CLI commands.

Properties

Name Meaning
Scrape ID The scrape job ID from a previous Scrape operation to resume the browser session at the exact page state.
Mode How to interact with the page: 'Prompt' for natural language instructions or 'Code' to execute Playwright or agent-browser CLI code directly.
Prompt Natural language instruction for the AI agent describing a single focused task to perform on the page.
Code Valid code to execute in the browser sandbox matching the selected language (Node.js, Python, or Bash CLI commands).
Language Programming language for code execution: Node (JavaScript), Python, or Bash CLI commands.
Timeout (Seconds) Maximum execution time in seconds for the interaction before it is killed.
Use Custom Body Whether to use a custom request body instead of the standard properties.
Request Options Additional request options such as batching, SSL certificate handling, proxy, and timeout settings.

Output

JSON

  • data - The main response data from the interaction execution.
  • killed - Indicates if the interaction was killed due to timeout.
  • metadata
    • scrapeId - The scrape job ID used to resume the browser session.

Dependencies

  • Firecrawl API key credential

Troubleshooting

  • Ensure the scrapeId is valid and corresponds to a previous scrape job; otherwise, the session cannot resume correctly.
  • If using 'Code' mode, ensure the code matches the selected language and is valid Playwright or CLI commands; invalid code will cause execution errors.
  • Timeout errors occur if the interaction takes longer than the specified timeout; increase the timeout for complex or multi-step interactions.
  • If SSL issues occur, consider enabling 'Ignore SSL Issues' in request options or configure a valid proxy if needed.

Links

Discussion