Skip to main content
Canonical Firecrawl Elixir quickstart for agents. Generated from SDK source (firecrawl v1.9.1, firecrawl/apps/elixir-sdk) and the v2 OpenAPI spec.

Install

Add to mix.exs:

Authenticate

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

Use search to 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

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

Format strings: "markdown", "html", "rawHtml", "links", "images", "screenshot", "summary", "changeTracking", "json", "branding", "audio", "video" Format maps: %{type: "json", prompt: ...}, %{type: "screenshot", fullPage: true}, %{type: "changeTracking", modes: ["git-diff"]} Action types: wait, click, write, press, scroll, screenshot, scrape, executeJavascript, pdf

Interact

Why use it

Use interact when a page requires browser actions or code execution after a scrape starts. The Elixir SDK exposes code-based interactions only (no prompt parameter).

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. A bang variant stop_interactive_scrape_browser_session!/2 is also available.

Notes

  • The Elixir client is OpenAPI-shaped; function names and parameter keys are generated from the spec.
  • Each public function has a bang (!) variant that raises on error instead of returning {:error, _}.
  • This SDK exposes code-based interactions only (no prompt parameter on interact_with_scrape_browser_session).
  • Pass api_key: in opts to override the configured key per call.

Source Of Truth

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