Skip to main content

Global options

These flags work with any command:

brightdata login

Authenticate with Bright Data. Opens the browser for OAuth by default.
On first login, the CLI automatically creates cli_unlocker and cli_browser proxy zones and sets sensible defaults.

brightdata logout

Clear stored credentials.

brightdata scrape <url>

Scrape any URL using Bright Data’s Web Unlocker. Handles CAPTCHAs, JavaScript rendering, and anti-bot protections automatically.

brightdata search <query>

Search Google, Bing, or Yandex via Bright Data’s SERP API. Google returns structured JSON with organic results, ads, People Also Ask, and related searches. Bing and Yandex return markdown by default.

brightdata discover <query>

AI-powered web discovery. Submit a query with optional intent, and Bright Data finds, ranks, and optionally extracts full-page content for each result.
For best results with --intent, use a structured formula: describe your persona, what to prioritize, the depth of analysis, and what to exclude. See the Discover API reference for detailed guidance.

brightdata pipelines <type> [params...] [options]

Extract structured data from 40+ platforms. Triggers an async collection job, polls until results are ready, and returns the data.

Supported platforms

Run brightdata pipelines list in your terminal to see all available types at any time.

brightdata scraper

Build, run, and maintain custom Bright Data Scraper Studio scrapers from the terminal. Each scraper is identified by a Collector ID (a c_* string) that stays stable across runs and self-healing.

brightdata scraper create <url> <description>

Build a scraper from a natural-language description using Bright Data’s AI Agent. Returns a Collector ID.
AI generation typically takes 5 to 15 minutes and can run up to 25 minutes on complex targets.

brightdata scraper run <collector_id> [url]

Run a scraper on one or more URLs and return the data. The CLI tries real-time mode first and falls back to batch mode automatically when a run exceeds the real-time page-load limit.

brightdata scraper heal <collector_id> <prompt>

Fix an existing scraper in place via AI self-healing. The Collector ID does not change. By default, heal stops at an approval gate and returns status: "awaiting_approval" with a preview_result.

brightdata scraper approve <collector_id>

Commit a heal that is awaiting approval, or reject it with --reject.
The self-healing flow is run, inspect, heal, approve, re-run. See the Scraper Studio CLI quickstart for a full walkthrough. scraper heal and scraper approve were added in CLI v0.3.1.

brightdata status <job-id>

Check the status of an async snapshot job (from --async scrapes or pipeline collections).

brightdata browser

Control a real browser session powered by Bright Data’s Scraping Browser. A lightweight local daemon holds the browser connection open between commands, giving you persistent state without reconnecting on every call.

Global flags

These flags work with every browser subcommand:

Subcommands

Navigate to a URL. Starts the daemon and browser session automatically if not already running.
Capture the page as a text accessibility tree. This is the primary way AI agents read page content - far more token-efficient than raw HTML.Each interactive element gets a ref (e.g. e1, e2) that you pass to click, type, fill, and other interaction commands.
Example output:
Capture a PNG screenshot of the current viewport.
Interact with elements using their snapshot ref values.
Scroll the viewport or scroll an element into view.
Get text or HTML content from the page or a specific element.
Inspect session state.
Navigation controls.
Close a session and stop its daemon.
Element ref values (e.g. e1, e3) are re-assigned on every snapshot call. After navigating or clicking, take a fresh snapshot before using refs again.

brightdata zones

List and inspect Bright Data proxy zones.

brightdata budget

View account balance and per-zone cost/bandwidth. Read-only.

brightdata config

View and manage CLI configuration.

brightdata init

Interactive setup wizard. Walks through authentication, zone selection, and default configuration.

brightdata skill

Install Bright Data AI agent skills into coding agents (Claude Code, Cursor, Copilot, etc.). Available skills: search, scrape, data-feeds, bright-data-mcp, bright-data-best-practices

brightdata add mcp

Add the Bright Data MCP server to Claude Code, Cursor, or Codex. Uses the API key stored by brightdata login.

Config file locations

The command writes the MCP server entry under mcpServers["bright-data"]. Existing config is preserved - only the bright-data key is added or replaced.
brightdata add mcp uses the API key stored by brightdata login. It does not read BRIGHTDATA_API_KEY or the --api-key flag, so run brightdata login first.