Firecrawl Elixir Agent Quickstart
Canonical quickstart for external agents integrating Firecrawl with Elixir. Generated from SDK source and OpenAPI spec. The Elixir SDK is auto-generated from the OpenAPI spec, so function names mirror the API operation names.Install
Add tomix.exs:
Authenticate
Add to your config:api_key per-request:
opts keyword list supporting:
Additional keys in
opts are passed through to Req.
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
Firecrawl.search_and_scrape(params, opts \\ [])
Example
search_and_scrape!) that raises on error instead of returning {:error, ...}.
Parameters
All parameters are passed as a keyword list.Scrape
Why use it
Get the content of a single URL as markdown, HTML, JSON, screenshots, or other formats.Preferred SDK method
Firecrawl.scrape_and_extract_from_url(params, opts \\ [])
Example
Parameters
All parameters are passed as a keyword list.Interact
Why use it
Control a live browser session tied to a scrape job. Execute code in the browser sandbox to click buttons, fill forms, navigate, and extract dynamic content.Preferred SDK method
Firecrawl.interact_with_scrape_browser_session(job_id, params, opts \\ [])
Example
Parameters
Stop the session when done:
Notes
- Parameter names use snake_case and are passed as keyword lists.
- The Elixir SDK is auto-generated from the OpenAPI spec, so function names are verbose and mirror API operation names directly.
- The
interactfunction requirescode— it does not support apromptparameter. Use thecodeparameter with JavaScript to control the browser. - Every function has a bang variant (
!suffix) that raisesFirecrawl.Errorinstead of returning{:error, ...}. - An
originfield ("elixir-sdk@{version}") is automatically injected into every request body. - There are no deprecated aliases in the Elixir SDK.
Source Of Truth
firecrawl/apps/elixir-sdk/lib/firecrawl.exfirecrawl/apps/elixir-sdk/mix.exsfirecrawl-docs/api-reference/v2-openapi.json

