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.
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).- Web and news items include fields such as
title,url, and (whenscrapeOptions/ formats request it)markdown,html,rawHtml,links,screenshot,audio, 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" }
-
categories- Type: array of typed category objects
- Use when: you want to filter results by category.
- Confirmed object shapes:
{ "type": "github" }{ "type": "research" }{ "type": "pdf" }
-
limit- Type: integer (minimum 1, maximum 100, default 5)
- 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 (
-
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,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"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 object 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: 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
- Use when: you want to strip nav, footer, and other boilerplate.
-
timeout- Type: number
- 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
- Use when: you need file parsing controls.
- Confirmed shape:
{ "type": "pdf", "mode": "fast" | "auto" | "ocr", "maxPages": number }(typerequired; other fields optional with defaults per spec)
-
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
- Use when: you need to skip TLS verification.
-
removeBase64Images- Type: boolean
- Use when: you want to drop base64 images from markdown output.
-
blockAds- Type: boolean
- Use when: you want ad and cookie popup blocking.
-
proxy- Type: string
- Use when: you need proxy control.
- Confirmed values:
"basic","enhanced","auto"
-
maxAge- Type: number
- 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
- 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.
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.
Response
Successful responses includesuccess plus execution fields such as stdout, result (alias of stdout), stderr, exitCode, killed, and error (nullable).
DELETE /scrape//interact
Example
success.
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

