Firecrawl Tool

Web scraping, crawling, and data extraction tool using Firecrawl v2 API. Can extract content from websites, crawl entire domains, map site structures, search the web, and extract structured data using AI. Perfect for both workflow automation and AI agent tools.

Overview

The Firecrawl Tool node enables web scraping, crawling, site mapping, web searching, and structured data extraction using the Firecrawl v2 API. It is designed for workflow automation and AI agent tools that require gathering or extracting information from the internet.

For the Search operation specifically, the node performs web searches based on a user-defined query. It can search multiple sources such as general web results, news articles, and images. Additionally, it offers an option to scrape the content of the search results for deeper data extraction.

Common scenarios:

  • Finding relevant web pages, news, or images related to a topic.
  • Automating research by retrieving and optionally scraping search results.
  • Localized searches by specifying a location.
  • Integrating search capabilities into workflows that need up-to-date information from the web.

Example:
Searching for "n8n workflow automation" with a limit of 5 results from web and news sources, optionally scraping the content of those results for further processing.

Properties

Name Meaning
Query The search query string to look up (e.g., "n8n workflow automation").
Search Options Collection of options including:
- Limit: Number of search results to return (default 5).
- Sources: Which sources to search from; options are Web, News, Images (default is Web).
- Scrape Results: Boolean flag whether to scrape the content of each search result (default false).
- Location: String specifying location for localized search results (e.g., "United States").

Output

The output is a JSON object containing the search results returned by the Firecrawl API. The structure typically includes an array of search result items with metadata such as titles, URLs, snippets, and possibly scraped content if that option was enabled.

If scraping of results is enabled, the output will include the extracted content in markdown format focused on the main content of each result.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for the Firecrawl API.
  • The node makes HTTP requests to the Firecrawl API endpoint (default https://api.firecrawl.dev).
  • Proper configuration of the Firecrawl API credentials in n8n is necessary.

Troubleshooting

  • Missing API Key: If the API key is not set in credentials, the node throws an error indicating the Firecrawl API key is required.
  • Unknown Operation: If an unsupported operation is selected, an error is thrown.
  • API Request Failures: Network issues or invalid parameters may cause HTTP request errors. Check API key validity and parameter correctness.
  • Timeouts: For other operations like crawl, timeouts may occur, but for search, responses should be immediate.
  • Invalid JSON: If any JSON input fields (not applicable here) are malformed, errors will be raised.

To resolve:

  • Ensure the Firecrawl API key is correctly configured.
  • Verify all required parameters are provided and valid.
  • Check network connectivity to the Firecrawl API endpoint.

Links and References

Discussion