Skip to main content

Firecrawl Elixir Agent Quickstart

Canonical quickstart for external agents. Generated from firecrawl hex package source (v1.11.3) and the v2 OpenAPI spec. Function names and parameters match the SDK public API.

Install

Add to mix.exs:

Authenticate

When To Use What

  • search: use when you start with a query and need discovery. Returns matching pages you can then scrape.
  • scrape: use when you already have a URL and want page content in markdown, HTML, JSON, or other formats.
  • 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

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

Control the browser session tied to a scrape job. The Elixir SDK supports code-based interactions (no prompt parameter on the scrape-bound interact).

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.

Standalone interact sessions

The Elixir SDK also exposes standalone interact sessions (not tied to a scrape):
  • Firecrawl.create_browser_session(params, opts) — create a standalone session with ttl, activity_ttl, stream_web_view, profile.
  • Firecrawl.execute_browser_code(session_id, params, opts) — execute code with code, language, timeout.
  • Firecrawl.delete_browser_session(session_id, opts) — destroy the session.
  • Firecrawl.list_browser_sessions(params, opts) — list sessions, optionally filtered by status (:active, :destroyed).

Notes

  • The Elixir client is auto-generated from the OpenAPI spec. Function names are OpenAPI operation IDs converted to snake_case.
  • Every function has a bang (!) variant that raises on error instead of returning {:error, _}.
  • Snake_case params are automatically converted to camelCase for the JSON API body.
  • This SDK exposes code-based interactions only on the scrape-bound endpoint (no prompt parameter on interact_with_scrape_browser_session).

Source Of Truth

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