
Brightdata Cli
- 1 installs
- 3 repo stars
- Updated March 30, 2026
- brightdata/opencode-brightdata
This is a copy of brightdata-cli by brightdata - installs and ranking accrue to the original listing.
brightdata-cli is a skill for using the Bright Data CLI (brightdata / bdata) to scrape URLs, search Google/Bing/Yandex, and extract structured data from 40+ platforms from the terminal.
About
brightdata-cli is a guide for using the Bright Data CLI (brightdata / bdata) to collect web data from the terminal. It scrapes any URL as markdown, HTML, JSON, or screenshot, searches Google/Bing/Yandex, and extracts structured data from 40+ platforms like Amazon, LinkedIn, Instagram, and YouTube via pipelines. A developer uses it to do web data collection from the terminal with automatic anti-bot bypass, CAPTCHA handling, and proxy zones after a single OAuth login.
- Wraps the Bright Data CLI (brightdata / bdata) for scraping, SERP search, and structured extraction from 40+ platforms
- Handles auth, proxy zones, anti-bot bypass, CAPTCHA solving, and JS rendering automatically after one login
- Covers scrape, search, pipelines, status, budget, and zones commands with format and geo options
Brightdata Cli by the numbers
- 1 all-time installs (skills.sh)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
brightdata-cli capabilities & compatibility
Free CLI install; requires a Bright Data account and login, with usage billed by Bright Data (check via bdata budget).
- Capabilities
- web scraping · web search · structured data extraction · proxy zones
- Works with
- chrome · linkedin
- Use cases
- web scraping · web search · research · data analysis
- Runs
- Runs locally
- Pricing
- Bring your own API key
What brightdata-cli says it does
The Bright Data CLI (`brightdata` or `bdata`) gives you full access to Bright Data's web data platform from the terminal.
It handles authentication, proxy zones, anti-bot bypass, CAPTCHA solving, and JavaScript rendering automatically — the user just needs to log in once.
Requires Node.js >= 20. After install, both `brightdata` and `bdata` (shorthand) are available.
npx skills add https://github.com/brightdata/opencode-brightdata --skill brightdata-cliAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 3 |
| Last updated | March 30, 2026 |
| Repository | brightdata/opencode-brightdata ↗ |
What it does
Scrape URLs, search engines, and extract structured data from 40+ platforms via the Bright Data CLI.
Who is it for?
Developers who want terminal-based web scraping and structured data extraction with automatic anti-bot handling.
Skip if: Users needing an in-code SDK (use the Python or JS SDK skills) rather than a CLI.
When should I use this skill?
The user wants to scrape a URL, search a web engine, extract data from a major platform, or check their Bright Data balance or zones.
What you get
Clean scraped pages, structured SERP results, or platform datasets pulled from the terminal with automatic bot handling.
- Scraped pages as markdown, HTML, JSON, or screenshots
- Structured platform data via pipelines
- SERP search results
By the numbers
- 40+ platform pipeline types
- 3 search engines (Google/Bing/Yandex)
- requires Node.js >= 20
Files
Bright Data CLI
The Bright Data CLI (brightdata or bdata) gives you full access to Bright Data's web data platform from the terminal. It handles authentication, proxy zones, anti-bot bypass, CAPTCHA solving, and JavaScript rendering automatically — the user just needs to log in once.
Installation
If the CLI is not installed yet, guide the user:
macOS / Linux:
curl -fsSL https://cli.brightdata.com/install.sh | bashWindows or manual install (any platform):
npm install -g @brightdata/cliWithout installing (one-off usage):
npx --yes --package @brightdata/cli brightdata <command>Requires Node.js >= 20. After install, both brightdata and bdata (shorthand) are available.
First-Time Setup
Before anything else, check if the user is authenticated. If they haven't logged in yet, guide them through the one-time setup:
# One-time login — opens the browser for OAuth, then everything is automatic
bdata loginThis single command: 1. Opens the browser for secure OAuth authentication 2. Saves the API key locally (never needs to be entered again) 3. Auto-creates required proxy zones (cli_unlocker, cli_browser) 4. Sets default configuration
After login, every subsequent command works without any manual intervention.
For headless/SSH environments where no browser is available:
bdata login --deviceFor direct API key authentication (non-interactive):
bdata login --api-key <key>To verify setup is complete, run:
bdata configCommand Reference
Read references/commands.md for the full command reference with all flags, options, and examples for every command.
Read references/pipelines.md for the complete list of 40+ pipeline types (Amazon, LinkedIn, Instagram, TikTok, YouTube, Reddit, and more) with their specific parameters.
Quick Command Overview
bdata is the shorthand for brightdata. Both work identically.
| Command | Purpose |
|---|---|
bdata scrape <url> | Scrape any URL as markdown, HTML, JSON, or screenshot |
bdata search "<query>" | Search Google/Bing/Yandex with structured results |
bdata pipelines <type> [params] | Extract structured data from 40+ platforms |
bdata pipelines list | List all 40+ available pipeline types |
bdata status <job-id> | Check async job status |
bdata zones | List proxy zones |
bdata budget | View account balance and costs |
bdata skill add | Install AI agent skills |
bdata skill list | List available skills |
bdata config | View/set configuration |
bdata login | Authenticate with Bright Data |
bdata version | Show CLI version and system info |
How to Use Each Command
Scraping
Scrape any URL with automatic bot bypass, CAPTCHA handling, and JS rendering:
# Default: returns clean markdown
bdata scrape https://example.com
# Get raw HTML
bdata scrape https://example.com -f html
# Get structured JSON
bdata scrape https://example.com -f json
# Take a screenshot
bdata scrape https://example.com -f screenshot -o page.png
# Geo-targeted scrape from the US
bdata scrape https://amazon.com --country us
# Save to file
bdata scrape https://example.com -o page.md
# Async mode for heavy pages
bdata scrape https://example.com --asyncSearching
Search engines with structured JSON output (Google returns parsed organic results, ads, People Also Ask, and related searches):
# Google search with formatted table
bdata search "web scraping best practices"
# Get raw JSON for piping
bdata search "typescript tutorials" --json
# Search Bing
bdata search "bright data pricing" --engine bing
# Localized search
bdata search "restaurants berlin" --country de --language de
# News search
bdata search "AI regulation" --type news
# Extract just URLs
bdata search "open source tools" --json | jq -r '.organic[].link'Pipelines (Structured Data Extraction)
Extract structured data from 40+ platforms. These trigger async jobs that poll until results are ready:
# LinkedIn profile
bdata pipelines linkedin_person_profile "https://linkedin.com/in/username"
# Amazon product
bdata pipelines amazon_product "https://amazon.com/dp/B09V3KXJPB"
# Instagram profile
bdata pipelines instagram_profiles "https://instagram.com/username"
# Amazon search
bdata pipelines amazon_product_search "laptop" "https://amazon.com"
# YouTube comments (top 50)
bdata pipelines youtube_comments "https://youtube.com/watch?v=..." 50
# Google Maps reviews (last 7 days)
bdata pipelines google_maps_reviews "https://maps.google.com/..." 7
# Output as CSV
bdata pipelines amazon_product "https://amazon.com/dp/..." --format csv -o product.csv
# List all available pipeline types
bdata pipelines listChecking Status
For async jobs (from --async scrapes or pipelines):
# Quick status check
bdata status <job-id>
# Wait until complete
bdata status <job-id> --wait
# With custom timeout
bdata status <job-id> --wait --timeout 300Budget & Zones
# Quick account balance
bdata budget
# Detailed balance with pending charges
bdata budget balance
# All zones cost/bandwidth
bdata budget zones
# Specific zone costs
bdata budget zone my_zone
# Date range filter
bdata budget zones --from 2024-01-01T00:00:00 --to 2024-02-01T00:00:00
# List all zones
bdata zones
# Zone details
bdata zones info cli_unlockerConfiguration
# View all config
bdata config
# Set defaults
bdata config set default_zone_unlocker my_zone
bdata config set default_format jsonInstalling AI Agent Skills
# Interactive picker — choose skills and target agents
bdata skill add
# Install a specific skill
bdata skill add scrape
# List available skills
bdata skill listOutput Modes
Every command supports multiple output formats:
| Flag | Effect |
|---|---|
| (none) | Human-readable formatted output with colors |
--json | Compact JSON to stdout |
--pretty | Indented JSON to stdout |
-o <path> | Write to file (format auto-detected from extension) |
When piped (stdout is not a TTY), colors and spinners are automatically disabled.
Chaining Commands
The CLI is pipe-friendly:
# Search → extract first URL → scrape it
bdata search "top open source projects" --json \
| jq -r '.organic[0].link' \
| xargs bdata scrape
# Scrape and view with markdown reader
bdata scrape https://docs.github.com | glow -
# Amazon product data to CSV
bdata pipelines amazon_product "https://amazon.com/dp/xxx" --format csv > product.csvEnvironment Variables
These override stored configuration:
| Variable | Purpose |
|---|---|
BRIGHTDATA_API_KEY | API key (skips login entirely) |
BRIGHTDATA_UNLOCKER_ZONE | Default Web Unlocker zone |
BRIGHTDATA_SERP_ZONE | Default SERP zone |
BRIGHTDATA_POLLING_TIMEOUT | Polling timeout in seconds |
Troubleshooting
| Error | Fix |
|---|---|
| CLI not found | Install with npm i -g @brightdata/cli or `curl -fsSL https://cli.brightdata.com/install.sh \ |
| "No Web Unlocker zone specified" | bdata config set default_zone_unlocker <zone> or re-run bdata login |
| "Invalid or expired API key" | bdata login |
| "Access denied" | Check zone permissions in the Bright Data control panel |
| "Rate limit exceeded" | Wait and retry, or use --async for large jobs |
| Async job timeout | Increase with --timeout 1200 or BRIGHTDATA_POLLING_TIMEOUT=1200 |
Key Design Principles
- One-time auth: After
bdata login, everything is automatic. No tokens to manage, no keys to pass. - Zones auto-created: Login creates
cli_unlockerandcli_browserzones automatically. - Smart defaults: Markdown output, auto-detected formats from file extensions, colors only in TTY.
- Pipe-friendly: JSON output + jq for automation. Colors/spinners disabled in pipes.
- Async support: Heavy jobs can run in background with
--async+status --wait. - npm package:
@brightdata/cli— install globally or use vianpx.
Bright Data CLI — Full Command Reference
Package: @brightdata/cli | Commands: brightdata / bdata (shorthand) | Requires: Node.js >= 20
Installation
# macOS / Linux
curl -fsSL https://cli.brightdata.com/install.sh | bash
# Any platform
npm install -g @brightdata/cli
# Without installing
npx --yes --package @brightdata/cli brightdata <command>---
Global Options
These flags work with any command:
| Flag | Description |
|---|---|
-k, --api-key <key> | Override API key for this request |
--timing | Show request timing info |
-v, --version | Show CLI version |
---
bdata login
Authenticate with Bright Data. Opens the browser for OAuth by default.
| Flag | Description |
|---|---|
-k, --api-key <key> | Use API key directly (skips browser) |
-c, --customer-id <id> | Bright Data account ID (optional) |
-d, --device | Use device flow for SSH/headless environments |
What happens on login: 1. Opens browser for OAuth (or uses device flow / direct API key) 2. Validates the API key 3. Saves credentials locally (~/.config/brightdata-cli/credentials.json) 4. Checks for required zones (cli_unlocker, cli_browser) 5. Creates missing zones automatically 6. Sets cli_unlocker as default zone if none configured
bdata login # Browser OAuth (recommended)
bdata login --device # Headless/SSH environments
bdata login --api-key <key> # Direct API key---
bdata logout
Clear stored credentials.
bdata logout---
bdata scrape <url>
Scrape any URL using Bright Data's Web Unlocker. Handles CAPTCHAs, JavaScript rendering, and anti-bot protections automatically.
| Flag | Description |
|---|---|
-f, --format <fmt> | markdown (default), html, screenshot, json |
--country <code> | ISO country code for geo-targeting (e.g. us, de, jp) |
--zone <name> | Web Unlocker zone name |
--mobile | Use a mobile user agent |
--async | Submit async, return a snapshot ID |
-o, --output <path> | Write output to file |
--json | Force JSON output |
--pretty | Pretty-print JSON output |
bdata scrape https://news.ycombinator.com
bdata scrape https://example.com -f html
bdata scrape https://amazon.com -f json --country us -o product.json
bdata scrape https://example.com -f screenshot -o page.png
bdata scrape https://example.com --async
bdata scrape https://docs.github.com | glow ----
bdata search <query>
Search Google, Bing, or Yandex via Bright Data's SERP API.
Google returns structured JSON with: organic results, ads, People Also Ask, related searches. Bing/Yandex return markdown by default.
| Flag | Description |
|---|---|
--engine <name> | google (default), bing, yandex |
--country <code> | Localized results (e.g. us, de) |
--language <code> | Language code (e.g. en, fr) |
--page <n> | Page number, 0-indexed (default: 0) |
--type <type> | web (default), news, images, shopping |
--device <type> | desktop, mobile |
--zone <name> | SERP zone name |
-o, --output <path> | Write output to file |
--json | Force JSON output |
--pretty | Pretty-print JSON output |
bdata search "typescript best practices"
bdata search "restaurants berlin" --country de --language de
bdata search "AI regulation" --type news
bdata search "web scraping" --page 1
bdata search "open source scraping" --json | jq -r '.organic[].link'
bdata search "bright data pricing" --engine bing---
bdata pipelines <type> [params...] [options]
Extract structured data from 40+ platforms. Triggers an async collection job, polls until ready, returns results.
| Flag | Description |
|---|---|
--format <fmt> | json (default), csv, ndjson, jsonl |
--timeout <seconds> | Polling timeout (default: 600) |
-o, --output <path> | Write output to file |
--json | Force JSON output |
--pretty | Pretty-print JSON output |
bdata pipelines list # List all types
bdata pipelines linkedin_person_profile "https://linkedin.com/in/username"
bdata pipelines amazon_product "https://amazon.com/dp/B09V3KXJPB" --format csv -o product.csv
bdata pipelines instagram_profiles "https://instagram.com/username"
bdata pipelines amazon_product_search "laptop" "https://amazon.com"
bdata pipelines google_maps_reviews "https://maps.google.com/..." 7
bdata pipelines youtube_comments "https://youtube.com/watch?v=..." 50See pipelines.md for the full list of types and their parameters.
---
bdata status <job-id>
Check status of an async snapshot job.
| Flag | Description |
|---|---|
--wait | Poll until the job completes |
--timeout <seconds> | Polling timeout (default: 600) |
-o, --output <path> | Write output to file |
--json / --pretty | JSON output |
bdata status s_abc123xyz
bdata status s_abc123xyz --wait --pretty
bdata status s_abc123xyz --wait --timeout 300---
bdata zones
List and inspect Bright Data proxy zones.
bdata zones # List all active zones
bdata zones info <name> # Full details for a zone
bdata zones --json -o zones.json # Export as JSON
bdata zones info my_zone --pretty # Pretty-print zone info---
bdata budget
View account balance and per-zone cost/bandwidth. Read-only.
| Subcommand | Description |
|---|---|
| (none) | Quick account balance |
balance | Balance + pending charges |
zones | Cost & bandwidth table for all zones |
zone <name> | Detailed cost & bandwidth for one zone |
| Flag | Description |
|---|---|
--from <datetime> | Start of date range (e.g. 2024-01-01T00:00:00) |
--to <datetime> | End of date range |
--json / --pretty | JSON output |
bdata budget
bdata budget balance
bdata budget zones
bdata budget zone my_zone
bdata budget zones --from 2024-01-01T00:00:00 --to 2024-02-01T00:00:00---
bdata config
View and manage CLI configuration.
| Subcommand | Description |
|---|---|
| (none) | Show all config |
get <key> | Get a single value |
set <key> <value> | Set a value |
| Config Key | Description |
|---|---|
default_zone_unlocker | Default zone for scrape and search |
default_zone_serp | Override zone for search only |
default_format | Default output format: markdown or json |
api_url | Override API base URL |
bdata config
bdata config set default_zone_unlocker my_zone
bdata config set default_format json
bdata config get default_zone_unlocker---
bdata init
Interactive setup wizard. Walks through authentication, zone selection, and default configuration.
| Flag | Description |
|---|---|
--skip-auth | Skip the authentication step |
-k, --api-key <key> | Provide API key directly |
bdata init---
bdata skill
Install Bright Data AI agent skills into coding agents (Claude Code, Cursor, Copilot, etc.).
| Subcommand | Description |
|---|---|
add | Interactive picker — choose skills + target agents |
add <name> | Install a specific skill directly |
list | List all available skills |
Available skills: search, scrape, data-feeds, bright-data-mcp, bright-data-best-practices
bdata skill add # Interactive
bdata skill add scrape # Direct install
bdata skill list # See what's available---
Configuration Storage
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/brightdata-cli/ |
| Linux | ~/.config/brightdata-cli/ |
| Windows | %APPDATA%\brightdata-cli\ |
Two files:
credentials.json— API key (mode 0o600)config.json— Zones, output format, preferences
Priority order: CLI flags > Environment variables > config.json > Defaults
Pipeline Types Reference
All pipeline types available via bdata pipelines <type> [params...].
Run bdata pipelines list to see all types in your terminal.
Parameter Patterns
Most types require just a URL:
bdata pipelines <type> "<url>"Some types have additional parameters — these are documented below.
---
E-Commerce
| Type | Platform | Parameters |
|---|---|---|
amazon_product | Amazon product page | <url> |
amazon_product_reviews | Amazon reviews | <url> |
amazon_product_search | Amazon search results | <keyword> <domain_url> |
walmart_product | Walmart product page | <url> |
walmart_seller | Walmart seller profile | <url> |
ebay_product | eBay listing | <url> |
bestbuy_products | Best Buy | <url> |
etsy_products | Etsy | <url> |
homedepot_products | Home Depot | <url> |
zara_products | Zara | <url> |
google_shopping | Google Shopping | <url> |
Amazon Search Example
# Requires both keyword and domain URL
bdata pipelines amazon_product_search "wireless headphones" "https://amazon.com"---
Professional Networks
| Type | Platform | Parameters |
|---|---|---|
linkedin_person_profile | LinkedIn person | <url> |
linkedin_company_profile | LinkedIn company | <url> |
linkedin_job_listings | LinkedIn jobs | <url> |
linkedin_posts | LinkedIn posts | <url> |
linkedin_people_search | LinkedIn people search | <url> <first_name> <last_name> |
crunchbase_company | Crunchbase | <url> |
zoominfo_company_profile | ZoomInfo | <url> |
LinkedIn People Search Example
# Requires URL, first name, and last name
bdata pipelines linkedin_people_search "https://linkedin.com/search/results/people" "John" "Doe"---
Social Media
| Type | Platform | Parameters |
|---|---|---|
instagram_profiles | Instagram profiles | <url> |
instagram_posts | Instagram posts | <url> |
instagram_reels | Instagram reels | <url> |
instagram_comments | Instagram comments | <url> |
facebook_posts | Facebook posts | <url> |
facebook_marketplace_listings | Facebook Marketplace | <url> |
facebook_company_reviews | Facebook reviews | <url> [num_reviews] |
facebook_events | Facebook events | <url> |
tiktok_profiles | TikTok profiles | <url> |
tiktok_posts | TikTok posts | <url> |
tiktok_shop | TikTok shop | <url> |
tiktok_comments | TikTok comments | <url> |
x_posts | X (Twitter) posts | <url> |
youtube_profiles | YouTube channels | <url> |
youtube_videos | YouTube videos | <url> |
youtube_comments | YouTube comments | <url> [num_comments] |
reddit_posts | Reddit posts | <url> |
YouTube Comments Example
# Optional second param: number of comments (default: 10)
bdata pipelines youtube_comments "https://youtube.com/watch?v=dQw4w9WgXcQ" 50Facebook Reviews Example
# Optional second param: number of reviews (default: 10)
bdata pipelines facebook_company_reviews "https://facebook.com/company" 25---
Maps, Reviews & Other
| Type | Platform | Parameters |
|---|---|---|
google_maps_reviews | Google Maps reviews | <url> [days_limit] |
google_play_store | Google Play | <url> |
apple_app_store | Apple App Store | <url> |
reuter_news | Reuters news | <url> |
github_repository_file | GitHub repository files | <url> |
yahoo_finance_business | Yahoo Finance | <url> |
zillow_properties_listing | Zillow | <url> |
booking_hotel_listings | Booking.com | <url> |
Google Maps Reviews Example
# Optional second param: days_limit (default: 3)
bdata pipelines google_maps_reviews "https://maps.google.com/maps/place/..." 7---
Output Options
All pipeline commands support:
# JSON (default)
bdata pipelines amazon_product "<url>"
# CSV
bdata pipelines amazon_product "<url>" --format csv
# NDJSON / JSONL
bdata pipelines amazon_product "<url>" --format ndjson
# Save to file
bdata pipelines amazon_product "<url>" -o product.json
# Custom timeout (default 600 seconds)
bdata pipelines amazon_product "<url>" --timeout 1200How Pipelines Work
1. CLI sends a trigger request to /datasets/v3/trigger with the dataset ID and input 2. Receives a snapshot_id 3. Polls /datasets/v3/snapshot/{snapshot_id} until status is no longer starting/building/running 4. Returns the collected data in the requested format
The default timeout is 600 seconds (10 minutes). For large datasets, increase with --timeout or set BRIGHTDATA_POLLING_TIMEOUT environment variable.
Bright Data CLI Installation
Quick Install
macOS / Linux:
curl -fsSL https://cli.brightdata.com/install.sh | bashAny platform (requires Node.js >= 20):
npm install -g @brightdata/cliWithout installing (one-off usage):
npx --yes --package @brightdata/cli brightdata <command>Verify Installation
Check if installed and authenticated:
bdata configAuthentication
If not authenticated, run:
bdata loginThis opens the browser for secure OAuth authentication. After login: 1. API key is saved locally (never needs to be entered again) 2. Required proxy zones (cli_unlocker, cli_browser) are auto-created 3. Default configuration is set
For headless/SSH environments where no browser is available:
bdata login --deviceFor direct API key authentication (non-interactive):
bdata login --api-key <key>If you fail to authenticate, use the following error handling instructions:
If ANY command returns an authentication error after you ran bdata login (e.g., "not authenticated", "unauthorized", "API key"), use an ask user question tool if available:
Question: "How would you like to authenticate with Bright Data?"
Options:
1. Login with browser (Recommended) — Opens your browser to authenticate with Bright Data 2. Login with device flow — For SSH/headless environments 3. Enter API key manually — Paste an existing API key from brightdata.com
If user selects browser login:
Run bdata login to automatically open the browser. Wait for them to confirm authentication, then retry the original command.
If user selects device flow:
Run bdata login --device and guide them through the device code flow.
If user selects manual API key:
Ask for their API key, then run:
bdata login --api-key "<their-key>"Or set the environment variable:
export BRIGHTDATA_API_KEY="<their-key>"Tell them to add this export to ~/.zshrc or ~/.bashrc for persistence, then retry the original command.
Troubleshooting
Command not found
If bdata command is not found after installation:
1. Make sure npm global bin is in PATH 2. Try: npx --yes --package @brightdata/cli brightdata --version 3. Or reinstall: npm install -g @brightdata/cli
Permission errors
If you get permission errors during installation:
# Option 1: Use the curl installer (recommended)
curl -fsSL https://cli.brightdata.com/install.sh | bash
# Option 2: Fix npm permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
# Add the export to your shell profileZone errors
If you get "No Web Unlocker zone specified":
bdata config set default_zone_unlocker <zone>
# Or re-run login to auto-create zones:
bdata loginRelated skills
FAQ
Does it need a browser to log in?
Normally yes (bdata login opens the browser for OAuth), but for headless/SSH environments use bdata login --device or --api-key.
How many platforms can pipelines extract from?
The skill states 40+ platforms including Amazon, LinkedIn, Instagram, TikTok, YouTube, and Reddit.