🚀 feat: Batch Operations Fix, Amazon Search, Auto-Zones, and Comprehensive Improvements#12
Merged
shahar-brd merged 7 commits intobrightdata:mainfrom Dec 2, 2025
Merged
Conversation
… result - Fixed batch scraping to return proper List[ScrapeResult] for multiple URLs - Applied fix to 8 instances across all platform scrapers - Base scraper, Amazon, LinkedIn, Facebook, Instagram all fixed - Resolves critical API contract violation in batch operations
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
This PR delivers critical bug fixes and major feature enhancements to bring the SDK to enterprise-grade production readiness. Includes batch operations fix (critical), Amazon Search API, LinkedIn Search fix, Trigger Interface, improved zone defaults, and comprehensive test coverage.
🔥 Critical Fixes
1️⃣ Batch Operations Bug Fix (Critical)
Problem: Multiple URLs returned single
ScrapeResultwith list data instead ofList[ScrapeResult]Impact:
Files Changed:
src/brightdata/scrapers/base.pysrc/brightdata/scrapers/amazon/scraper.py(2 methods)src/brightdata/scrapers/linkedin/scraper.pysrc/brightdata/scrapers/facebook/scraper.py(2 methods)src/brightdata/scrapers/instagram/scraper.pysrc/brightdata/scrapers/instagram/search.py2️⃣ Sync Wrapper Fixes (Critical)
Fixed 26 sync wrapper methods that were failing with
RuntimeError: Engine must be used as async context managerProblem:
Solution:
Files Changed: All platform scrapers (7 files, 26 methods)
✨ New Features
3️⃣ Amazon Search API (NEW)
Implements parameter-based Amazon product discovery matching Bright Data's official capabilities.
Implementation:
AmazonSearchScraperclass (375 lines)client.search.amazonnamespaceFiles Changed:
src/brightdata/scrapers/amazon/search.py(NEW)src/brightdata/scrapers/amazon/__init__.pysrc/brightdata/api/search_service.py4️⃣ LinkedIn Job Search Fix (Critical Bug)
Fixed broken
client.search.linkedin.jobs()that was returning HTTP 400 errors.Problem:
Solution: Now builds LinkedIn job search URLs internally from parameters
Files Changed:
src/brightdata/scrapers/linkedin/search.py5️⃣ Trigger Interface (NEW - Advanced Users)
Manual trigger/poll/fetch workflow control for all 18 scraper methods.
Use Cases:
Implementation:
ScrapeJobclassFiles Changed:
src/brightdata/scrapers/job.py(NEW)src/brightdata/scrapers/base.py⚙️ Configuration Improvements
6️⃣ Zone Configuration Defaults
Better defaults for easier onboarding and analytics:
Impact:
sdk_*naming for better analytics trackingFiles Changed:
src/brightdata/client.py🧪 Testing & Quality
7️⃣ Test Improvements
Added:
Fixed:
Results:
Files Changed:
tests/unit/test_batch.py(NEW - 13 tests)tests/unit/test_client.pytests/unit/test_zone_manager.pytests/integration/test_client_integration.py📚 Documentation Updates
8️⃣ README Enhancements
Added:
--output-formatvs--response-format)Improved:
sync=parameter from examples🔄 Breaking Changes
None - All changes are fully backward compatible.
Users can still override defaults:
📦 Migration Guide
No migration needed - existing code continues to work.
New features available:
✅ CI/CD Checks
📊 Impact Summary
Summary: Major feature release with critical batch operations fix, Amazon Search API, LinkedIn Search fix, Trigger Interface, and improved zone defaults.
Highlights:
🙏 Acknowledgments
Thanks to the Bright Data team for maintaining this excellent OSS project!