Skip to main content

Crate firecrawl

Crate firecrawl 

Source
Expand description

Firecrawl Rust SDK

This SDK provides access to the Firecrawl v2 API for web scraping, crawling, searching, mapping, batch scraping, and agent operations.

§Quick Start

use firecrawl::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new("your-api-key")?;
    let document = client.scrape("https://example.com", None).await?;
    println!("{:?}", document.markdown);
    Ok(())
}

Re-exports§

pub use error::FirecrawlError;

Modules§

error

Structs§

AgentOptions
Options for running an agent task.
AgentResponse
Response from starting an agent task.
AgentStatusResponse
Status response from an agent task.
AgentWebhookConfig
Agent webhook configuration.
AttributeResult
Extracted attribute result.
AttributeSelector
Attribute extraction selector.
BatchScrapeJob
Status of a batch scrape job.
BatchScrapeOptions
Options for batch scraping.
BatchScrapeResponse
Response from starting a batch scrape job.
CancelCrawlResponse
Response from canceling a crawl.
ChangeTrackingOptions
Change tracking format options.
Client
Firecrawl API v2 client.
CrawlError
Crawl error information.
CrawlErrorsResponse
Crawl errors response.
CrawlJob
Status of a crawl job.
CrawlOptions
Options for crawling a website.
CrawlResponse
Response from starting a crawl job.
CreateMonitorRequest
Document
Document returned from scrape operations.
DocumentMetadata
Document metadata returned from scrape operations.
GitHubSearchItem
GitHubSearchResponse
HighlightsFormat
Highlights format for selecting direct highlights from page content.
JsonOptions
JSON extraction options.
LocationConfig
Location configuration for proxy routing.
MapOptions
Options for mapping a URL.
MapResponse
Response from map endpoint.
Menu
Menu extraction result for a page.
MenuAvailability
Availability information for a menu item.
MenuImage
An image associated with a menu item.
MenuItem
An item on a menu.
MenuItemIdentifiers
Identifiers for a menu item.
MenuMerchant
Merchant information for a menu.
MenuPrice
Price information for a menu item.
MenuSection
A section of a menu.
Monitor
MonitorCheck
MonitorCheckDetail
MonitorCheckPage
MonitorJsonFieldDiff
Per-field diff entry returned for monitors that requested JSON extraction.
MonitorPageDiff
Diff payload returned alongside a monitor page when its scrape produced a change. The shape depends on what the monitor’s formats asked for:
MonitorPageJudgment
Judge’s verdict on whether a page change is meaningful. Populated on monitor check pages when the monitor has a goal set and judging is enabled.
MonitorPageSnapshot
Snapshot of the current JSON extraction at this run. Present on JSON and mixed-mode monitors; absent for markdown-only.
MonitorSchedule
MonitorSummary
PaperMetadata
PaperMetadataResponse
PaperResult
ParseFile
Uploaded file payload for the /v2/parse endpoint.
ParseOptions
Options accepted by the /v2/parse endpoint.
Passage
Product
Product extraction result for a page.
ProductAvailability
Availability information for a product.
ProductImage
An image associated with a product.
ProductPrice
Price information for a product.
ProductSale
Sale information for a product variant.
ProductVariant
A variant of a product.
ProfileConfig
Persistent browser profile for maintaining state across scrapes.
QueryFormat
Deprecated query format for asking a question about page content.
QuestionFormat
Question format for asking a question about page content.
ReadPaperOptions
ReadPaperResponse
RelatedPapersOptions
ScrapeBrowserDeleteResponse
Response from deleting a scrape-bound browser session.
ScrapeExecuteOptions
Options for executing code or a prompt in a scrape-bound browser session.
ScrapeExecuteResponse
Response from scrape-bound browser execution.
ScrapeOptions
Options for scraping a URL.
ScreenshotOptions
Screenshot format options.
SearchData
Search results data structure.
SearchGitHubOptions
SearchOptions
Options for search requests.
SearchPapersOptions
SearchPapersResponse
SearchResponse
Response from search endpoint.
SearchResultImage
Image search result.
SearchResultNews
News search result.
SearchResultWeb
Web search result.
SimilarPapersResponse
UpdateMonitorRequest
Viewport
Viewport dimensions for screenshots.
WebhookConfig
Webhook configuration for async operations.

Enums§

Action
Browser action types for automation.
AgentModel
Agent model types.
AgentStatus
Agent task status.
AgentWebhookEvent
Agent-specific webhook event types.
ChangeTrackingMode
Available change tracking modes.
Format
Available output formats for scraping operations.
JobStatus
Job status types for crawl and batch operations.
ParseFormat
Output formats accepted by /v2/parse.
ParseProxyType
Proxy settings accepted by /v2/parse.
ParserConfig
Parser configuration for document parsing.
PdfFormat
PDF format options.
ProxyType
Proxy type for scraping.
QueryFormatMode
Query answer mode.
ScrapeExecuteLanguage
Supported languages for scrape-bound browser execution.
ScrollDirection
Scroll direction for scroll actions.
SearchCategory
Search category types.
SearchResultOrDocument
A search result that may be a simple result or a full document.
SearchSource
Search source types.
SitemapMode
Sitemap handling mode.
WebhookEvent
Webhook event types for crawl/batch operations.