Firecrawl Elixir Agent Quickstart
Canonical quickstart for external agents. Generated from SDK source (:firecrawl Hex package) and the v2 OpenAPI spec. Function names and parameters match the SDK public API. The Elixir client is OpenAPI-generated — function names and parameter keys come from the spec.
Install
Add tomix.exs:
Authenticate
api_key and base_url (default "https://api.firecrawl.dev/v2") as trailing opts. A nil/empty key falls back to the keyless free tier.
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. Requires a scrape job ID.
Search
Why use it
Discover relevant pages from a query, then pick URLs to scrape or interact with. Constrain results to a site withsite: in the query.
Preferred SDK method
Firecrawl.search_and_scrape(params \\ [], opts \\ []) → {:ok, Req.Response.t()} | {:error, Exception.t()}
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 \\ []) → {:ok, Req.Response.t()} | {:error, Exception.t()}
Example
Parameters
Interact
Why use it
Execute code in the browser session tied to a prior scrape. The Elixir SDK supports code-based interactions only (noprompt parameter).
Preferred SDK method
Firecrawl.interact_with_scrape_browser_session(job_id, params \\ [], opts \\ []) → {:ok, Req.Response.t()} | {:error, Exception.t()}
Example
Parameters
Stop the session with
Firecrawl.stop_interactive_scrape_browser_session(job_id).
Notes
- Every function has a bang (
!) variant that raises on error instead of returning{:error, _}. - The Elixir client is OpenAPI-generated; function names come from the spec (e.g.
search_and_scrape,scrape_and_extract_from_url). - This SDK exposes code-based interactions only — no
promptparameter oninteract_with_scrape_browser_session(unlike Node.js, Python, and Rust SDKs). - Uses snake_case parameter keys. Maps use camelCase keys for format objects (e.g.
%{type: "json", prompt: "..."}). - No deprecated aliases exist — function names have been stable since the OpenAPI codegen.
Source Of Truth
firecrawl/apps/elixir-sdk/mix.exsfirecrawl/apps/elixir-sdk/lib/firecrawl.exfirecrawl-docs/api-reference/v2-openapi.json

