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. You can constrain results to a site withsite:, for example site:docs.firecrawl.dev crawl webhooks.
Preferred SDK method
Firecrawl.search_and_scrape(params \\ [], opts \\ [])
Simple Example
Complex Example
Parameters
-
query- Type: string
- Use when: you need a search query.
- Notes: use
site:example.comto limit results to a domain.
-
sources- Type: list of atoms, strings, or maps
- Use when: you want to control which sources are searched.
- Confirmed values:
"web"or:web"news"or:news"images"or:images%{type: "web" | "news" | "images"}
-
categories- Type: list of atoms, strings, or maps
- Use when: you want to filter results by category.
- Confirmed values:
"github"or:github"research"or:research"pdf"or:pdf%{type: "github" | "research" | "pdf"}
-
limit- Type: integer
- Use when: you want to cap results.
-
tbs- Type: string
- Use when: you need a time-based filter (for example
qdr:d,qdr:w,sbd:1,qdr:m).
-
location- Type: string
- Use when: you want localized results.
-
country- Type: string
- Use when: you want ISO 3166-1 alpha-2 targeting (for example
"US").
-
ignore_invalid_urls- Type: boolean
- Use when: you want to drop URLs that cannot be scraped by other endpoints.
-
timeout- Type: integer
- Use when: you need a request timeout in milliseconds.
-
enterprise- Type: list of strings
- Use when: you need enterprise search controls.
- Confirmed values:
"zdr": end-to-end zero data retention"anon": anonymized zero data retention
-
scrape_options- Type: keyword list
- Use when: you want to scrape each search result (see Scrape parameters for fields).
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 \\ [])
Simple Example
Complex Example
Parameters
-
url- Type: string
- Use when: you want to scrape a specific page.
-
formats- Type: list of format strings or format maps
- Use when: you want multiple output formats.
- Confirmed format strings:
"markdown": markdown content"html": cleaned HTML"rawHtml": raw HTML"links": page links"images": image URLs"screenshot": screenshot output"summary": summary output"changeTracking": change tracking output"json": JSON extraction"branding": branding profile output"audio": audio extraction
- Format map fields:
type: one of the format strings aboveprompt,schema: JSON extraction options fortype: "json"modes,schema,prompt,tag: change tracking options fortype: "changeTracking"fullPage,quality,viewport: screenshot options fortype: "screenshot"
-
headers- Type: map
- Use when: you need custom request headers.
-
include_tags- Type: list of strings
- Use when: you want to include only specific HTML tags.
-
exclude_tags- Type: list of strings
- Use when: you want to exclude specific HTML tags.
-
only_main_content- Type: boolean
- Use when: you want to strip nav, footer, and other boilerplate.
-
timeout- Type: integer
- Use when: you need a timeout in milliseconds.
-
wait_for- Type: integer
- Use when: you need to wait for the page to render (milliseconds).
-
mobile- Type: boolean
- Use when: you want a mobile viewport.
-
parsers- Type: list of parser strings or maps
- Use when: you need file parsing controls.
- Confirmed values:
"pdf"%{type: "pdf", mode: "fast" | "auto" | "ocr", maxPages: integer}
-
actions- Type: list of action maps
- Use when: you need lightweight pre-scrape actions.
- Confirmed action types:
wait:millisecondsorselectorrequiredscreenshot:fullPage,quality,viewportoptionalclick:selectorrequired,alloptionalwrite:textrequired (click to focus the input first)press:keyrequiredscroll:direction(upordown) required,selectoroptionalscrape: no additional fieldsexecuteJavascript:scriptrequiredpdf:format(A0, A1, A2, A3, A4, A5, A6, Letter, Legal, Tabloid, Ledger),landscape,scaleoptional
-
location- Type: keyword list (for example
country:andlanguages:) - Use when: you need geo or language-aware scraping.
- Type: keyword list (for example
-
skip_tls_verification- Type: boolean
- Use when: you need to skip TLS verification.
-
remove_base64_images- Type: boolean
- Use when: you want to drop base64 images from markdown output.
-
block_ads- Type: boolean
- Use when: you want ad and cookie popup blocking.
-
proxy- Type: atom or string
- Use when: you need proxy control.
- Confirmed values:
:basic,:enhanced,:auto
-
max_age- Type: integer
- Use when: you want cached data up to a maximum age (milliseconds).
-
min_age- Type: integer
- Use when: you want cached data only if it is at least this old (milliseconds).
-
store_in_cache- Type: boolean
- Use when: you want Firecrawl to cache the result.
-
profile- Type: keyword list with
name:and optionalsave_changes:(orsaveChanges:) - Use when: you want a persistent browser profile shared across scrapes and interactions.
- Type: keyword list with
-
zero_data_retention- Type: boolean
- Use when: you want 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 \\ [])
Simple Example
Complex Example
Parameters
-
job_id- Type: string
- Use when: you have a scrape job ID.
-
code- Type: string
- Use when: you want to run code in the browser session.
-
language- Type: atom or string
- Use when: you need a specific runtime.
- Confirmed values:
:python,:node,:bash(or the string equivalents)
-
timeout- Type: integer
- Use when: you need an execution timeout in seconds.
-
origin- Type: string
- Use when: you want an optional origin label for execution telemetry.
Stop interactive session
Firecrawl.stop_interactive_scrape_browser_session(job_id, opts \\ []) issues DELETE /scrape/{jobId}/interact and tears down the browser session for that scrape job. 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 oninteract_with_scrape_browser_session).
Source Of Truth
firecrawl/apps/elixir-sdk/mix.exsfirecrawl/apps/elixir-sdk/lib/firecrawl.exfirecrawl-docs/api-reference/v2-openapi.json

