Install, authentication, and troubleshooting for the Bright Data CLI (bdata) are documented in a single canonical place:
→ references/cli-setup.md [blocked]
Consult it before any task that shells out to bdata.
Bright Data APIs
Bright Data provides infrastructure for web data extraction at scale. Four primary APIs cover different use cases — always pick the most specific tool for the job.
Choosing the Right API
Use Case
API
Why
Scrape any webpage by URL (no interaction)
Web Unlocker
HTTP-based, auto-bypasses bot detection, cheapest
Google / Bing / Yandex search results
SERP API
Specialized for SERP extraction, returns structured data
Structured data from Amazon, LinkedIn, Instagram, TikTok, etc.
Web Scraper API
Pre-built scrapers, no parsing needed
Click, scroll, fill forms, run JS, intercept XHR
Browser API
Full browser automation
Puppeteer / Playwright / Selenium automation
Browser API
Connects via CDP/WebDriver
Route your own HTTP client through a raw proxy (DC/ISP/Residential/Mobile)
Proxy networks
When you need direct proxy access with your own request logic instead of a managed API — see the proxy.md skill
Authentication Pattern (All APIs)
All APIs share the same authentication model. The env vars below apply to direct REST API integrations — if you are using the bdata CLI, bdata login handles all of these automatically (see references/cli-setup.md [blocked]).
bash
export BRIGHTDATA_API_KEY="your-api-key" # From Control Panel > Account Settingsexport BRIGHTDATA_UNLOCKER_ZONE="zone-name" # Web Unlocker zone nameexport BRIGHTDATA_SERP_ZONE="serp-zone-name" # SERP API zone nameexport BROWSER_AUTH="brd-customer-ID-zone-NAME:PASSWORD" # Browser API credentials
REST API authentication header for Web Unlocker and SERP API:
Authorization: Bearer YOUR_API_KEY
Web Unlocker API
HTTP-based scraping proxy. Best for simple page fetches without browser interaction.
import time# Triggersnapshot_id = requests.post( "https://api.brightdata.com/datasets/v3/trigger", params={"dataset_id": DATASET_ID, "format": "json"}, headers={"Authorization": f"Bearer {API_KEY}"}, json={"input": [{"url": u} for u in urls]}).json()["snapshot_id"]# Pollwhile True: status = requests.get( f"https://api.brightdata.com/datasets/v3/progress/{snapshot_id}", headers={"Authorization": f"Bearer {API_KEY}"} ).json()["status"] if status == "ready": break if status == "failed": raise Exception("Job failed") time.sleep(10)# Downloaddata = requests.get( f"https://api.brightdata.com/datasets/v3/snapshot/{snapshot_id}", params={"format": "json"}, headers={"Authorization": f"Bearer {API_KEY}"}).json()
Progress status values:starting → running → ready | failedData retention: 30 days.
Billing: Per delivered record. Invalid input URLs that fail are still billable.
See references/web-scraper-api.md [blocked] for complete reference including scraper types, output formats, delivery options, and billing details.
Browser API (Scraping Browser)
Full browser automation via CDP/WebDriver. Handles CAPTCHA, fingerprinting, and anti-bot detection automatically.
brightdata-proxy — For routing requests through Bright Data's raw proxy networks (Datacenter, ISP, Residential, Mobile) with your own HTTP client instead of a managed API. Covers network/IP-pool selection, the brd-customer-... username format, targeting & sticky-session params, SSL CA setup for Residential/Mobile, and integrations for cURL, Python (requests/httpx/aiohttp/Scrapy), Node (fetch/axios), Playwright, Puppeteer, and Selenium. Hand off to it whenever the task is raw proxy access rather than Web Unlocker / SERP / Web Scraper / Browser API. Escalation order when proxies hit consistent blocks: raw proxy → Web Unlocker → Browser API → Web Scraper API.