Skip to main content

Firecrawl Elixir Agent Quickstart

Canonical quickstart for external agents. Generated from SDK source (:firecrawl v1.9.2) and the v2 OpenAPI spec. Function names and parameter keys match the auto-generated client module.

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

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 auto-generated from the OpenAPI spec. Function names are spec-derived, not hand-aliased.
  • No deprecated function aliases exist in this SDK.
  • Each function has a bang (!) variant that raises on error instead of returning {:error, _}.
  • All Elixir-side parameter keys are snake_case; they are automatically converted to camelCase for the API.
  • Parameters are validated at runtime using NimbleOptions before any HTTP request.
  • The SDK uses Req as its HTTP client.

Source Of Truth

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