brightdata-cli
Guide for using the Bright Data CLI (`brightdata` / `bdata`) to scrape websites, search the web, extract structured data from 40+ platforms, manage proxy zones, and check account budget. Use this skill whenever the user wants to scrape a URL, search Google/Bing/Yandex, extract data from Amazon/LinkedIn/Instagram/TikTok/YouTube/Reddit or any other platform, check their Bright Data balance or zones, or do anything involving web data collection from the terminal. Also trigger when the user mentions brightdata, bdata, web scraping CLI, SERP API, or wants to install Bright Data skills into their coding agent.
What this skill does
# 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:** ```bash curl -fsSL https://cli.brightdata.com/install.sh | bash ``` **Windows or manual install (any platform):** ```bash npm install -g @brightdata/cli ``` **Without installing (one-off usage):** ```bash 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: ```bash # One-time login — opens the browser for OAuth, then everything is automatic bdata login ``` This 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: ```bash bdata login --device ``` For direct API key authentication (non-interactive): ```bash bdata login --api-key <key> ``` To verify setup is complete, run: ```bash bdata config ``` ## Command Reference Read [references/commands.md](references/commands.md) for the full command reference with all flags, options, and examples for every command. Read [references/pipelines.md](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: ```bash # 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 --async ``` ### Searching Search engines with structured JSON output (Google returns parsed organic results, ads, People Also Ask, and related searches): ```bash # 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: ```bash # 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 list ``` ### Checking Status For async jobs (from `--async` scrapes or pipelines): ```bash # Quick status check bdata status <job-id> # Wait until complete bdata status <job-id> --wait # With custom timeout bdata status <job-id> --wait --timeout 300 ``` ### Budget & Zones ```bash # 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_unlocker ``` ### Configuration ```bash # View all config bdata config # Set defaults bdata config set default_zone_unlocker my_zone bdata config set default_format json ``` ### Installing AI Agent Skills ```bash # Interactive picker — choose skills and target agents bdata skill add # Install a specific skill bdata skill add scrape # List available skills bdata skill list ``` ## Output 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: ```bash # 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.csv ``` ## Environment 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 \| bash` | | "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_unlocker` and `cli_browser` zones 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 pi
Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".