Skip to main content
This guide shows how to install the Bright Data Python SDK and call every feature it exposes: URL scraping, search engines, platform-specific scrapers (LinkedIn, Amazon, Instagram, TikTok, YouTube, Reddit, Pinterest, ChatGPT, Perplexity, Digikey), the Discover API, Scraper Studio, datasets, and the Browser API. Final Banner Pn

Installation and setup

Install the package via pip:

Configuration

You must provide your API token. You can find it in your Bright Data Control Panel. Option 1: Environment variable (recommended)
Option 2: Direct initialization

Basic usage

Use SyncBrightDataClient for simple scripts. Use BrightDataClient with asyncio for high-concurrency workloads.

Launch scrapes and web searches

When working with multiple queries or URLs, requests are handled concurrently for optimal performance.

Use platform-specific scrapers for structured data

Extract structured data from Amazon, LinkedIn, Facebook, Instagram, TikTok, YouTube, Reddit, Pinterest, ChatGPT, Perplexity, and Digikey.

Search the web with AI-powered ranking (Discover API)

Run your custom Scraper Studio scrapers

Datasets API

Access pre-collected data snapshots.
In your IDE, hover over the BrightDataClient class or any of its methods to view available parameters, type hints, and usage examples. The SDK provides full IntelliSense support.

Use dataclass payloads for type safety

The SDK includes dataclass payloads with runtime validation and helper properties.

Connect to scraping browser

Connect Playwright to Bright Data’s cloud browser via the Browser API.

Use the CLI tool

The SDK includes a command-line interface for terminal usage.

Async usage for better performance

For concurrent operations, pass a list of URLs to scrape_url and run inside an async context manager.

Resources

GitHub repository

View source code, examples, and contribute

Examples directory

10+ working examples for all features

PyPI page

Package listing and release history

What’s new