Firecrawl Rust Agent Quickstart
Canonical quickstart for external agents integrating Firecrawl with Rust. Generated from SDK source and OpenAPI spec.Install
Authenticate
FIRECRAWL_API_KEY environment variable for keyless initialization (handled at the application level — the SDK accepts an empty or None key for keyless free tier).
When To Use What
- search: Start with a query, discover relevant URLs, and get their content in one call.
- scrape: You already have a URL and want its page content as markdown, HTML, JSON, or other formats.
- interact: The page needs clicks, form fills, or post-scrape browser actions on a live session.
Search
Why use it
Search the web for a query and get scraped content from the top results. Combines discovery and content extraction in one call.Preferred SDK method
client.search(query, options)
Example
Parameters
All fields onSearchOptions are Option<T> and default to None.
There is also a convenience method
client.search_and_scrape(query, limit) that returns Vec<Document> directly.
Scrape
Why use it
Get the content of a single URL as markdown, HTML, JSON, screenshots, or other formats.Preferred SDK method
client.scrape(url, options)
Example
Parameters
All fields onScrapeOptions are Option<T> and default to None.
There is also a convenience method
client.scrape_with_schema(url, schema, prompt) for JSON extraction.
Interact
Why use it
Control a live browser session tied to a scrape job. Click buttons, fill forms, navigate, and extract dynamic content using code or natural-language prompts.Preferred SDK method
client.interact(job_id, options)
Example
Parameters
All fields onScrapeExecuteOptions are Option<T> and default to None.
Stop the session when done:
Notes
- All option structs use snake_case fields and derive
Default— use struct literal syntax with..Default::default(). - The
optionsparameter onscrapeandsearchacceptsimpl Into<Option<T>>, so you can passNonedirectly to skip options. - The
originfield is automatically set to the SDK version string if not provided. - Deprecated aliases (do not use in new code):
scrape_execute()→ useinteract()stop_interactive_browser()/delete_scrape_browser()→ usestop_interaction()
Source Of Truth
firecrawl/apps/rust-sdk/src/client.rsfirecrawl/apps/rust-sdk/src/scrape.rsfirecrawl/apps/rust-sdk/src/search.rsfirecrawl/apps/rust-sdk/Cargo.tomlfirecrawl-docs/api-reference/v2-openapi.json

