diff --git a/README.md b/README.md index 45370e6fdc..8e7e149f7b 100644 --- a/README.md +++ b/README.md @@ -364,7 +364,7 @@ firecrawl developer "axum middleware ordering" | Option | Description | | --------------------- | ----------------------------------------- | -| `--limit ` | Number of results (default: 20, max: 100) | +| `--limit ` | Number of results (default: 10, max: 100) | | `--skills-only` | Search only agent-skill files | | `-o, --output ` | Save to file | | `--json` | Output as compact JSON | diff --git a/package.json b/package.json index 91171ea798..97f956892d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firecrawl-cli", - "version": "1.19.28", + "version": "1.19.29", "description": "Command-line interface for Firecrawl. Scrape, crawl, and extract data from any website directly from your terminal.", "main": "dist/index.js", "bin": { diff --git a/src/__tests__/commands/developer.test.ts b/src/__tests__/commands/developer.test.ts index c36d2d8fb6..248246d51b 100644 --- a/src/__tests__/commands/developer.test.ts +++ b/src/__tests__/commands/developer.test.ts @@ -23,7 +23,7 @@ describe('handleDeveloperSearchCommand', () => { let mockHttpGet: ReturnType; // Wrap a payload in the axios envelope returned by `client.http.get`. - // Mirrors the `/v2/developer/search` response shape: + // Mirrors the `/v2/search/developer` response shape: // { success, results: [{ id, type, url, title, passages: [{ text }] }] } const mockDeveloperResponse = (results: any[]) => ({ data: { success: true, results }, @@ -56,14 +56,14 @@ describe('handleDeveloperSearchCommand', () => { }); describe('API call generation', () => { - it('calls /v2/developer/search with the query and integration tag', async () => { + it('calls /v2/search/developer with the query and integration tag', async () => { mockHttpGet.mockResolvedValue(mockDeveloperResponse([sampleResult])); await handleDeveloperSearchCommand({ query: 'tokio spawn_blocking' }); expect(mockHttpGet).toHaveBeenCalledTimes(1); expect(mockHttpGet).toHaveBeenCalledWith( - '/v2/developer/search?query=tokio+spawn_blocking&integration=cli' + '/v2/search/developer?query=tokio+spawn_blocking&integration=cli' ); }); @@ -76,7 +76,7 @@ describe('handleDeveloperSearchCommand', () => { }); expect(mockHttpGet).toHaveBeenCalledWith( - '/v2/developer/search?query=tokio+spawn_blocking&skills=only&integration=cli' + '/v2/search/developer?query=tokio+spawn_blocking&skills=only&integration=cli' ); }); @@ -89,7 +89,7 @@ describe('handleDeveloperSearchCommand', () => { }); expect(mockHttpGet).toHaveBeenCalledWith( - '/v2/developer/search?query=tokio+spawn_blocking&k=5&integration=cli' + '/v2/search/developer?query=tokio+spawn_blocking&k=5&integration=cli' ); }); diff --git a/src/commands/developer.ts b/src/commands/developer.ts index ccdc2cffff..701d22e242 100644 --- a/src/commands/developer.ts +++ b/src/commands/developer.ts @@ -2,7 +2,9 @@ import { getClient, isKeylessMode, keylessGet } from '../utils/client'; import { writeOutput } from '../utils/output'; import type { DeveloperItem, DeveloperSearchOptions } from '../types/developer'; -const BASE = '/v2/developer/search'; +// The other mount, /v2/developer/search, rejects keyless callers and may be +// withdrawn. +const BASE = '/v2/search/developer'; const MAX_PASSAGE_CHARS = 1200; async function getDeveloper( diff --git a/src/index.ts b/src/index.ts index 1f06323352..d05eaeaa7e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1059,7 +1059,7 @@ function createDeveloperCommand(): Command { .argument('', 'Natural-language developer question or search phrase') .option( '--limit ', - 'Number of results to return (default: 20, max: 100)', + 'Number of results to return (default: 10, max: 100)', parseInt ) .addOption(new Option('--k ').argParser(parseInt).hideHelp())