Skip to content

v2.5.0 — CLI-credentials auth + scraper-core dedup

Choose a tag to compare

@artemo-brd artemo-brd released this 30 Jul 17:59
· 5 commits to main since this release

Highlights

CLI-credentials auth fallback — one brightdata login now authenticates the SDK too. With no token given, the client falls back to the token already saved by the Bright Data CLI:

client = BrightDataClient()   # zero configuration on a logged-in machine

Resolution order: token= parameter → BRIGHTDATA_API_TOKEN / BRIGHTDATA_API_KEY env vars → CLI login → actionable error mentioning brightdata login.

Every request now reports how the token was obtained via the User-Agent header (auth=param / env / cli_credentials) — the token itself is never logged.

Internal: shared ScraperCore — the 7 search scrapers (Amazon, ChatGPT, Instagram, LinkedIn, Pinterest, TikTok, YouTube) now share one construction core instead of hand-copied __init__s, fixing drift where Amazon/ChatGPT/LinkedIn search were missing the BRIGHTDATA_API_TOKEN environment fallback that the others already had.

Changes

  • BrightDataClient / SyncBrightDataClient: new token resolution precedence + auth_source reporting
  • AsyncEngine: User-Agent now brightdata-sdk-python/{version} (auth=...) (was brightdata-sdk/{version})
  • ScraperCore: shared base for search-scraper construction (−174 lines of duplicated code)
  • README: documents the CLI login fallback

Full diff: v2.4.1...main