Repository navigation
feat: add Bright Search for companies, people, and products - #39
Merged
Merged
Conversation
Collaborator
|
thank you, looks good. |
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.
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, andsmart; product searches support structured queries withludicrous.Each call returns one
BrightSearchPage, preserving request identity, coverage metadata, document order, sparse records, and unknown response fields.The implementation includes:
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.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.