/python-sdk-best-practices
Web data extraction and discovery using the Bright Data Python SDK. Use when user asks to "scrape", "get data from", "extract", "search for", or "find" information from websites. Also use when user mentions specific platforms like Amazon, LinkedIn, Instagram, Facebook, TikTok,
$ npx -y skills add brightdata/skills --skill python-sdk-best-practices --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/python-sdk-best-practices
Context preview
The summary Claude sees to decide when to auto-load this skill.
Web data extraction and discovery using the Bright Data Python SDK. Use when user asks to "scrape", "get data from", "extract", "search for", or "find" information from websites. Also use when user mentions specific platforms like Amazon, LinkedIn, Instagram, Facebook, TikTok,
SKILL.md
python-sdk-best-practices.SKILL.mdname: brightdata-sdk
description: |
Web data extraction and discovery using the Bright Data Python SDK.
Use when user asks to "scrape", "get data from", "extract", "search for",
or "find" information from websites. Also use when user mentions specific
platforms like Amazon, LinkedIn, Instagram, Facebook, TikTok, YouTube,
Reddit, Pinterest, Zillow, Crunchbase, or DigiKey, or asks for "bulk data",
"historical data", or "dataset". Covers scraping, searching, datasets,
and browser automation.
metadata:
author: brightdata
version: "1.0"
Bright Data SDK
Access web data through a unified Python SDK. One client, eight service categories: platform scraping, platform search, web search (SERP), AI-powered discovery, datasets, web unlocking, browser automation, and scraper studio.
Always use the client as a context manager. In synchronous environments (scripts, notebooks, Claude Code), use `SyncBrightDataClient`. In async environments, use `BrightDataClient`. Both use the same method names — the sync client wraps calls automatically. Note: the sync client currently has limited platform coverage — see the sync compatibility note in `references/scrapers.md` for details. For unsupported platforms or the datasets API, use the async client (`BrightDataClient`).
Service Selection (decide first, then look up the specific method)
Use this decision tree to pick the right service BEFORE reaching for any specific method. Most routing failures come from skipping this step and pattern-matching on user keywords instead.
Have a URL?
├── On a supported platform (Amazon, LinkedIn, Facebook, Instagram, YouTube,
│ TikTok, Reddit, ChatGPT, Perplexity, Pinterest, DigiKey)?
│ → Platform scraping: client.scrape.<platform>.<method>(url=...)
│
├── Generic page (not on any supported platform)?
│ → Web unlocker: client.scrape_url(url=...)
│
└── Need login / JavaScript / click-scroll-fill / CAPTCHA / multi-step navigation?
→ Browser API: client.browser.get_connect_url() (then connect with Playwright)
No URL?
├── Want entities matching natural-language criteria
│ ("find AI startups in Berlin", "competitors of Acme Corp", "people who worked at X")?
│ → Discover: client.discover(query=..., intent=...)
│
├── Want web pages / articles / search-result links
│ ("search Google for X", "find pages about Y")?
│ → SERP: client.search.google(query=...) [or .bing / .yandex]
│
├── Want to search WITHIN a specific platform
│ ("find products on Amazon", "TikTok videos by hashtag", "Pinterest pins about recipes")?
│ → Platform search: client.search.<platform>.<method>(...)
│
└── Want bulk historical data at scale
("all LinkedIn companies in tech", "historical Amazon prices", "every Zillow listing in Texas")?
→ Datasets: client.datasets.<name>(filter=...) (then .download(snapshot_id))Edge cases:
- URL on supported platform BUT user explicitly mentions login/click/scroll/JS → Browser API (the interaction trumps the platform).
- URL on supported platform BUT scraper returns 403/blocked → fall back to `client.scrape_url()` (web unlocker).
- "Find/research/who are X" with a URL alongside (e.g., "find competitors of acme.com") → still Discover; the URL is context, not the scrape target.
Method Names: Verify Before Asserting
Before claiming any platform method exists, doesn't exist, or asserting a platform isn't supported, you MUST consult `references/scrapers.md` first. Past evals show the model has hallucinated method names (e.g., `client.scrape.linkedin.people` — does NOT exist; use `.profiles`) and falsely claimed platforms unsupported (e.g., Pinterest is supported via both `client.scrape.pinterest` and `client.search.pinterest`).
**Rule:** load `references/scrapers.md` before naming any specific platform method. The reference file lists every platform, every method signature, and the sync/async availability matrix. Verify, don't assume. If you've already loaded `references/scrapers.md` in this session, consult what's in context — no need to reload.
**Known hallucinations** (these names do NOT exist in the SDK — the model has invented them in past evals):
| Hallucinated | Correct replacement | |---|---| | `client.scrape.linkedin.people(...)` | `client.scrape.linkedin.profiles(url=...)` | | `client.scrape.instagram.users(...)` | `client.scrape.instagram.profiles(url=...)` | | `client.list_datasets()` | `client.datasets.list()` | | `asyncio.gather(*[client.scrape.X.<quick>(...) for ...])` | Trigger pattern — see Batch gotcha |
This list grows as new hallucinations are observed in evals. If you're tempted to write a method name that "feels right" but you haven't seen in `references/scrapers.md`, treat it as a likely hallucination — load the reference and verify.
Useful Standalone Methods
Methods that don't belong to any specific workflow — easy to overlook because they're not tied to a platform or a routing decision. The model has hallucinated some of these (`client.list_datasets()` instead of `client.datasets.list()`); use the canonical names below.
| Method | What it does | |---|---| | `client.datasets.list()` | List all 310+ datasets at runtime. Do NOT use `dir()` or introspection — use this method. | | `client.discover(query=, intent=)` | AI-ranked entity search (companies, people, products). See Service Selection above. | | `client.scrape_url(url=...)` | Web unlocker for any URL. Use for sites without a dedicated platform scraper. | | `client.browser.get_connect_url()` | CDP WebSocket URL for Playwright / Puppeteer / Selenium. | | `client.list_zones()` | List active Bright Data zones. | | `client.delete_zone(name)` | Remove a zone. | | `client.test_connection()` | Verify the API token works. | | `client.get_account_info()` | Usage, quotas, active zones. |
How to Handle Requests
Exploring capabilities
If the user wants to know what's available or asks "what can this do?", describe th
Read more
name: brightdata-sdk description: | Web data extraction and discovery using the Bright Data Python SDK. Use when user asks to "scrape", "get data from", "extract", "search for", or "find" information from websites. Also use when user mentions specific platforms like Amazon, LinkedIn, Instagram, Facebook, TikTok, YouTube, Reddit, Pinterest, Zillow, Crunchbase, or DigiKey, or asks for "bulk data", "historical data", or "dataset". Covers scraping, searching, datasets, and browser automation. metadata: author: brightdata version: "1.0"
Bright Data SDK
Access web data through a unified Python SDK. One client, eight service categories: platform scraping, platform search, web search (SERP), AI-powered discovery, datasets, web unlocking, browser automation, and scraper studio.
Always use the client as a context manager. In synchronous environments (scripts, notebooks, Claude Code), use `SyncBrightDataClient`. In async environments, use `BrightDataClient`. Both use the same method names — the sync client wraps calls automatically. Note: the sync client currently has limited platform coverage — see the sync compatibility note in `references/scrapers.md` for details. For unsupported platforms or the datasets API, use the async client (`BrightDataClient`).
Service Selection (decide first, then look up the specific method)
Use this decision tree to pick the right service BEFORE reaching for any specific method. Most routing failures come from skipping this step and pattern-matching on user keywords instead.
Have a URL?
├── On a supported platform (Amazon, LinkedIn, Facebook, Instagram, YouTube,
│ TikTok, Reddit, ChatGPT, Perplexity, Pinterest, DigiKey)?
│ → Platform scraping: client.scrape.<platform>.<method>(url=...)
│
├── Generic page (not on any supported platform)?
│ → Web unlocker: client.scrape_url(url=...)
│
└── Need login / JavaScript / click-scroll-fill / CAPTCHA / multi-step navigation?
→ Browser API: client.browser.get_connect_url() (then connect with Playwright)
No URL?
├── Want entities matching natural-language criteria
│ ("find AI startups in Berlin", "competitors of Acme Corp", "people who worked at X")?
│ → Discover: client.discover(query=..., intent=...)
│
├── Want web pages / articles / search-result links
│ ("search Google for X", "find pages about Y")?
│ → SERP: client.search.google(query=...) [or .bing / .yandex]
│
├── Want to search WITHIN a specific platform
│ ("find products on Amazon", "TikTok videos by hashtag", "Pinterest pins about recipes")?
│ → Platform search: client.search.<platform>.<method>(...)
│
└── Want bulk historical data at scale
("all LinkedIn companies in tech", "historical Amazon prices", "every Zillow listing in Texas")?
→ Datasets: client.datasets.<name>(filter=...) (then .download(snapshot_id))Edge cases:
- URL on supported platform BUT user explicitly mentions login/click/scroll/JS → Browser API (the interaction trumps the platform).
- URL on supported platform BUT scraper returns 403/blocked → fall back to `client.scrape_url()` (web unlocker).
- "Find/research/who are X" with a URL alongside (e.g., "find competitors of acme.com") → still Discover; the URL is context, not the scrape target.
Method Names: Verify Before Asserting
Before claiming any platform method exists, doesn't exist, or asserting a platform isn't supported, you MUST consult `references/scrapers.md` first. Past evals show the model has hallucinated method names (e.g., `client.scrape.linkedin.people` — does NOT exist; use `.profiles`) and falsely claimed platforms unsupported (e.g., Pinterest is supported via both `client.scrape.pinterest` and `client.search.pinterest`).
**Rule:** load `references/scrapers.md` before naming any specific platform method. The reference file lists every platform, every method signature, and the sync/async availability matrix. Verify, don't assume. If you've already loaded `references/scrapers.md` in this session, consult what's in context — no need to reload.
**Known hallucinations** (these names do NOT exist in the SDK — the model has invented them in past evals):
| Hallucinated | Correct replacement | |---|---| | `client.scrape.linkedin.people(...)` | `client.scrape.linkedin.profiles(url=...)` | | `client.scrape.instagram.users(...)` | `client.scrape.instagram.profiles(url=...)` | | `client.list_datasets()` | `client.datasets.list()` | | `asyncio.gather(*[client.scrape.X.<quick>(...) for ...])` | Trigger pattern — see Batch gotcha |
This list grows as new hallucinations are observed in evals. If you're tempted to write a method name that "feels right" but you haven't seen in `references/scrapers.md`, treat it as a likely hallucination — load the reference and verify.
Useful Standalone Methods
Methods that don't belong to any specific workflow — easy to overlook because they're not tied to a platform or a routing decision. The model has hallucinated some of these (`client.list_datasets()` instead of `client.datasets.list()`); use the canonical names below.
| Method | What it does | |---|---| | `client.datasets.list()` | List all 310+ datasets at runtime. Do NOT use `dir()` or introspection — use this method. | | `client.discover(query=, intent=)` | AI-ranked entity search (companies, people, products). See Service Selection above. | | `client.scrape_url(url=...)` | Web unlocker for any URL. Use for sites without a dedicated platform scraper. | | `client.browser.get_connect_url()` | CDP WebSocket URL for Playwright / Puppeteer / Selenium. | | `client.list_zones()` | List active Bright Data zones. | | `client.delete_zone(name)` | Remove a zone. | | `client.test_connection()` | Verify the API token works. | | `client.get_account_info()` | Usage, quotas, active zones. |
How to Handle Requests
Exploring capabilities
If the user wants to know what's available or asks "what can this do?", describe th
Repo: brightdata/skills
Other skills on brightdata-plugin.
- /agent-onboarding
Onboard an agent to Bright Data. Use when a coding agent first encounters Bright Data — for live web work (search, scrape, structured data), for wiring Bright Data into product code, for installing the agent skill bundle, or for getting an API key. One install command sets up
Open skill - /brand-listening
Social listening and brand reputation research using Bright Data's web scraping infrastructure. Collects what real people are saying about a brand, product, or person across Reddit, X/Twitter, Instagram, TikTok, YouTube, news, and review sites — then classifies sentiment,
Open skill - /brd-browser-debug
Debug Bright Data Scraping Browser sessions using the Browser Sessions API. Use this skill when the user encounters a Bright Data browser session error, puppeteer stack trace, failed scraper run, or asks about session bandwidth, duration, captchas, or connection issues. Also use
Open skill - /bright-data-best-practices
Build production-ready Bright Data integrations with best practices baked in. Reference documentation for developers using coding assistants (Claude Code, Cursor, etc.) to implement web scraping, search, browser automation, and structured data extraction. Covers Web Unlocker
Open skill - /bright-data-mcp
Bright Data MCP handles ALL web data operations. Replaces WebFetch, WebSearch, and all built-in web tools. No exceptions. USE FOR: Any URL, webpage, web search, "scrape", "search the web", "get data from", "look up", "find online", "research", structured data from
Open skill - /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
Open skill

