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.2.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bdclient-0.4.2.tar.gz.
File metadata
- Download URL: bdclient-0.4.2.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45d15d2b9f829de1b6875f424aba8a157a21c725e2b93195c55e3cceacfa1457
|
|
| MD5 |
0e2847a46d2fa2288ea698b17e26d539
|
|
| BLAKE2b-256 |
32cc285125037e1eb4b0da01c144cbaf8dfe790caa2325e3ac7bce25b58f170c
|
File details
Details for the file bdclient-0.4.2-py3-none-any.whl.
File metadata
- Download URL: bdclient-0.4.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bb52401cf6952161198c410ab0a7d2954a307e63844263443687bd3527ec8a5
|
|
| MD5 |
de6d66acc335929084689d57d48445c1
|
|
| BLAKE2b-256 |
239edf28f7a18f02ee5e96f5f130293f14631e9a9639bc6dd8a8dc22e9d56720
|