Add support for local/custom API URLs - #20
Merged
Merged
Conversation
For custom API URLs (e.g., local development with Docker), the CLI now: - Skips API key requirement when using non-cloud URLs - Allows optional API key input during login - Skips browser auth flow for custom URLs This enables use with local Firecrawl instances that have USE_DB_AUTHENTICATION=false. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add --api-url flag at both global and command levels (scrape, crawl, map, search, credit-usage) similar to --api-key. When a custom API URL is provided, authentication is skipped allowing requests to local or self-hosted Firecrawl instances without an API key. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the --api-url option for self-hosted and local development use cases in the README, including examples for environment variables and CI/CD usage. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
Users running Firecrawl locally via Docker with
USE_DB_AUTHENTICATION=falsecouldn't use the CLI:firecrawl login --api-url http://localhost:3002 # Would prompt for API key, then fail with "Unauthorized: Invalid token"Solution
Detect when
--api-urlis different fromhttps://api.firecrawl.devand:validateConfig()Usage
Test plan
isCustomApiUrl()andvalidateConfig()with custom URLs🤖 Generated with Claude Code