KosmoKrator

data

Firecrawl CLI for AI Agents

Use the Firecrawl CLI from KosmoKrator to call Firecrawl tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Firecrawl CLI Setup

Firecrawl can be configured headlessly with `kosmokrator integrations:configure firecrawl`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure firecrawl --set api_key="$FIRECRAWL_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor firecrawl --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key FIRECRAWL_API_KEY Secret secret yes API Key
url FIRECRAWL_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call firecrawl.firecrawl_scrape '{"url":"example_url","formats":"example_formats","onlyMainContent":true,"includeTags":"example_includeTags","excludeTags":"example_excludeTags","waitFor":1,"timeout":1,"actions":"example_actions"}' --json
Provider shortcut
kosmo integrations:firecrawl firecrawl_scrape '{"url":"example_url","formats":"example_formats","onlyMainContent":true,"includeTags":"example_includeTags","excludeTags":"example_excludeTags","waitFor":1,"timeout":1,"actions":"example_actions"}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs firecrawl --json
kosmo integrations:docs firecrawl.firecrawl_scrape --json
kosmo integrations:schema firecrawl.firecrawl_scrape --json
kosmo integrations:search "Firecrawl" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

firecrawl.firecrawl_scrape

Scrape a single URL and extract its content. Returns the page content in the requested format (markdown by default). Supports actions like waiting for JavaScript, taking screenshots, and extracting specific elements.

Read read
Parameters
url, formats, onlyMainContent, includeTags, excludeTags, waitFor, timeout, actions
Generic call
kosmo integrations:call firecrawl.firecrawl_scrape '{"url":"example_url","formats":"example_formats","onlyMainContent":true,"includeTags":"example_includeTags","excludeTags":"example_excludeTags","waitFor":1,"timeout":1,"actions":"example_actions"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_scrape '{"url":"example_url","formats":"example_formats","onlyMainContent":true,"includeTags":"example_includeTags","excludeTags":"example_excludeTags","waitFor":1,"timeout":1,"actions":"example_actions"}' --json

firecrawl.firecrawl_search

Search the web with Firecrawl and optionally scrape result pages using scrapeOptions.

Read read
Parameters
query, limit, sources, categories, includeDomains, excludeDomains, tbs, location, country, scrapeOptions
Generic call
kosmo integrations:call firecrawl.firecrawl_search '{"query":"example_query","limit":1,"sources":"example_sources","categories":"example_categories","includeDomains":"example_includeDomains","excludeDomains":"example_excludeDomains","tbs":"example_tbs","location":"example_location"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_search '{"query":"example_query","limit":1,"sources":"example_sources","categories":"example_categories","includeDomains":"example_includeDomains","excludeDomains":"example_excludeDomains","tbs":"example_tbs","location":"example_location"}' --json

firecrawl.firecrawl_crawl

Start a crawl job to scrape all pages from a website starting at the given URL. Returns a crawl job ID — use firecrawl_get_crawl_status to check progress and retrieve results.

Read read
Parameters
url, limit, maxDepth, formats, excludePaths, includePaths, allowBackwardLinks, allowExternalLinks, onlyMainContent
Generic call
kosmo integrations:call firecrawl.firecrawl_crawl '{"url":"example_url","limit":1,"maxDepth":1,"formats":"example_formats","excludePaths":"example_excludePaths","includePaths":"example_includePaths","allowBackwardLinks":true,"allowExternalLinks":true}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_crawl '{"url":"example_url","limit":1,"maxDepth":1,"formats":"example_formats","excludePaths":"example_excludePaths","includePaths":"example_includePaths","allowBackwardLinks":true,"allowExternalLinks":true}' --json

firecrawl.firecrawl_get_crawl_status

Check the status and retrieve results of a crawl job. Returns the current status (scraping, completed, failed, cancelled) and all scraped data once complete.

Read read
Parameters
id
Generic call
kosmo integrations:call firecrawl.firecrawl_get_crawl_status '{"id":"example_id"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_get_crawl_status '{"id":"example_id"}' --json

firecrawl.firecrawl_cancel_crawl

Cancel a running Firecrawl crawl job.

Write write
Parameters
id
Generic call
kosmo integrations:call firecrawl.firecrawl_cancel_crawl '{"id":"example_id"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_cancel_crawl '{"id":"example_id"}' --json

firecrawl.firecrawl_get_crawl_errors

List failed pages and errors for a Firecrawl crawl job.

Read read
Parameters
id
Generic call
kosmo integrations:call firecrawl.firecrawl_get_crawl_errors '{"id":"example_id"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_get_crawl_errors '{"id":"example_id"}' --json

firecrawl.firecrawl_get_active_crawls

List currently active Firecrawl crawl jobs for the configured team.

Read read
Parameters
none
Generic call
kosmo integrations:call firecrawl.firecrawl_get_active_crawls '{}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_get_active_crawls '{}' --json

firecrawl.firecrawl_preview_crawl_params

Preview crawl parameters generated from a natural language crawl prompt.

Read read
Parameters
url, prompt
Generic call
kosmo integrations:call firecrawl.firecrawl_preview_crawl_params '{"url":"example_url","prompt":"example_prompt"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_preview_crawl_params '{"url":"example_url","prompt":"example_prompt"}' --json

firecrawl.firecrawl_map

Map a website to discover all linked URLs. Returns a list of all URLs found on the site without scraping full content. Useful for understanding site structure before crawling.

Read read
Parameters
url, limit, includeSubdomains, search, ignoreSitemap, includePaths, excludePaths
Generic call
kosmo integrations:call firecrawl.firecrawl_map '{"url":"example_url","limit":1,"includeSubdomains":true,"search":"example_search","ignoreSitemap":true,"includePaths":"example_includePaths","excludePaths":"example_excludePaths"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_map '{"url":"example_url","limit":1,"includeSubdomains":true,"search":"example_search","ignoreSitemap":true,"includePaths":"example_includePaths","excludePaths":"example_excludePaths"}' --json

firecrawl.firecrawl_batch_scrape

Scrape multiple URLs in one Firecrawl batch job and poll the status with firecrawl_get_batch_scrape_status.

Read read
Parameters
urls, formats, onlyMainContent, ignoreInvalidURLs, webhook
Generic call
kosmo integrations:call firecrawl.firecrawl_batch_scrape '{"urls":"example_urls","formats":"example_formats","onlyMainContent":true,"ignoreInvalidURLs":true,"webhook":"example_webhook"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_batch_scrape '{"urls":"example_urls","formats":"example_formats","onlyMainContent":true,"ignoreInvalidURLs":true,"webhook":"example_webhook"}' --json

firecrawl.firecrawl_get_batch_scrape_status

Check Firecrawl batch scrape status and retrieve available results.

Read read
Parameters
id
Generic call
kosmo integrations:call firecrawl.firecrawl_get_batch_scrape_status '{"id":"example_id"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_get_batch_scrape_status '{"id":"example_id"}' --json

firecrawl.firecrawl_cancel_batch_scrape

Cancel a running Firecrawl batch scrape job.

Write write
Parameters
id
Generic call
kosmo integrations:call firecrawl.firecrawl_cancel_batch_scrape '{"id":"example_id"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_cancel_batch_scrape '{"id":"example_id"}' --json

firecrawl.firecrawl_get_batch_scrape_errors

List failed URLs and errors for a Firecrawl batch scrape job.

Read read
Parameters
id
Generic call
kosmo integrations:call firecrawl.firecrawl_get_batch_scrape_errors '{"id":"example_id"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_get_batch_scrape_errors '{"id":"example_id"}' --json

firecrawl.firecrawl_extract

Extract structured data from one or more URLs using AI. Provide a prompt describing what to extract, or a JSON schema for the expected output format. Ideal for pulling specific data points from web pages.

Read read
Parameters
urls, prompt, schema, systemPrompt, allowExternalLinks, enableWebSearch, includeSubdomains
Generic call
kosmo integrations:call firecrawl.firecrawl_extract '{"urls":"example_urls","prompt":"example_prompt","schema":"example_schema","systemPrompt":"example_systemPrompt","allowExternalLinks":true,"enableWebSearch":true,"includeSubdomains":true}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_extract '{"urls":"example_urls","prompt":"example_prompt","schema":"example_schema","systemPrompt":"example_systemPrompt","allowExternalLinks":true,"enableWebSearch":true,"includeSubdomains":true}' --json

firecrawl.firecrawl_get_extract_status

Check status and retrieve results for a Firecrawl extract job.

Read read
Parameters
id
Generic call
kosmo integrations:call firecrawl.firecrawl_get_extract_status '{"id":"example_id"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_get_extract_status '{"id":"example_id"}' --json

firecrawl.firecrawl_agent

Start a Firecrawl agent task for autonomous web navigation and data extraction.

Read read
Parameters
prompt, url, schema
Generic call
kosmo integrations:call firecrawl.firecrawl_agent '{"prompt":"example_prompt","url":"example_url","schema":"example_schema"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_agent '{"prompt":"example_prompt","url":"example_url","schema":"example_schema"}' --json

firecrawl.firecrawl_get_agent_status

Check status and retrieve results for a Firecrawl agent job.

Read read
Parameters
job_id
Generic call
kosmo integrations:call firecrawl.firecrawl_get_agent_status '{"job_id":"example_job_id"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_get_agent_status '{"job_id":"example_job_id"}' --json

firecrawl.firecrawl_cancel_agent

Cancel a running Firecrawl agent job.

Write write
Parameters
job_id
Generic call
kosmo integrations:call firecrawl.firecrawl_cancel_agent '{"job_id":"example_job_id"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_cancel_agent '{"job_id":"example_job_id"}' --json

firecrawl.firecrawl_create_browser

Create a Firecrawl browser session for interactive web tasks.

Write write
Parameters
url, timeout
Generic call
kosmo integrations:call firecrawl.firecrawl_create_browser '{"url":"example_url","timeout":1}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_create_browser '{"url":"example_url","timeout":1}' --json

firecrawl.firecrawl_list_browsers

List Firecrawl browser sessions, optionally filtered by status.

Read read
Parameters
status
Generic call
kosmo integrations:call firecrawl.firecrawl_list_browsers '{"status":"example_status"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_list_browsers '{"status":"example_status"}' --json

firecrawl.firecrawl_execute_browser

Execute browser automation code or an AI prompt in a Firecrawl browser session.

Write write
Parameters
session_id, code, prompt
Generic call
kosmo integrations:call firecrawl.firecrawl_execute_browser '{"session_id":"example_session_id","code":"example_code","prompt":"example_prompt"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_execute_browser '{"session_id":"example_session_id","code":"example_code","prompt":"example_prompt"}' --json

firecrawl.firecrawl_delete_browser

Delete or stop a Firecrawl browser session.

Write write
Parameters
session_id
Generic call
kosmo integrations:call firecrawl.firecrawl_delete_browser '{"session_id":"example_session_id"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_delete_browser '{"session_id":"example_session_id"}' --json

firecrawl.firecrawl_credit_usage

Get remaining Firecrawl credits for the configured team.

Read read
Parameters
none
Generic call
kosmo integrations:call firecrawl.firecrawl_credit_usage '{}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_credit_usage '{}' --json

firecrawl.firecrawl_historical_credit_usage

Get historical Firecrawl credit usage for the configured team.

Read read
Parameters
startDate, endDate
Generic call
kosmo integrations:call firecrawl.firecrawl_historical_credit_usage '{"startDate":"example_startDate","endDate":"example_endDate"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_historical_credit_usage '{"startDate":"example_startDate","endDate":"example_endDate"}' --json

firecrawl.firecrawl_token_usage

Get remaining Firecrawl extract tokens for the configured team.

Read read
Parameters
none
Generic call
kosmo integrations:call firecrawl.firecrawl_token_usage '{}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_token_usage '{}' --json

firecrawl.firecrawl_historical_token_usage

Get historical Firecrawl extract token usage for the configured team.

Read read
Parameters
startDate, endDate
Generic call
kosmo integrations:call firecrawl.firecrawl_historical_token_usage '{"startDate":"example_startDate","endDate":"example_endDate"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_historical_token_usage '{"startDate":"example_startDate","endDate":"example_endDate"}' --json

firecrawl.firecrawl_queue_status

Get Firecrawl scrape queue metrics for the configured team.

Read read
Parameters
none
Generic call
kosmo integrations:call firecrawl.firecrawl_queue_status '{}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_queue_status '{}' --json

firecrawl.firecrawl_activity

List recent Firecrawl API activity for the configured team.

Read read
Parameters
limit, cursor, endpoint
Generic call
kosmo integrations:call firecrawl.firecrawl_activity '{"limit":1,"cursor":"example_cursor","endpoint":"example_endpoint"}' --json
Shortcut
kosmo integrations:firecrawl firecrawl_activity '{"limit":1,"cursor":"example_cursor","endpoint":"example_endpoint"}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

firecrawl.firecrawl_scrape 8 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_scrape --json
ParameterTypeRequiredDescription
url string yes The URL to scrape (e.g., "https://example.com").
formats array no Output formats to return. Options: "markdown", "html", "rawHtml", "content", "links", "screenshot", "actions". Default: ["markdown"].
onlyMainContent boolean no Extract only the main content, removing navigation, footers, etc. Default: true.
includeTags array no CSS selectors to include. Only these elements will be scraped.
excludeTags array no CSS selectors to exclude. These elements will be removed from the result.
waitFor integer no Time in milliseconds to wait for dynamic content to load before scraping.
timeout integer no Timeout in milliseconds for the scrape request. Default: 30000.
actions array no List of actions to perform before scraping (e.g., click, scroll, wait, screenshot).
firecrawl.firecrawl_crawl 9 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_crawl --json
ParameterTypeRequiredDescription
url string yes The root URL to start crawling from (e.g., "https://example.com").
limit integer no Maximum number of pages to crawl. Default: 10.
maxDepth integer no Maximum crawl depth from the root URL. Default: based on plan.
formats array no Output formats for each page. Options: "markdown", "html", "rawHtml", "content", "links". Default: ["markdown"].
excludePaths array no URL path patterns to exclude from crawling (e.g., ["/blog/*"]).
includePaths array no Only crawl URLs matching these path patterns (e.g., ["/docs/*"]).
allowBackwardLinks boolean no Allow crawling links that go back to parent pages. Default: false.
allowExternalLinks boolean no Allow crawling links to external domains. Default: false.
onlyMainContent boolean no Extract only main content from each page. Default: true.
firecrawl.firecrawl_get_crawl_status 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_get_crawl_status --json
ParameterTypeRequiredDescription
id string yes The crawl job ID returned by the firecrawl_crawl tool.
firecrawl.firecrawl_cancel_crawl 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_cancel_crawl --json
ParameterTypeRequiredDescription
id string yes Crawl job ID.
firecrawl.firecrawl_get_crawl_errors 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_get_crawl_errors --json
ParameterTypeRequiredDescription
id string yes Crawl job ID.
firecrawl.firecrawl_get_active_crawls 0 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_get_active_crawls --json
ParameterTypeRequiredDescription
No parameters.
firecrawl.firecrawl_preview_crawl_params 2 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_preview_crawl_params --json
ParameterTypeRequiredDescription
url string no Target site URL.
prompt string yes Natural-language crawl intent.
firecrawl.firecrawl_map 7 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_map --json
ParameterTypeRequiredDescription
url string yes The root URL to map (e.g., "https://example.com").
limit integer no Maximum number of URLs to return. Default: based on plan.
includeSubdomains boolean no Include URLs from subdomains. Default: false.
search string no Filter URLs that match a search term (only returns URLs containing this string).
ignoreSitemap boolean no Skip sitemap.xml discovery and only use on-page links. Default: false.
includePaths array no Only include URLs matching these path patterns.
excludePaths array no Exclude URLs matching these path patterns.
firecrawl.firecrawl_batch_scrape 5 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_batch_scrape --json
ParameterTypeRequiredDescription
urls array yes URLs to scrape.
formats array no Output formats such as markdown, html, links, screenshot, images, or json.
onlyMainContent boolean no Extract only main content.
ignoreInvalidURLs boolean no Skip invalid URLs instead of failing the whole batch.
webhook object no Optional webhook config for batch events.
firecrawl.firecrawl_get_batch_scrape_status 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_get_batch_scrape_status --json
ParameterTypeRequiredDescription
id string yes Batch scrape job ID.
firecrawl.firecrawl_cancel_batch_scrape 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_cancel_batch_scrape --json
ParameterTypeRequiredDescription
id string yes Batch scrape job ID.
firecrawl.firecrawl_get_batch_scrape_errors 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_get_batch_scrape_errors --json
ParameterTypeRequiredDescription
id string yes Batch scrape job ID.
firecrawl.firecrawl_extract 7 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_extract --json
ParameterTypeRequiredDescription
urls array yes List of URLs to extract data from (e.g., ["https://example.com/about"]).
prompt string no Natural language description of what data to extract from the pages.
schema object no JSON schema defining the expected output structure. The response will conform to this schema.
systemPrompt string no System prompt to guide the AI extraction behavior.
allowExternalLinks boolean no Allow following links to external domains during extraction. Default: false.
enableWebSearch boolean no Enable web search to supplement extraction with additional context. Default: false.
includeSubdomains boolean no Include subdomains when following links. Default: false.
firecrawl.firecrawl_get_extract_status 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_get_extract_status --json
ParameterTypeRequiredDescription
id string yes Extract job ID.
firecrawl.firecrawl_agent 3 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_agent --json
ParameterTypeRequiredDescription
prompt string yes Agent task prompt.
url string no Optional starting URL.
schema object no Optional JSON schema for structured output.
firecrawl.firecrawl_get_agent_status 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_get_agent_status --json
ParameterTypeRequiredDescription
job_id string yes Agent job ID.
firecrawl.firecrawl_cancel_agent 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_cancel_agent --json
ParameterTypeRequiredDescription
job_id string yes Agent job ID.
firecrawl.firecrawl_create_browser 2 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_create_browser --json
ParameterTypeRequiredDescription
url string no Optional URL to open when the session starts.
timeout integer no Optional session timeout in milliseconds.
firecrawl.firecrawl_list_browsers 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_list_browsers --json
ParameterTypeRequiredDescription
status string no Optional browser session status filter.
firecrawl.firecrawl_execute_browser 3 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_execute_browser --json
ParameterTypeRequiredDescription
session_id string yes Browser session ID.
code string no Browser automation code to execute.
prompt string no Natural-language browser task prompt.
firecrawl.firecrawl_delete_browser 1 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_delete_browser --json
ParameterTypeRequiredDescription
session_id string yes Browser session ID.
firecrawl.firecrawl_credit_usage 0 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_credit_usage --json
ParameterTypeRequiredDescription
No parameters.
firecrawl.firecrawl_historical_credit_usage 2 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_historical_credit_usage --json
ParameterTypeRequiredDescription
startDate string no Optional start date filter.
endDate string no Optional end date filter.
firecrawl.firecrawl_token_usage 0 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_token_usage --json
ParameterTypeRequiredDescription
No parameters.
firecrawl.firecrawl_historical_token_usage 2 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_historical_token_usage --json
ParameterTypeRequiredDescription
startDate string no Optional start date filter.
endDate string no Optional end date filter.
firecrawl.firecrawl_queue_status 0 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_queue_status --json
ParameterTypeRequiredDescription
No parameters.
firecrawl.firecrawl_activity 3 parameters
Schema command
kosmo integrations:schema firecrawl.firecrawl_activity --json
ParameterTypeRequiredDescription
limit integer no Maximum activities to return.
cursor string no Pagination cursor.
endpoint string no Optional endpoint filter.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.