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§
Structs§
- Agent
Options - Options for running an agent task.
- Agent
Response - Response from starting an agent task.
- Agent
Status Response - Status response from an agent task.
- Agent
Webhook Config - Agent webhook configuration.
- Attribute
Result - Extracted attribute result.
- Attribute
Selector - Attribute extraction selector.
- Batch
Scrape Job - Status of a batch scrape job.
- Batch
Scrape Options - Options for batch scraping.
- Batch
Scrape Response - Response from starting a batch scrape job.
- Cancel
Crawl Response - Response from canceling a crawl.
- Change
Tracking Options - Change tracking format options.
- Client
- Firecrawl API v2 client.
- Crawl
Error - Crawl error information.
- Crawl
Errors Response - Crawl errors response.
- Crawl
Job - Status of a crawl job.
- Crawl
Options - Options for crawling a website.
- Crawl
Response - Response from starting a crawl job.
- Create
Monitor Request - Document
- Document returned from scrape operations.
- Document
Metadata - Document metadata returned from scrape operations.
- GitHub
Search Item - GitHub
Search Response - Highlights
Format - Highlights format for selecting direct highlights from page content.
- Json
Options - JSON extraction options.
- Location
Config - Location configuration for proxy routing.
- MapOptions
- Options for mapping a URL.
- MapResponse
- Response from map endpoint.
- Menu
- Menu extraction result for a page.
- Menu
Availability - Availability information for a menu item.
- Menu
Image - An image associated with a menu item.
- Menu
Item - An item on a menu.
- Menu
Item Identifiers - Identifiers for a menu item.
- Menu
Merchant - Merchant information for a menu.
- Menu
Price - Price information for a menu item.
- Menu
Section - A section of a menu.
- Monitor
- Monitor
Check - Monitor
Check Detail - Monitor
Check Page - Monitor
Json Field Diff - Per-field diff entry returned for monitors that requested JSON extraction.
- Monitor
Page Diff - Diff payload returned alongside a monitor page when its scrape produced a change. The shape depends on what the monitor’s formats asked for:
- Monitor
Page Judgment - Judge’s verdict on whether a page change is meaningful. Populated on
monitor check pages when the monitor has a
goalset and judging is enabled. - Monitor
Page Snapshot - Snapshot of the current JSON extraction at this run. Present on JSON and mixed-mode monitors; absent for markdown-only.
- Monitor
Schedule - Monitor
Summary - Paper
Metadata - Paper
Metadata Response - Paper
Result - Parse
File - Uploaded file payload for the
/v2/parseendpoint. - Parse
Options - Options accepted by the
/v2/parseendpoint. - Passage
- Product
- Product extraction result for a page.
- Product
Availability - Availability information for a product.
- Product
Image - An image associated with a product.
- Product
Price - Price information for a product.
- Product
Sale - Sale information for a product variant.
- Product
Variant - A variant of a product.
- Profile
Config - Persistent browser profile for maintaining state across scrapes.
- Query
Format - Deprecated query format for asking a question about page content.
- Question
Format - Question format for asking a question about page content.
- Read
Paper Options - Read
Paper Response - Related
Papers Options - Scrape
Browser Delete Response - Response from deleting a scrape-bound browser session.
- Scrape
Execute Options - Options for executing code or a prompt in a scrape-bound browser session.
- Scrape
Execute Response - Response from scrape-bound browser execution.
- Scrape
Options - Options for scraping a URL.
- Screenshot
Options - Screenshot format options.
- Search
Data - Search results data structure.
- Search
GitHub Options - Search
Options - Options for search requests.
- Search
Papers Options - Search
Papers Response - Search
Response - Response from search endpoint.
- Search
Result Image - Image search result.
- Search
Result News - News search result.
- Search
Result Web - Web search result.
- Similar
Papers Response - Update
Monitor Request - Viewport
- Viewport dimensions for screenshots.
- Webhook
Config - Webhook configuration for async operations.
Enums§
- Action
- Browser action types for automation.
- Agent
Model - Agent model types.
- Agent
Status - Agent task status.
- Agent
Webhook Event - Agent-specific webhook event types.
- Change
Tracking Mode - Available change tracking modes.
- Format
- Available output formats for scraping operations.
- JobStatus
- Job status types for crawl and batch operations.
- Parse
Format - Output formats accepted by
/v2/parse. - Parse
Proxy Type - Proxy settings accepted by
/v2/parse. - Parser
Config - Parser configuration for document parsing.
- PdfFormat
- PDF format options.
- Proxy
Type - Proxy type for scraping.
- Query
Format Mode - Query answer mode.
- Scrape
Execute Language - Supported languages for scrape-bound browser execution.
- Scroll
Direction - Scroll direction for scroll actions.
- Search
Category - Search category types.
- Search
Result OrDocument - A search result that may be a simple result or a full document.
- Search
Source - Search source types.
- Sitemap
Mode - Sitemap handling mode.
- Webhook
Event - Webhook event types for crawl/batch operations.