Skip to main content
Canonical Firecrawl Elixir quickstart for agents. Generated from SDK source (:firecrawl v1.11.0) and the v2 OpenAPI spec. The Elixir client is auto-generated from the OpenAPI spec; function names and parameter keys reflect this.

Install

Add to mix.exs:

Authenticate

All functions accept an optional trailing opts keyword list supporting :api_key and :base_url overrides.

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 code execution in a scrape-bound browser session. Requires a scrape job ID from a prior 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: in the query string.

Preferred SDK method

Firecrawl.search_and_scrape(params \\ [], opts \\ []){:ok, map()} | {:error, Firecrawl.Error.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, map()} | {:error, Firecrawl.Error.t()}

Example

Parameters

Interact

Why use it

Execute code in the browser session tied to a scrape job. The Elixir SDK supports code-based interactions only (no prompt parameter).

Preferred SDK method

Firecrawl.interact_with_scrape_browser_session(job_id, params \\ [], opts \\ []){:ok, map()} | {:error, Firecrawl.Error.t()}

Example

Parameters

Firecrawl.stop_interactive_scrape_browser_session(job_id) ends the browser session.

Notes

  • The Elixir client is auto-generated from the OpenAPI spec; function names follow the spec operation IDs.
  • Each function has a bang (!) variant that raises on error: e.g. search_and_scrape!/2, scrape_and_extract_from_url!/2.
  • This SDK exposes code-based interactions only — there is no prompt parameter (unlike Node.js, Python, and Rust SDKs).
  • No deprecated aliases exist in the Elixir SDK.
  • The proxy parameter uses atoms (:basic, :enhanced, :auto) rather than strings.

Source Of Truth

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