Skip to main content

Firecrawl Rust Agent Quickstart

Canonical quickstart for external agents. Generated from SDK source (firecrawl crate) and the OpenAPI spec. Use this file to get an agent calling Firecrawl correctly in one pass.

Install

Add to your Cargo.toml:

Authenticate

No API key is required for scrape, search, and interact — they fall back to a keyless free tier (rate-limited per IP).

When To Use What

  • search: Start with a text query and need to discover relevant URLs and content across the web.
  • scrape: Already have a URL and want page content (markdown, HTML, structured JSON, screenshots, etc.).
  • interact: The page needs clicks, form fills, or post-scrape browser actions — run code or a prompt against the live browser session.

Why use it

Search the web and optionally scrape each result. Returns categorized results (web, news, images) with optional content scraping.

Preferred SDK method

Example

There is also a convenience method that searches and returns scraped Documents directly:

Parameters

All fields on SearchOptions are Option and default to None. Use ..Default::default() for unset fields.

Scrape

Why use it

Fetch a single URL and extract content in various formats: markdown, HTML, structured JSON, screenshots, audio, video, and more. Handles JavaScript rendering, ad blocking, proxies, and caching.

Preferred SDK method

Example

For structured JSON extraction with a schema:

Parameters

All fields on ScrapeOptions are Option and default to None. Use ..Default::default() for unset fields.

Interact

Why use it

Execute code or a natural-language prompt against the live browser session from a previous scrape. Use it to click buttons, fill forms, navigate, or extract dynamic content that only appears after user interaction.

Preferred SDK method

Example

Parameters

ScrapeExecuteOptions fields: Stop the session when done:

Notes

  • Rust fields use snake_case (only_main_content, skip_tls_verification); they are serialized as camelCase for the wire via #[serde(rename_all = "camelCase")].
  • All option structs derive Default — use ..Default::default() for unset fields.
  • The options parameter on scrape and search accepts impl Into<Option<T>>, so you can pass None directly for no options.
  • Deprecated aliases (use the preferred names above):
    • scrape_executeinteract
    • stop_interactive_browser / delete_scrape_browserstop_interaction
  • The Query format variant (QueryFormat) is deprecated in favor of Question or Highlights.

Source Of Truth

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