Auto-generated Firecrawl API v2 client.
Generated from the OpenAPI spec at: https://raw.githubusercontent.com/firecrawl/firecrawl-docs/main/api-reference/v2-openapi.json
Configuration
Set your API key in application config:
config :firecrawl, api_key: "fc-your-api-key"Or pass it as an option to any function:
Firecrawl.scrape_and_extract_from_url([url: "https://example.com"], api_key: "fc-your-api-key")Options
All functions accept an optional keyword list as the last argument with:
:api_key- Override the API key for this request:base_url- Override the default API base URL (useful for self-hosted instances)- Any other options are passed through to the
Reqrequest
Usage
{:ok, response} = Firecrawl.scrape_and_extract_from_url(
url: "https://example.com"
)
{:ok, response} = Firecrawl.crawl_urls(
url: "https://example.com",
limit: 100
)
Summary
Functions
Cancel an agent job
Bang variant of cancel_agent. Raises on error.
Cancel a batch scrape job
Bang variant of cancel_batch_scrape. Raises on error.
Cancel a crawl job
Bang variant of cancel_crawl. Raises on error.
Preview crawl parameters generated from natural language prompt
Bang variant of crawl_params_preview. Raises on error.
Crawl multiple URLs based on options
Bang variant of crawl_urls. Raises on error.
Create a browser session
Bang variant of create_browser_session. Raises on error.
Delete a browser session
Bang variant of delete_browser_session. Raises on error.
Execute code in a browser session
Bang variant of execute_browser_code. Raises on error.
Get all active crawls for the authenticated team
Bang variant of get_active_crawls. Raises on error.
List recent API activity
Bang variant of get_activity. Raises on error.
Get the status of an agent job
Bang variant of get_agent_status. Raises on error.
Get the errors of a batch scrape job
Bang variant of get_batch_scrape_errors. Raises on error.
Get the status of a batch scrape job
Bang variant of get_batch_scrape_status. Raises on error.
Get the errors of a crawl job
Bang variant of get_crawl_errors. Raises on error.
Get the status of a crawl job
Bang variant of get_crawl_status. Raises on error.
Get remaining credits for the authenticated team
Bang variant of get_credit_usage. Raises on error.
Get historical credit usage for the authenticated team
Bang variant of get_historical_credit_usage. Raises on error.
Metrics about your team's scrape queue
Bang variant of get_queue_status. Raises on error.
Interact with the browser session associated with a scrape job
Bang variant of interact_with_scrape_browser_session. Raises on error.
List browser sessions
Bang variant of list_browser_sessions. Raises on error.
Map multiple URLs based on options
Bang variant of map_urls. Raises on error.
Scrape a single URL and optionally extract information using an LLM
Bang variant of scrape_and_extract_from_url. Raises on error.
Scrape multiple URLs and optionally extract information using an LLM
Bang variant of scrape_and_extract_from_urls. Raises on error.
Search and optionally scrape search results
Bang variant of search_and_scrape. Raises on error.
Start an agent task for agentic data extraction
Bang variant of start_agent. Raises on error.
Stop the interactive browser session associated with a scrape job
Bang variant of stop_interactive_scrape_browser_session. Raises on error.
Types
@type response() :: {:ok, Req.Response.t()} | {:error, Exception.t()}
Functions
Cancel an agent job
DELETE /agent/{jobId}
Tag: Agent
Path Parameters
job_id- Path parameterjobId
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec cancel_agent!( String.t(), keyword() ) :: Req.Response.t()
Bang variant of cancel_agent. Raises on error.
Cancel a batch scrape job
DELETE /batch/scrape/{id}
Tag: Scraping
Path Parameters
id- Path parameterid
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec cancel_batch_scrape!( String.t(), keyword() ) :: Req.Response.t()
Bang variant of cancel_batch_scrape. Raises on error.
Cancel a crawl job
DELETE /crawl/{id}
Tag: Crawling
Path Parameters
id- Path parameterid
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec cancel_crawl!( String.t(), keyword() ) :: Req.Response.t()
Bang variant of cancel_crawl. Raises on error.
Preview crawl parameters generated from natural language prompt
POST /crawl/params-preview
Tag: Crawling
Parameters
Validated by NimbleOptions. Pass params as a keyword list with snake_case keys.
See @crawl_params_preview_schema for the full schema.
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec crawl_params_preview!(keyword(), keyword()) :: Req.Response.t()
Bang variant of crawl_params_preview. Raises on error.
Crawl multiple URLs based on options
POST /crawl
Tag: Crawling
Parameters
Validated by NimbleOptions. Pass params as a keyword list with snake_case keys.
See @crawl_urls_schema for the full schema.
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec crawl_urls!(keyword(), keyword()) :: Req.Response.t()
Bang variant of crawl_urls. Raises on error.
Create a browser session
POST /browser
Tag: Browser
Parameters
Validated by NimbleOptions. Pass params as a keyword list with snake_case keys.
See @create_browser_session_schema for the full schema.
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec create_browser_session!(keyword(), keyword()) :: Req.Response.t()
Bang variant of create_browser_session. Raises on error.
Delete a browser session
DELETE /browser/{sessionId}
Tag: Browser
Path Parameters
session_id- Path parametersessionId
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec delete_browser_session!( String.t(), keyword() ) :: Req.Response.t()
Bang variant of delete_browser_session. Raises on error.
Execute code in a browser session
POST /browser/{sessionId}/execute
Tag: Browser
Path Parameters
session_id- Path parametersessionId
Parameters
Validated by NimbleOptions. Pass params as a keyword list with snake_case keys.
See @execute_browser_code_schema for the full schema.
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec execute_browser_code!(String.t(), keyword(), keyword()) :: Req.Response.t()
Bang variant of execute_browser_code. Raises on error.
Get all active crawls for the authenticated team
GET /crawl/active
Tag: Crawling
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec get_active_crawls!(keyword()) :: Req.Response.t()
Bang variant of get_active_crawls. Raises on error.
List recent API activity
GET /team/activity
Tag: Account
Query Parameters
endpoint— query parameterendpointlimit— query parameterlimitcursor— query parametercursor
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec get_activity!(keyword(), keyword()) :: Req.Response.t()
Bang variant of get_activity. Raises on error.
Get the status of an agent job
GET /agent/{jobId}
Tag: Agent
Path Parameters
job_id- Path parameterjobId
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec get_agent_status!( String.t(), keyword() ) :: Req.Response.t()
Bang variant of get_agent_status. Raises on error.
Get the errors of a batch scrape job
GET /batch/scrape/{id}/errors
Tag: Scraping
Path Parameters
id- Path parameterid
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec get_batch_scrape_errors!( String.t(), keyword() ) :: Req.Response.t()
Bang variant of get_batch_scrape_errors. Raises on error.
Get the status of a batch scrape job
GET /batch/scrape/{id}
Tag: Scraping
Path Parameters
id- Path parameterid
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec get_batch_scrape_status!( String.t(), keyword() ) :: Req.Response.t()
Bang variant of get_batch_scrape_status. Raises on error.
Get the errors of a crawl job
GET /crawl/{id}/errors
Tag: Crawling
Path Parameters
id- Path parameterid
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec get_crawl_errors!( String.t(), keyword() ) :: Req.Response.t()
Bang variant of get_crawl_errors. Raises on error.
Get the status of a crawl job
GET /crawl/{id}
Tag: Crawling
Path Parameters
id- Path parameterid
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec get_crawl_status!( String.t(), keyword() ) :: Req.Response.t()
Bang variant of get_crawl_status. Raises on error.
Get remaining credits for the authenticated team
GET /team/credit-usage
Tag: Billing
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec get_credit_usage!(keyword()) :: Req.Response.t()
Bang variant of get_credit_usage. Raises on error.
Get historical credit usage for the authenticated team
GET /team/credit-usage/historical
Tag: Billing
Query Parameters
by_api_key— query parameterbyApiKey
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec get_historical_credit_usage!(keyword(), keyword()) :: Req.Response.t()
Bang variant of get_historical_credit_usage. Raises on error.
Metrics about your team's scrape queue
GET /team/queue-status
Tag: Miscellaneous
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec get_queue_status!(keyword()) :: Req.Response.t()
Bang variant of get_queue_status. Raises on error.
Interact with the browser session associated with a scrape job
POST /scrape/{jobId}/interact
Tag: Scraping
Path Parameters
job_id- Path parameterjobId
Parameters
Validated by NimbleOptions. Pass params as a keyword list with snake_case keys.
See @interact_with_scrape_browser_session_schema for the full schema.
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec interact_with_scrape_browser_session!(String.t(), keyword(), keyword()) :: Req.Response.t()
Bang variant of interact_with_scrape_browser_session. Raises on error.
List browser sessions
GET /browser
Tag: Browser
Query Parameters
status— query parameterstatus
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec list_browser_sessions!(keyword(), keyword()) :: Req.Response.t()
Bang variant of list_browser_sessions. Raises on error.
Map multiple URLs based on options
POST /map
Tag: Mapping
Parameters
Validated by NimbleOptions. Pass params as a keyword list with snake_case keys.
See @map_urls_schema for the full schema.
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec map_urls!(keyword(), keyword()) :: Req.Response.t()
Bang variant of map_urls. Raises on error.
Scrape a single URL and optionally extract information using an LLM
POST /scrape
Tag: Scraping
Parameters
Validated by NimbleOptions. Pass params as a keyword list with snake_case keys.
See @scrape_and_extract_from_url_schema for the full schema.
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec scrape_and_extract_from_url!(keyword(), keyword()) :: Req.Response.t()
Bang variant of scrape_and_extract_from_url. Raises on error.
Scrape multiple URLs and optionally extract information using an LLM
POST /batch/scrape
Tag: Scraping
Parameters
Validated by NimbleOptions. Pass params as a keyword list with snake_case keys.
See @scrape_and_extract_from_urls_schema for the full schema.
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec scrape_and_extract_from_urls!(keyword(), keyword()) :: Req.Response.t()
Bang variant of scrape_and_extract_from_urls. Raises on error.
Search and optionally scrape search results
POST /search
Tag: Search
Parameters
Validated by NimbleOptions. Pass params as a keyword list with snake_case keys.
See @search_and_scrape_schema for the full schema.
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec search_and_scrape!(keyword(), keyword()) :: Req.Response.t()
Bang variant of search_and_scrape. Raises on error.
Start an agent task for agentic data extraction
POST /agent
Tag: Agent
Parameters
Validated by NimbleOptions. Pass params as a keyword list with snake_case keys.
See @start_agent_schema for the full schema.
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec start_agent!(keyword(), keyword()) :: Req.Response.t()
Bang variant of start_agent. Raises on error.
Stop the interactive browser session associated with a scrape job
DELETE /scrape/{jobId}/interact
Tag: Scraping
Path Parameters
job_id- Path parameterjobId
Returns
{:ok, %Req.Response{}}on success{:error, exception}on HTTP or validation failure
@spec stop_interactive_scrape_browser_session!( String.t(), keyword() ) :: Req.Response.t()
Bang variant of stop_interactive_scrape_browser_session. Raises on error.