Firecrawl Elixir Agent Quickstart
Canonical quickstart for external agents. Generated from SDK source (firecrawl hex package v1.11.0) and the v2 OpenAPI spec. The Elixir client is auto-generated from the OpenAPI spec; function names match the spec operation IDs.
Install
Add tomix.exs:
Authenticate
opts keyword list with :api_key and :base_url (default https://api.firecrawl.dev/v2) overrides. Scrape, search, and interact work without an API key (keyless free tier, rate-limited by IP).
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.
Search
Why use it
Discover relevant pages from a query, then pick URLs to scrape or interact with. Constrain results to a site withsite:.
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
Format strings:
"markdown", "html", "rawHtml", "links", "images", "screenshot", "summary", "changeTracking", "json", "branding", "audio", "video".
Format maps:
%{type: "json", prompt: "...", schema: %{...}}%{type: "question", question: "..."}%{type: "highlights", query: "..."}%{type: "screenshot", fullPage: true, quality: 80, viewport: %{width: 1280, height: 720}}%{type: "changeTracking", modes: ["git-diff"], tag: "..."}
Interact
Why use it
Execute code in the browser session tied to a scrape job. The Elixir SDK exposes code-based interactions only (noprompt parameter).
Preferred SDK method
Firecrawl.interact_with_scrape_browser_session(job_id, params \\ [], opts \\ [])
Example
Parameters
Notes
- The Elixir client is auto-generated from the OpenAPI spec via
mix run generate.exs. - Every function has a bang (
!) variant:scrape_and_extract_from_url!/2raises on error instead of returning{:error, _}. - Parameters are snake_case keyword lists, auto-converted to camelCase for the JSON body.
- Atoms are accepted for enum values (
:basic,:node, etc.) and auto-stringified. originis auto-injected as"elixir-sdk@<version>"when not set.- This SDK exposes code-based interactions only — there is no
promptparameter on the interact function (unlike Node.js, Python, and Rust SDKs).
Source Of Truth
firecrawl/apps/elixir-sdk/mix.exsfirecrawl/apps/elixir-sdk/lib/firecrawl.exfirecrawl-docs/api-reference/v2-openapi.json

