Skip to content

feat: add Bright Search for companies, people, and products - #39

Merged
romanv-brd merged 2 commits into
brightdata:mainfrom
karaposu:feat/bright-search
Nov 17, 2026
Merged

romanv-brd merged 2 commits into
brightdata:mainfrom
karaposu:feat/bright-search

Conversation

@karaposu

Copy link
Copy Markdown
Contributor

Adds direct access to Bright Data’s indexed company, people, and product search through the existing SDK client, with namespace grouping consistent with the Python SDK:

  • client.search.business.companies(query, options)
  • client.search.business.people(query, options)
  • client.search.ecommerce.products(query, options)

Company and People searches support ludicrous, instant, and smart; product searches support structured queries with ludicrous.

Each call returns one BrightSearchPage, preserving request identity, coverage metadata, document order, sparse records, and unknown response fields.

The implementation includes:

  • TypeScript overloads and runtime validation for query/mode combinations, native JSON, projections, pagination, and explicit diagnostic controls.
  • An opt-in single-attempt path through the shared transport, preventing automatic retries, redirects, or follow-up requests for Bright Search.
  • Strict UTF-8 decoding and optional HTTP context on existing SDK errors, preserving available status, request IDs, headers, and failure causes.
  • Root/search package exports, documentation, examples, and a bounded 40-scenario live runner.

Existing SERP behavior and context-free error serialization remain compatible. Bright Search rejects requests before dispatch on runtimes without a functional Undici dispatcher.

Validation on Node 22.23.4 with Undici 7.16.0:

  • npm test: 589 passed; 12 optional live integration tests skipped.
  • npm run sanity: passed.
  • npm run build: passed, including ESM/CommonJS requests through all three grouped methods and NodeNext declaration checks.
  • All 40 catalog scenarios passed offline preflight through the final grouped API.

Live verification passed 40/40 scenarios with 34 HTTP requests: 30 successful responses, four expected HTTP 400 responses, and six local validation checks. No retries were performed. Three People responses reported partial coverage, which remained visible in their metadata.

The live run preceded the namespace-only refactor; the final grouped interface was subsequently verified through offline, localhost, and built-package checks.

@romanv-brd
romanv-brd merged commit aa3da6f into brightdata:main Nov 17, 2026
3 checks passed
@romanv-brd

Copy link
Copy Markdown
Collaborator

thank you, looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants