Firecrawl Elixir Agent Quickstart
Canonical quickstart for external agents. Generated fromfirecrawl hex package source (v1.11.3) and the v2 OpenAPI spec. Function names and parameters match the SDK public API.
Install
Add tomix.exs:
Authenticate
When To Use What
search: use when you start with a query and need discovery. Returns matching pages you can then scrape.scrape: use when you already have a URL and want page content in markdown, HTML, JSON, or other formats.interact: use when the page needs clicks, forms, or post-scrape browser actions.
Search
Why use it
Discover relevant pages from a query, then pick URLs to scrape or interact with. Constrain results to a site withsite:, e.g. site:docs.firecrawl.dev crawl webhooks.
Preferred SDK method
Firecrawl.search_and_scrape(params \\ [], opts \\ [])
Example
Parameters
Scrape
Why use it
Get structured content from a URL in one or more formats.Preferred SDK method
Firecrawl.scrape_and_extract_from_url(params \\ [], opts \\ [])
Example
Parameters
Interact
Why use it
Control the browser session tied to a scrape job. The Elixir SDK supports code-based interactions (noprompt parameter on the scrape-bound interact).
Preferred SDK method
Firecrawl.interact_with_scrape_browser_session(job_id, params \\ [], opts \\ [])
Example
Parameters
Stop session:
Firecrawl.stop_interactive_scrape_browser_session(job_id) ends the browser session.
Standalone interact sessions
The Elixir SDK also exposes standalone interact sessions (not tied to a scrape):Firecrawl.create_browser_session(params, opts)— create a standalone session withttl,activity_ttl,stream_web_view,profile.Firecrawl.execute_browser_code(session_id, params, opts)— execute code withcode,language,timeout.Firecrawl.delete_browser_session(session_id, opts)— destroy the session.Firecrawl.list_browser_sessions(params, opts)— list sessions, optionally filtered bystatus(:active,:destroyed).
Notes
- The Elixir client is auto-generated from the OpenAPI spec. Function names are OpenAPI operation IDs converted to snake_case.
- Every function has a bang (
!) variant that raises on error instead of returning{:error, _}. - Snake_case params are automatically converted to camelCase for the JSON API body.
- This SDK exposes code-based interactions only on the scrape-bound endpoint (no
promptparameter oninteract_with_scrape_browser_session).
Source Of Truth
firecrawl/apps/elixir-sdk/lib/firecrawl.exfirecrawl/apps/elixir-sdk/mix.exsfirecrawl-docs/api-reference/v2-openapi.json

