Example tasks
Crawl a URL using Firecrawl
This example demonstrates how to crawl a URL using Firecrawl with Trigger.dev.
Overview
Firecrawl is a tool for crawling websites and extracting clean markdown that’s structured in an LLM-ready format.
Here are two examples of how to use Firecrawl with Trigger.dev:
Prerequisites
- A project with Trigger.dev initialized
- A Firecrawl account
Example 1: crawl an entire website with Firecrawl
This task crawls a website and returns the crawlResult
object. You can set the limit
parameter to control the number of URLs that are crawled.
trigger/firecrawl-url-crawl.ts
Testing your task
You can test your task by triggering it from the Trigger.dev dashboard.
Example 2: scrape a single URL with Firecrawl
This task scrapes a single URL and returns the scrapeResult
object.
trigger/firecrawl-url-scrape.ts
Testing your task
You can test your task by triggering it from the Trigger.dev dashboard.
Was this page helpful?