Skip to main content

An unofficial Python client for Bright Data APIs.

Project description

BDClient

An unofficial Python client for Bright Data APIs.

Features:

  • Scraper API
    • Google News
    • Google SERP
    • YouTube Videos
  • SERP API
    • Google Search
  • Unlocker API

Installation

Installing using pip:

pip install bdclient

Installing using uv:

uv add bdclient

Usage

Example Scraper API usage:

import asyncio

from bdclient.scraper.youtube_videos import DiscoverByKeyword, DiscoverByKeywordQuery


async def main():
    scraper = DiscoverByKeyword(api_key="your_bright_data_api_key")
    query = DiscoverByKeywordQuery(keyword="How to make pizza")

    results = await scraper.scrape([query])
    for result in results:
        print(result.model_dump_json(indent=4))


if __name__ == "__main__":
    asyncio.run(main())

Example SERP API usage:

import asyncio

from bdclient.serp.google_search import GoogleSearch


async def main():
    google_search = GoogleSearch(
        api_key="your_bright_data_api_key",
        zone="your_serp_zone",
    )
    result = await google_search.search(keyword="Pizza toppings")
    print(result)


if __name__ == "__main__":
    asyncio.run(main())

Example Unlocker API usage:

import asyncio

from bdclient.unlocker import Unlocker


async def main():
    unlocker = Unlocker(
        api_key="your_bright_data_api_key",
        zone="your_unlocker_zone",
    )

    result = await unlocker.unlock("https://www.bbc.com/news/articles/c8ex2l58en4o")
    print(result)


if __name__ == "__main__":
    asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bdclient-0.4.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bdclient-0.4.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file bdclient-0.4.1.tar.gz.

File metadata

  • Download URL: bdclient-0.4.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.1

File hashes

Hashes for bdclient-0.4.1.tar.gz
Algorithm Hash digest
SHA256 983849aaa9818955ab74c5c0a2af59b6b7dddb52a72cc2dda8639ba02965c22a
MD5 0e9451852f63627f8eefeb6408103c6e
BLAKE2b-256 d3c1810be22b5a97464d6341f601e9f42e45653c63adb79d5afe93f887496c58

See more details on using hashes here.

File details

Details for the file bdclient-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: bdclient-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.1

File hashes

Hashes for bdclient-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b5adf16d466de13f240eae288719187150e047b4aaef2cdf16fd4e7c2e8d752
MD5 84708b782004169715569e25a754dde5
BLAKE2b-256 ad72697155558c08064425a7136b0f2b2caf7a2da64981fb0e0dbca2949c90df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page