Note: this is using v0 version of the Firecrawl API which is being deprecated. We recommend switching to v1.
Installation
To install the Firecrawl Rust SDK, add the following to yourCargo.toml:
Usage
- Get an API key from firecrawl.dev
- Set the API key as an environment variable named
FIRECRAWL_API_KEYor pass it as a parameter to theFirecrawlAppstruct.
Scraping a URL
To scrape a single URL with error handling, use thescrape_url method. It takes the URL as a parameter and returns the scraped data as a serde_json::Value.
Crawling a Website
To crawl a website, use thecrawl_url method. It takes the starting URL and optional parameters as arguments. The params argument allows you to specify additional options for the crawl job, such as the maximum number of pages to crawl, allowed domains, and the output format.
Checking Crawl Status
To check the status of a crawl job, use thecheck_crawl_status method. It takes the job ID as a parameter and returns the current status of the crawl job.
Canceling a Crawl Job
To cancel a crawl job, use thecancel_crawl_job method. It takes the job ID as a parameter and returns the cancellation status of the crawl job.
Extracting structured data from a URL
With LLM extraction, you can easily extract structured data from any URL. Here is how you to use it:Search for a query
To search the web, get the most relevant results, scrape each page and return the markdown, use thesearch method. The method takes the query as a parameter and returns the search results.

