:firecrawl v1.9.1, firecrawl/apps/elixir-sdk) and the v2 OpenAPI spec. The Elixir client is auto-generated from the OpenAPI spec; function names and parameter keys reflect the spec directly.
Install
Add tomix.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.
Search
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 withsite:, for example site:docs.firecrawl.dev crawl webhooks.
Preferred SDK method
Firecrawl.search_and_scrape(params \\ [], opts \\ [])
Example
Parameters
-
query— string (required). The search query. Usesite:example.comto limit results to a domain. -
sources— list of atoms, strings, or maps. Sources to search::web,:news,:imagesor%{type: "web" | "news" | "images"}. -
categories— list of atoms, strings, or maps. Filter by category::github,:research,:pdfor%{type: ...}. -
include_domains— list of strings. Domains to include. -
exclude_domains— list of strings. Domains to exclude. -
limit— integer. Max number of results. -
tbs— string. Time-based filter (e.g.qdr:d,qdr:w). -
location— string. Localized results. -
country— string. ISO 3166-1 alpha-2 targeting (e.g."US"). -
ignore_invalid_urls— boolean. Drop invalid URLs. -
timeout— integer. Request timeout in milliseconds. -
highlights— boolean. Generate query-relevant highlights. Defaults to true. -
enterprise— list of strings. Enterprise search controls:"zdr"for zero data retention,"anon"for anonymized. -
scrape_options— keyword list. Scrape each search result (see Scrape 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
-
url— string (required). The URL to scrape. -
formats— list of format strings or format maps. Output formats.- String formats:
"markdown","html","rawHtml","links","images","screenshot","summary","changeTracking","json","branding","audio","video". - Map formats:
%{type: "json", prompt: ..., schema: ...},%{type: "screenshot", fullPage: ..., quality: ..., viewport: ...},%{type: "changeTracking", modes: [...], tag: ...}.
- String formats:
-
headers— map. Custom request headers. -
include_tags— list of strings. Include only specific HTML tags. -
exclude_tags— list of strings. Exclude specific HTML tags. -
only_main_content— boolean. Strip nav, footer, and other boilerplate. -
timeout— integer. Timeout in milliseconds. Min 1000, default 60000, max 300000. -
wait_for— integer. Wait for the page to render (milliseconds). -
mobile— boolean. Mobile viewport. -
parsers— list of parser strings or maps:"pdf"or%{type: "pdf", mode: "fast" | "auto" | "ocr", maxPages: integer}. -
actions— list of action maps. Pre-scrape browser actions:wait,screenshot,click(with optionalall),write,press,scroll,scrape,executeJavascript,pdf. -
location— keyword list withcountry:andlanguages:. Geo or language-aware scraping. -
skip_tls_verification— boolean. Skip TLS verification. -
remove_base64_images— boolean. Drop base64 images from markdown output. -
block_ads— boolean. Ad and cookie popup blocking. -
proxy— atom or string::basic,:enhanced,:auto. -
max_age— integer. Cached data up to a maximum age (milliseconds). -
min_age— integer. Cached data only if at least this old (milliseconds). -
store_in_cache— boolean. Cache the result. -
lockdown— boolean. Serve only previously cached results; no outbound request. -
redact_pii— boolean. Redact PII from content. -
audit_metadata— keyword list withusername:. User attribution for SIEM logging. -
profile— keyword list withname:and optionalsave_changes:. Persistent browser profile. -
zero_data_retention— boolean. Zero data retention for this scrape.
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
Parameters
-
job_id— string (required, first positional arg). The scrape job ID. -
code— string (required). Code to run in the browser session. -
language— atom or string::python,:node,:bash. Defaults to:node. -
timeout— integer. Execution timeout in seconds. -
origin— string. Optional origin label for execution telemetry.
Stop session
Firecrawl.stop_interactive_scrape_browser_session(job_id, opts \\ [])
Issues DELETE /scrape/{jobId}/interact. 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
promptparameter on interact). - Every request body includes an
"origin"field set to"elixir-sdk@1.9.1"for telemetry.
Source Of Truth
firecrawl/apps/elixir-sdk/mix.exsfirecrawl/apps/elixir-sdk/lib/firecrawl.exfirecrawl-docs/api-reference/v2-openapi.json

