fix(cli): send documented default search limit

Merged
DE
1mo ago
+5-3

Problem

firecrawl search documents a default of 5 results, but when --limit is omitted the CLI omitted the field from the /v2/search body. The API then applied its default of 10, so authenticated and keyless CLI requests returned more results than documented.

Change

Apply the CLI's documented default (limit: 5) in the shared search payload builder. Explicit --limit values continue to pass through unchanged, and both authenticated and keyless paths use the same body.

Validation

  • pnpm build
  • pnpm exec vitest run src/__tests__/commands/search.test.ts (42 passed)
  • pnpm exec prettier --check src/commands/search.ts src/__tests__/commands/search.test.ts
  • git diff --check

Summary by cubic

Fixes firecrawl search to send the documented default of 5 results when --limit is omitted, instead of letting the API default to 10. Explicit --limit values still pass through unchanged for both authenticated and keyless requests.