firecrawl-java v1.12.1 (firecrawl/apps/java-sdk) and the v2 OpenAPI spec.
Install
Maven: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
client.search(query) or client.search(query, options) → SearchData
Example
Parameters
Return value:
SearchData with getWeb(), getNews(), getImages() (each List<Map<String, Object>>, may be null). Do not treat SearchData as a directly iterable list.
Scrape
Why use it
Use scrape when you already have a URL and want structured content in one or more formats.Preferred SDK method
client.scrape(url) or client.scrape(url, options) → Document
Example
Parameters
Interact
Why use it
Use interact when a page requires browser actions or code execution after a scrape starts.Preferred SDK method
client.interact(jobId, code)— uses default languagenodeclient.interact(jobId, code, language, timeout)—timeoutin seconds (1–300), null for API default (30s)
Example
Parameters
Stop session
client.stopInteractiveBrowser(jobId) → BrowserDeleteResponse
Ends the scrape-bound browser session. Response includes isSuccess(), getSessionDurationMs(), getCreditsBilled().
Notes
- The Java SDK exposes code-based interactions only: there is no
promptparameter oninteract(unlike JS, Python, and Rust SDKs). - Deprecated aliases:
scrapeExecute→interact;deleteScrapeBrowser→stopInteractiveBrowser. - Async variants are available:
scrapeAsync,searchAsync,interactAsync,stopInteractiveBrowserAsync— all returnCompletableFuture. - Uses camelCase parameter names matching the Java convention.
Source Of Truth
firecrawl/apps/java-sdk/build.gradle.ktsfirecrawl/apps/java-sdk/src/main/java/com/firecrawl/client/FirecrawlClient.javafirecrawl/apps/java-sdk/src/main/java/com/firecrawl/models/ScrapeOptions.javafirecrawl/apps/java-sdk/src/main/java/com/firecrawl/models/SearchOptions.javafirecrawl/apps/java-sdk/src/main/java/com/firecrawl/models/Document.javafirecrawl-docs/api-reference/v2-openapi.json

