Skip to main content

Firecrawl Elixir Agent Quickstart

Canonical quickstart for external agents. Generated from SDK source (:firecrawl 1.9.2, firecrawl/apps/elixir-sdk) and the v2 OpenAPI spec. Function names and parameter keys are generated from the OpenAPI spec.

Install

Add to mix.exs:

Authenticate

There is no client struct. Configuration is resolved per-call from Application config or per-call opts.

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.

Why use it

Discover relevant pages from a query, then pick URLs to scrape or interact with. Constrain results to a site with site:, e.g. site:docs.firecrawl.dev crawl webhooks.

Preferred SDK method

Firecrawl.search_and_scrape(params \\ [], opts \\ [])

Example

A bang variant search_and_scrape!/2 is also available — it raises on error instead of returning {:error, _}.

Parameters

Scrape

Why use it

Use scrape when you already have a URL and want structured content in one or more formats.

Preferred SDK method

Firecrawl.scrape_and_extract_from_url(params \\ [], opts \\ [])

Example

Parameters

Interact

Why use it

Use interact when a page requires browser actions or code execution after a scrape starts.

Preferred SDK method

Firecrawl.interact_with_scrape_browser_session(job_id, params \\ [], opts \\ [])

Example

To end the session:

Parameters

The Elixir SDK exposes code-based interactions only — there is no prompt parameter (unlike JS/TS, Python, and Rust SDKs).

Notes

  • The Elixir SDK is auto-generated from the OpenAPI spec. Function names match the spec operations.
  • Each function has a bang (!) variant that raises on error instead of returning {:error, _}.
  • Parameters use snake_case in Elixir and are auto-converted to camelCase for the JSON body.
  • OpenAPI enum values are represented as Elixir atoms (e.g. proxy: :basic, language: :node).
  • No client struct — configuration via Application config or per-call opts.
  • Uses the Req HTTP library. Extra opts are passed through to Req.

Source Of Truth

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