Skip to main content
Canonical Firecrawl Rust quickstart for external agents. Aligned with firecrawl crate v2.12.1 (firecrawl/apps/rust-sdk) and the v2 OpenAPI spec.

Install

Authenticate

When To Use What

  • search: use when you start with a query and need discovery.
  • scrape: use when you already have a URL and want page content.
  • interact: use when the page needs clicks, forms, or post-scrape browser actions.

Why use it

Use search to discover relevant pages from a query, then pick URLs to scrape or interact with. You can constrain results to a site with site:, for example site:docs.firecrawl.dev crawl webhooks.

Preferred SDK method

client.search(query, options)Result<SearchResponse, FirecrawlError>

Example

Parameters

Return value: SearchResponse containing success: bool, data: SearchData, warning: Option<String>. SearchData has web: Option<Vec<SearchResultOrDocument>>, news: Option<Vec<SearchResultNews>>, images: Option<Vec<SearchResultImage>>.

Scrape

Why use it

Use scrape when you already have a URL and want structured content in one or more formats.

Preferred SDK method

client.scrape(url, options)Result<Document, FirecrawlError>

Example

Parameters

Interact

Why use it

Use interact when a page requires browser actions or code execution after a scrape starts.

Preferred SDK method

client.interact(job_id, options)Result<ScrapeExecuteResponse, FirecrawlError>

Example

Parameters

Stop session

client.stop_interaction(job_id)Result<ScrapeBrowserDeleteResponse, FirecrawlError> Ends the scrape-bound browser session. Response includes success, session_duration_ms, credits_billed.

Notes

  • Deprecated aliases: scrape_executeinteract; stop_interactive_browser and delete_scrape_browserstop_interaction.
  • ScrapeOptions uses dedicated json_options, screenshot_options, change_tracking_options for advanced format configuration (unlike JS/Python which use inline format objects).
  • search_and_scrape(query, limit) is a convenience helper that searches then returns Vec<Document>.
  • All types are exported at the crate root: use firecrawl::Client.
  • All option structs derive Default; use ..Default::default() to fill unset fields.

Source Of Truth

  • firecrawl/apps/rust-sdk/Cargo.toml
  • firecrawl/apps/rust-sdk/src/lib.rs
  • firecrawl/apps/rust-sdk/src/client.rs
  • firecrawl/apps/rust-sdk/src/scrape.rs
  • firecrawl/apps/rust-sdk/src/search.rs
  • firecrawl/apps/rust-sdk/src/types.rs
  • firecrawl-docs/api-reference/v2-openapi.json