api-reference/v2-openapi.json (server base URL https://api.firecrawl.dev/v2).
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.support/ask: use when a Firecrawl API call fails or returns unexpected results and you need a diagnosis.support/docs-search: use when you need to look up Firecrawl documentation.
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.
Endpoint
POST /search
Simple Example
Complex Example
Response
Successful responses includesuccess, data, optional warning, id, and creditsUsed.
data.web,data.images,data.news: result arrays; which keys appear depends onsources(by default onlydata.webis populated).data.tools: array ofDiscoveredToolobjects; present whendomainToolsis enabled or analexandriasource is included.- Web and news items include fields such as
title,url, and (whenscrapeOptions/ formats request it)markdown,html,rawHtml,links,screenshot,audio,video, andmetadata. - Image items include fields such as
imageUrl,url, and dimensions when available. warning: optional human-readable notice.id: search job id string.creditsUsed: integer credits charged for the call.
Parameters
-
query- Type: string (required, max length 500)
- Use when: you need a search query.
- Notes: use
site:example.comto limit results to a domain.
-
sources- Type: array of typed source objects
- Use when: you want to control which sources are searched.
- Confirmed object shapes:
{ "type": "web" }with optional per-sourcetbsandlocation{ "type": "news" }{ "type": "images" }{ "type": "alexandria" }(free; returns tool contracts instead of web results)
-
categories- Type: array of typed category objects
- Use when: you want to filter results by category.
- Confirmed object shapes:
{ "type": "developer" }{ "type": "research" }{ "type": "pdf" }
-
limit- Type: integer (minimum 1, maximum 100, default 10)
- 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 (default
"US") - Use when: you want ISO 3166-1 alpha-2 targeting (for example
"US").
- Type: string (default
-
ignoreInvalidURLs- Type: boolean (default false)
- Use when: you want to drop URLs that cannot be scraped by other endpoints.
-
timeout- Type: integer (milliseconds, default 60000)
- Use when: you need a request timeout in milliseconds.
-
enterprise- Type: array of strings (
"anon"or"zdr"per item) - Use when: you need enterprise search controls.
- Values:
"zdr": end-to-end zero data retention"anon": anonymized zero data retention
- Type: array of strings (
-
includeDomains- Type: array of strings (hostname format)
- Use when: you want to restrict results to specific domains.
- Notes: cannot be used together with
excludeDomains.
-
excludeDomains- Type: array of strings (hostname format)
- Use when: you want to exclude specific domains from results.
- Notes: cannot be used together with
includeDomains.
-
highlights- Type: boolean (default true)
- Use when: you want query-relevant highlights in search results.
-
safe- Type: boolean
- Use when: you want to filter explicit content (SafeSearch).
-
domainTools- Type: boolean
- Use when: you want to include tool contracts matching result domains.
-
threatProtection- Type: ThreatProtectionOverride object
- Use when: you need per-request threat protection settings.
- Fields:
mode("off"|"normal"),riskScoreThreshold(0-100),blacklist(string[]),whitelist(string[]),blockedTlds(string[]),failurePolicy("open"|"closed").
-
scrapeOptions- Type: object
- 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.Endpoint
POST /scrape
Simple Example
Complex Example
Response
Successful responses includesuccess and data. Common data fields (depending on formats and options):
markdown,summary,html,rawHtml,screenshot,audio,video,linksactions: when the request included scrape-timeactions, contains ordered results such asscreenshots,scrapes,javascriptReturns, andpdfsmetadata: page metadata (title,sourceURL,url,statusCode,error, and other extracted fields)warning: optional extraction or formatting noticechangeTracking: present when thechangeTrackingformat is requested
Parameters
-
url- Type: string
- Use when: you want to scrape a specific page.
-
formats- Type: array of format strings or format objects
- Use when: you want multiple output formats.
- Confirmed format strings:
"markdown": markdown content"html": cleaned HTML"rawHtml": raw HTML"rawBase64": base64-encoded response body"links": page links"images": image URLs"screenshot": screenshot output"summary": summary output"changeTracking": change tracking output"json": JSON extraction"branding": branding profile output"product": product profile output"menu": menu profile output"audio": audio extraction"video": video extraction
- Format object forms:
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"{ "type": "question", "question": "..." }: question-answering format (requiredquestion, max 10000 chars){ "type": "highlights", "query": "..." }: highlight extraction format (requiredquery, max 10000 chars)
-
headers- Type: object
- Use when: you need custom request headers.
-
includeTags- Type: array of strings
- Use when: you want to include only specific HTML tags.
-
excludeTags- Type: array of strings
- Use when: you want to exclude specific HTML tags.
-
onlyMainContent- Type: boolean (default true)
- Use when: you want to strip nav, footer, and other boilerplate.
-
timeout- Type: number (default 60000, minimum 1000, maximum 300000)
- Use when: you need a timeout in milliseconds.
-
waitFor- Type: number
- Use when: you need to wait for the page to render (milliseconds).
-
mobile- Type: boolean
- Use when: you want a mobile viewport.
-
parsers- Type: array of objects (default
["pdf"]) - Use when: you need file parsing controls.
- Confirmed shape:
{ "type": "pdf", "mode": "fast" | "auto" | "ocr", "maxPages": number, "pages": boolean, "blocks": boolean, "pageMarkers": boolean }(typerequired; other fields optional with defaults per spec)
- Type: array of objects (default
-
actions- Type: array of action objects
- 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:typerequired;direction(upordown, defaultdown); optionalselectorscrape: no additional fieldsexecuteJavascript:scriptrequiredpdf:format(A0, A1, A2, A3, A4, A5, A6, Letter, Legal, Tabloid, Ledger),landscape,scaleoptional
-
location- Type: object with
countryandlanguages - Use when: you need geo or language-aware scraping.
- Type: object with
-
skipTlsVerification- Type: boolean (default true)
- Use when: you need to skip TLS verification.
-
removeBase64Images- Type: boolean (default true)
- Use when: you want to drop base64 images from markdown output.
-
blockAds- Type: boolean (default true)
- Use when: you want ad and cookie popup blocking.
-
proxy- Type: string (default
"auto") - Use when: you need proxy control.
- Confirmed values:
"basic","enhanced","auto"
- Type: string (default
-
maxAge- Type: number (default 172800000, i.e. 2 days)
- Use when: you want cached data up to a maximum age (milliseconds).
-
minAge- Type: number
- Use when: you want cached data only if it is at least this old (milliseconds).
-
storeInCache- Type: boolean (default true)
- Use when: you want Firecrawl to cache the result.
-
profile- Type: object with
nameand optionalsaveChanges - Use when: you want a persistent browser profile shared across scrapes and interactions.
- Type: object with
-
zeroDataRetention- Type: boolean
- Use when: you want zero data retention for this scrape.
-
lockdown- Type: boolean (default false)
- Use when: you want to serve from cache only, never making an outbound request. ZDR. 5 credits on cache hit, 1 on miss.
-
redactPII- Type: boolean or RedactPIIOptions object (default false)
- Use when: you want to redact PII from returned markdown.
- Notes:
truefor defaults. Object form:{ "mode": "accurate" | "aggressive" | "fast", "entities": ["PERSON", "EMAIL", "PHONE", "LOCATION", "FINANCIAL", "SECRET"], "replaceStyle": "tag" | "mask" | "remove" }.
-
auditMetadata- Type: object
- Use when: you need user attribution for SIEM logging.
- Fields:
username(string, max 1024 chars).
-
domainTools- Type: boolean (default false)
- Use when: you want to discover Alexandria tool contracts for the scraped domain.
-
threatProtection- Type: ThreatProtectionOverride object
- Use when: you need per-request threat protection settings.
- Fields:
mode("off"|"normal"),riskScoreThreshold(0-100),blacklist(string[]),whitelist(string[]),blockedTlds(string[]),failurePolicy("open"|"closed").
-
alexandria- Type: AlexandriaCall or array of AlexandriaCall (1-10)
- Use when: you want to execute catalogued provider tools instead of scraping a URL.
- Each call:
{ "provider": string, "capability": string, "options": object }.
-
onlyCleanContent- Type: boolean (default false, beta)
- Use when: you want an LLM-based pass to remove residual boilerplate from output.
Interact
Why use it
Use interact when a page requires browser actions or code execution after a scrape starts.Endpoint
POST /scrape/{jobId}/interact
Simple Example
Complex Example
Parameters
-
jobId(path)- Type: string (UUID)
- Use when: you have the scrape job id for the live browser session.
-
code(JSON body)- Type: string (required in OpenAPI; min length 1, max length 100000)
- Use when: you want to run code in the scrape-bound browser sandbox.
-
language(JSON body)- Type: string
- Use when: you need a specific runtime.
- Confirmed values:
"python","node","bash"(default"node")
-
timeout(JSON body)- Type: integer (seconds; minimum 1, maximum 300, default 30)
- Use when: you need an execution timeout.
-
origin(JSON body)- Type: string (optional)
- Use when: you want to attach an origin label to the interaction.
Response
Successful responses includesuccess plus execution fields such as stdout, result (alias of stdout), stderr, exitCode, killed, error (nullable), cdpUrl, and interactiveLiveViewUrl.
DELETE /scrape//interact
Example
success.
Ask (Agentic Debugging)
Why use it
Use ask when a Firecrawl API call fails or returns unexpected results. The AI support agent diagnoses the issue, proposes fix parameters, and optionally validates the fix against the live API. Typical latency: 15-30 seconds.Endpoint
POST /support/ask
Simple Example
Complex Example
Response
Successful responses includerequestId, answer, confidence, fixParameters, validation, usage, and durationMs.
answer: 2-4 sentence prose covering the diagnosis and fix.confidence:high,medium, orlow.fixParameters: machine-actionable API parameters to apply the fix (null if no fix applies).validation.tested: whether the agent tested the fix against the live API.validation.result:success,failure, orskipped.feedback: present when the agent gets stuck; null on success.
Parameters
-
question- Type: string (required, 1-8000 chars)
- Use when: you need to describe the issue.
-
rationale- Type: string (1-2000 chars)
- Use when: you are an AI agent calling on behalf of a user. Describe what the user is trying to accomplish.
-
context- Type: object (free-form)
- Use when: you want to pass metadata from your agent into the debugging prompt.
Docs Search
Why use it
Use docs-search to look up Firecrawl documentation.Endpoint
POST /support/docs-search
Example
Parameters
question- Type: string (required, 1-8000 chars)
- Use when: you need a docs-grounded answer.
Notes
- Search result rows are nested under
data.web,data.images, ordata.news, not as a flatdataarray. - Use
POST /scrape/{jobId}/interactfor multi-step browser workflows; scrapeactionsare best for small pre-scrape steps. - The published OpenAPI schema requires
codefor interact. Some SDKs and clients also accept apromptfield for natural-language instructions; that alias is not inv2-openapi.json.
Source Of Truth
firecrawl-docs/api-reference/v2-openapi.jsonfirecrawl/apps/js-sdk/firecrawl/src/v2/types.tsfirecrawl/apps/python-sdk/firecrawl/v2/types.pyfirecrawl/apps/rust-sdk/src/v2/scrape.rs

