Skip to main content

Firecrawl Elixir Agent Quickstart

Canonical quickstart for external agents. Generated from the firecrawl Elixir SDK source and the v2 OpenAPI spec. Function names are generated from the OpenAPI spec.

Install

Add to mix.exs:

Authenticate

When To Use What

  • search: use when you start with a query and need discovery. Supports site: 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.

Why use it

Discover relevant pages from a query, then pick URLs to scrape or interact with. Constrain results to a site with site:, 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 (no prompt 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.ValidationError before any HTTP call — provides typo detection.
  • snake_case keys: All Elixir params use snake_case; the SDK auto-converts to camelCase JSON.
  • Atoms and strings: Enum params like proxy accept both atoms (:auto) and strings ("auto").
  • Code-only interact: The Elixir SDK does not support prompt on interact — use code only.
  • No client struct: There is no Firecrawl.Client — configure globally via config :firecrawl or per-call via the opts keyword list.

Source Of Truth

  • firecrawl/apps/elixir-sdk/mix.exs
  • firecrawl/apps/elixir-sdk/lib/firecrawl.ex
  • firecrawl-docs/api-reference/v2-openapi.json