Firecrawl Elixir Agent Quickstart
Canonical quickstart for external agents. Generated from thefirecrawl Elixir SDK source and the v2 OpenAPI spec. Function names are generated from the OpenAPI spec.
Install
Add tomix.exs:
Authenticate
When To Use What
search: use when you start with a query and need discovery. Supportssite:filtering.scrape: use when you already have a URL and want page content.interact: use when the page needs code execution in a browser session after a scrape.
Search
Why use it
Discover relevant pages from a query, then pick URLs to scrape or interact with. Constrain results to a site withsite:, for example 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
Execute code in the browser session tied to a scrape job. The Elixir SDK exposes code-based interactions only (noprompt parameter). code is required.
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.
Notes
- OpenAPI-generated: Function names and parameter keys are generated from the spec. Do not rename them.
- Bang variants: Every function has a
!variant (e.g.scrape_and_extract_from_url!) that raises on error instead of returning{:error, _}. - NimbleOptions validation: Unknown keys cause
NimbleOptions.ValidationErrorbefore any HTTP call — provides typo detection. - snake_case keys: All Elixir params use
snake_case; the SDK auto-converts tocamelCaseJSON. - Atoms and strings: Enum params like
proxyaccept both atoms (:auto) and strings ("auto"). - Code-only interact: The Elixir SDK does not support
prompton interact — usecodeonly. - No client struct: There is no
Firecrawl.Client— configure globally viaconfig :firecrawlor per-call via theoptskeyword list.
Source Of Truth
firecrawl/apps/elixir-sdk/mix.exsfirecrawl/apps/elixir-sdk/lib/firecrawl.exfirecrawl-docs/api-reference/v2-openapi.json

