* refactor(api): extract limits, jobStore, auth, and billing module slots [downstream-sync]
Routes concurrency limits, job storage, authentication, and metering through service.modules with self-contained open-source defaults (noLimits, queueJobStore, openAuth, and unmeteredBilling).
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): remove standalone optional worker roles from core [downstream-sync]
Removes zdr-worker, cclog-worker, and index-worker from built-in core roles so deployments that need them register them via Extension.workers.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): trim admin router to core routes and expose admin helpers [downstream-sync]
Keeps core operational admin endpoints in apps/api and exposes lazy admin helpers via ./unstable/admin-deps for custom extensions.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): add rootRaw router slot and remove optional root routes [downstream-sync]
Adds optional rootRaw pre-body-parser router slot, removes optional exchange, labs, and mcp action-log root routes from core, and exposes lazy helpers via ./unstable/root-routes-deps.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): trim optional v2 route families from core [downstream-sync]
Removes optional keyless, feedback, interactive browser, agent, team usage, monitor, and slack v2 routes from core and exposes shared middleware helpers via ./unstable/v2-routes-deps.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): narrow core scrape engines to built-in open-source set [downstream-sync]
Keeps wikipedia, playwright, fetch, pdf, and document as built-in core engines, adds engine trait metadata and fallback hook controls, and exposes scrape helpers for external engine extensions.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): add format extensibility seams and extract branding format [downstream-sync]
Add ScrapePlan markdown and field-preservation hooks, convert Document and DocumentMetadata to mergeable interfaces, allow extensions to widen designated core request fields, export FormatUnavailableError and TransportableError from the service entry, and remove the branding format implementation, engine feature, error class, and schema from core.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): extract changeTracking, deterministicJson, and internal formats [downstream-sync]
Remove changeTracking, deterministicJson, redactPII, product, menu, audio, video, highlights, and the YouTube postprocessor from the core transformer stack, request schemas, error classes, and engine features. Export performDirectQuoteQuery for downstream format extensions.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): isolate local PDF engine and trim PDF parser options [downstream-sync]
Keep local Rust and pdf-parse PDF extraction in the default pdf engine while removing external OCR service orchestration, caching, and extended parser options from core.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): move extended v2 request fields out of core schemas [downstream-sync]
Trim extended scrape, map, and search request fields and unused schemas from controllers/v2/types.ts, route worker and sitemap parsing through getV2RequestSchemas(), and export extension helpers.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): route Meta options through service request types [downstream-sync]
Use the extensible service ScrapeOptions type on Meta and scrapeURL so downstream type augmentations flow into engines and hooks, export v2 schema helper primitives for extension schema composition, and preserve default timeout precedence between rules and built-in transforms.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): remove legacy v0, v1, extract, and research APIs [downstream-sync]
Remove legacy v0 and v1 routes, controllers, schemas, extract worker and queue, deep-research and generate-llmstxt pipelines, and legacy search wrappers from the core API package.
Promote shared request, auth, action, and crawl-status types to v2, keep the v2 research GitHub 410 handler in deprecations, remove unused ajv-formats dependency, and expose internal extension helpers via ./unstable/legacy-api-deps.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(api): align Dockerfile, robots-txt parsing, and tests with core schema [downstream-sync]
Update Dockerfile build and runtime checks to verify dist/src/controllers/v2/crawl-status.js, route robots.txt scrape options through getV2RequestSchemas(), and align unit and self-hosted tests with narrowed core request schemas and direct-quote query helpers.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* [downstream-sync] Add policy module slot, openRequest middleware, and request hooks
Introduce the 10th PolicyModule slot with unrestrictedPolicy() default, require policy in ModulesConfig when RequestContext is widened, and add openRequest, resolveRequestContext, rejectRequest, and finalizeResponse helpers emitting request.accepted, request.rejected, and request.responding hooks.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): remove optional v2 route families from core [downstream-sync]
Removes optional mcp action logs, computer session files, alexandria
provider routing, support proxy, research proxy, and fresh feed v2
routes and their exclusive helpers from core, exposing shared route
primitives via ./unstable/v2-routes-deps.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): route v2 endpoints through openRequest and policy module [downstream-sync]
Wire core v2 routes through openRequest and resolveRequestContext, wrap 200 responses through finalizeResponse, remove inline policy pre-flight checks from v2 controllers and the core scrape/map/search pipelines, and route system discovery calls through policy.system().
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): move inline pipeline and lifecycle handlers behind hooks [downstream-sync]
Remove inline logging, analytics, indexing, monitoring, notification, and search filtering calls from core v2 controllers, workers, queue dispatch, and startup/shutdown hooks so extensions can handle them through the service hook points.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(api): preserve v2 route checks, search parse errors, robots flags, and hook tests [downstream-sync]
Restore restrictedOptionsCountryCheck on core v2 routes, add onParseError
to openRequest so /v2/search keeps its ZodError response shape, fall back
to ctx.flags.checkRobotsOnScrape in shouldCheckRobots, guard optional
meta.ctx in query transformer, and align core unit and workflow test sets
with the extracted hook and policy seams.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): remove non-core modules and stabilize package exports [downstream-sync]
Replace internal unstable subpath exports with clean public package
subpaths under firecrawl-scraper-js/*, decouple core admin, queue,
worker, and scrape helpers onto service module slots, and remove
unused non-core directories, dependencies, and workflow steps.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(api): guard worker module hooks without active service and update core error snapshot [downstream-sync]
Use installedService() when reading optional auth/limits hooks in scrape-worker so tests without an installed service continue cleanly, and update coreParts error snapshot after removing non-core error classes.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* refactor(api): prune non-core env keys and remove deployment mode switches [downstream-sync]
Trim apps/api/src/config.ts, apps/api/.env.example, and docker-compose.yaml to
the 89 environment variables used by the open-source API and workers. Remove
unused deployment mode helpers (USE_DB_AUTHENTICATION, isSelfHosted,
lib/withAuth.ts, lib/deployment.ts, and lib/agent-interop.ts), move
bypassBilling onto Authorization, derive image OCR availability from registered
image engines, read optional caller.agentInterop and caller.hostedMcp from the
auth module result, and use IS_KUBERNETES for the queue-worker liveness check.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(api): address CI engine metadata check and code review findings [downstream-sync]
Addresses Core unit tests and review findings across service freezing, scrape/map/batch context propagation, PDF handoff and fast mode checks, Bull Board and admin metrics registries, GCS handoff bucket allowlisting, and test coverage:
- Check static engine metadata before calling engine.enabled() in isImageOcrEnabled(), getParseForceEngine(), and hasFilePrefetchEngine().
- Validate and bind optional AuthModule.lookupTeam and LimitsModule.onJobStart/onJobEnd in freezeModules().
- Preserve teamFlags on meta.ctx, flags.usOnly on robots.txt fetches, lockdown ZDR in unrestrictedPolicy() and blocklistMiddleware(), effective ZDR in mapCtx and crawl-params-preview, and blockCtx when appending to batch scrapes.
- Restore truncated PDF handoff completion and fast-mode OCR rejection when Rust extraction is disabled.
- Require explicit allowedBucket opt-in on GcsFileDownloader before invoking the downloader.
- Move admin metrics collector registry to a side-effect-free module, replay registered queues in bindBullBoard(), clear stale external slot markers on PG reservation, track maxAge acceptance per compiled scrapeOptions schema, guard crawl-status timestamp when nuqJob is null, guard proxy auto timeout transform, keep bindScrapeMeta private, re-export withTraceContextAsync, harden hasFormatOfType return type and resolveJobPriority error callback, and update/prune tests.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(api): handle aborted GCS signal, raw PDF cleanup, null teamFlags, and strict parser test [downstream-sync]
- Check signal?.aborted before returning null in feResToFilePrefetch GCS allowlist path.
- Clean up temporary PDF prefetch file in scrapePDF when shouldParse is false.
- Preserve explicit null teamFlags when populating ctx.flags in buildMetaObject.
- Align EOF_SEARCH_BYTES comment and isTruncatedPdf docstring with incremental-update truncation checks.
- Expect core strict-schema error message in parsers.test.ts when running outside production.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(api): apply auto proxy timeout before rules and export searchWithProvider [downstream-sync]
- Apply the built-in proxy=auto timeout upgrade before running extension rules so proxy=auto takes precedence over json/extension 60s bumps while keeping rule-set timeouts authoritative.
- Export searchWithProvider from firecrawl-scraper-js/search.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(api): align billing preflight, search, map filter, worker storage, and fallback hooks [downstream-sync]
- Restore billing.authorize preflight on /agent routes in checkCreditsMiddleware.
- Preserve forced scrape zero data retention on search child scrapes and blocklist checks.
- Dual-write context threatProtection onto internalOptions for rolling-deploy compatibility, refreshing on batch appendToId.
- Merge queues by name in startBullmqQueueMetrics instead of overwriting earlier registrations.
- Restore teamFlags fallbacks in crawlToCrawler when ctx.lockdown, ctx.ignoreRobotsTxt, or forced scrape ZDR are absent.
- Run search billing reservation before search.plan, forward searchState to billing.charge, support pre-routed web results and non-billable counts, preserve result categories and multi-source group metadata in search.results, and return 503 TOOL_DISCOVERY_UNAVAILABLE when tools-only discovery is unavailable.
- Add post-scope, post-limit map.filter transform hook and export applyMapFilterHook.
- Rethrow external jobStore.record failures on async worker completions and always return null to the queue when external result storage is enabled.
- Increase process.stop hook timeout from 10s to 45s.
- Resolve live team concurrency for queued crawl and batch jobs instead of freezing request-time ctx.concurrencyLimit.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* test(api): match schema-normalized source objects in search reserve assertion [downstream-sync]
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(api): prevent double-billing on persistence errors, prefer live crawl flags, and fix search hit routing [downstream-sync]
- Track completed success billing in scrape-worker so external jobStore.record failures do not re-bill the job in the failure handler.
- Prefer live worker teamFlags over stored context flags in crawlToCrawler and preserve Safe Mode's strict default robots enforcement unless enforceRobots is explicitly false.
- Reindex merged routed web results before operator filtering so positions reflect the merged order even when no results are filtered out.
- Only fall back to cross-group URL matching in search.results when hit.group is omitted so explicitly grouped hook hits land in their declared response array.
Downstream-Sync: required
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
---------
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* ci: start each compiled API entry file in the server tests
The server tests start every API process as `node dist/src/main.js <role>`.
The Docker image, docker-compose.yaml and the manifests under
examples/kubernetes start a compiled entry file directly, as in
`node dist/src/harness.js --start-docker` or `node dist/src/index.js`, and
no job ran a file that way.
Add a script that starts each entry file as its own process, waits for its
health path, keeps it running for 30 seconds and expects exit code 0 on
SIGTERM. It runs at the end of the self-hosted job on the two fetch and
no-proxy legs: nine role files and the harness with the Postgres queue, the
FoundationDB worker with the FoundationDB queue.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* ci: keep the last output of a stopped process and collect its log files
- Wait for a process's streams to end before its output is printed, so a
failure shows what the process wrote last.
- Run the step before the log files are collected, so the logs of the
processes it starts are part of the uploaded artifact.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
---------
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(security): drop braces, sprintf-js and csv-parse from api, js-sdk and test-suite
knip 6 and lint-staged 16.4 no longer pull micromatch/braces in apps/api.
jest 30.5 drops micromatch in the JS SDK, and load-nyc-config's js-yaml is
moved to 4.x so argparse@1 and sprintf-js leave the tree. The artillery
load test in apps/test-suite targeted the retired v0 staging host and
nothing ran it, so it is removed with its npm project and CI wiring.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* chore(ui): remove the unmaintained ingestion-ui template
Nothing builds or deploys apps/ui/ingestion-ui; it has had no functional
change since 2024 and only receives dependency patches. Removing it takes
tailwindcss 3 and postcss-selector-parser 6 out of the repo.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
---------
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(ci): trust only same-repo audit coverage markers
Fork PR bodies were treated as audit coverage and their titles were
interpolated into the privileged Claude remediation prompt.
* fix(ci): detect direct runs of the audit scan through symlinked paths
A false negative silently skips main(), so the remediation job would see no
scan outputs and never run.
* test(ci): cover trusted coverage edge cases and run CI script tests
Adds case-insensitive, missing head repo, unknown repository and mixed
fork/same-repo cases, and a read-only workflow that runs the node:test
suite when .github/scripts changes.
* ci: run every CI script test suite and trigger on workflow edits pushed to main
---------
Co-authored-by: Sasha Mitchell <sash.t.mitchell@gmail.com>
Renames the .NET SDK folder to avoid issues with hidden-dotfile
semantics and improve tooling compatibility. Updates CI workflows
and the version-check script reference accordingly.
The gem name 'firecrawl' is already taken on RubyGems. Renamed to
'firecrawl-sdk' across gemspec, publish workflow, version check script,
and README install instructions.
Implements a .NET 8 SDK mirroring the Java SDK structure with support
for all v2 API endpoints (scrape, crawl, batch scrape, map, search)
excluding extract. Includes:
- FirecrawlClient with async/await API and auto-polling for async jobs
- Full model types for all v2 request options and responses
- HTTP client with retry logic and exponential backoff
- Custom exception hierarchy (Auth, RateLimit, JobTimeout)
- Unit tests for client construction, models, and exceptions
- CI workflow for PR testing with xunit
- Publish workflow for NuGet with version check support
- Version check script updated to support dotnet/NuGet
Implements a Ruby SDK for the Firecrawl v2 API, following the same
structure and patterns as the Java SDK. Supports scrape, crawl,
batch scrape, map, search, and agent operations.
- Core client with retry logic and exponential backoff
- Model classes for all v2 API endpoints (no extract)
- Unit tests with webmock for HTTP mocking
- CI workflow for PR testing (test-ruby-sdk.yml)
- Publish workflow for RubyGems (publish-ruby-sdk.yml)
- Version check script updated to support Ruby/RubyGems
- Make v2 the default surface — all types exported at crate root
- Remove v1 modules (document, extract, llmstxt) and v2 submodule
- Bump version to 2.0.0 with cleaned-up dependencies
- Support: scrape, crawl, batch_scrape, search, map, agent endpoints
- 49 unit tests with mockito, all passing
- Add publish workflow (crates.io) with version-gated publishing
- Enable Rust in version check script (check_version_has_incremented.py)
- Move Rust SDK from community to official in README with code example
- Delete v1 examples, update v2 example imports
- Simplify error types: JobFailed(String), Misuse(String)
- Wrap parse_version() in try/except to handle non-release Packagist entries
- Validate web/news/images are arrays before constructing SearchData
- Guard sessions with is_array() before iterating in BrowserListResponse
- Fix E2E step condition to use secrets context instead of env var
Co-Authored-By: gaurav <gauravchadha1676@gmail.com>
- Validate polling interval (>=1s) before sleep() in all poll loops
- Validate pagination URLs against API base URL origin (SSRF prevention)
- Validate apiUrl includes scheme (https://) in FirecrawlClient::create
- Trim whitespace from API keys after env retrieval
- Cast creditsUsed to int while preserving null in BatchScrapeJob/CrawlJob
- Fix CreditUsage hydration to read from nested 'data' key
- Handle empty 2xx response bodies before JSON decode
- Remove DeferrableProvider (incompatible with boot-time publishes)
- Normalize and validate api_key in FirecrawlServiceProvider
- Guard links type before iterating in MapData
- Add Content-Type header and -f flag to Packagist curl
- Filter out prereleases in check_version_has_incremented.py
- Add missing PHPDoc type annotations to fix all 24 PHPStan errors
- Simplify PHP CI to single Build and Test job (matching Java SDK pattern)
Co-Authored-By: gaurav <gauravchadha1676@gmail.com>
* feat(java-sdk): add Maven Central publish workflow
- Add signing plugin and OSSRH repository config to build.gradle.kts
- Add publish-java-sdk.yml workflow that auto-publishes on version bump
- Add Java support to version check script (reads build.gradle.kts, checks Maven Central)
Required secrets: MAVEN_USERNAME, MAVEN_PASSWORD, GPG_SIGNING_KEY, GPG_SIGNING_PASSWORD
Co-Authored-By: micahstairs <micah@sideguide.dev>
* fix(java-sdk): switch to Central Portal publishing via vanniktech plugin
The legacy OSSRH endpoints (s01.oss.sonatype.org) don't work with the
new Central Portal (central.sonatype.com). Switch to the vanniktech
maven-publish plugin which has native Central Portal support.
- Replace manual maven-publish + signing with com.vanniktech.maven.publish
- Use SonatypeHost.CENTRAL_PORTAL target
- Update workflow env vars to match plugin conventions
- Publish command: publishAndReleaseToMavenCentral
Co-Authored-By: micahstairs <micah@sideguide.dev>
* Apply suggestion from @cubic-dev-ai[bot]
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* chore(java-sdk): update GitHub org from mendableai to firecrawl
Co-Authored-By: micahstairs <micah@sideguide.dev>
* chore: fix example output in version check script docstring
Co-Authored-By: micahstairs <micah@sideguide.dev>
---------
Co-authored-by: firecrawl-spring[bot] <254786068+firecrawl-spring[bot]@users.noreply.github.com>
Co-authored-by: micahstairs <micah@sideguide.dev>
Co-authored-by: Micah Stairs <micah.stairs@gmail.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>