Firecrawl Rust SDK is a library to help you easily scrape and crawl websites, and output the data in a format ready for use with language models (LLMs).
Note: this is using v0 version of the Firecrawl API which is being deprecated. We recommend switching to v1.
Cargo.toml
:
FIRECRAWL_API_KEY
or pass it as a parameter to the FirecrawlApp
struct.scrape_url
method. It takes the URL as a parameter and returns the scraped data as a serde_json::Value
.
crawl_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.
check_crawl_status
method. It takes the job ID as a parameter and returns the current status of the crawl job.
cancel_crawl_job
method. It takes the job ID as a parameter and returns the cancellation status of the crawl job.
search
method. The method takes the query as a parameter and returns the search results.