You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h3align="center">A Python SDK for the Bright Data's Data extraction and Web unlocking tools, providing easy-to-use scalable methods for web scraping, web searches and more.</h3>
5
-
6
-
7
-
For a quick start you can try to run our example files in this repositories under the "Codespace" section.
4
+
```python
5
+
pip install brightdata-sdk
6
+
```
7
+
<h3align="center">Python SDK by Bright Data, providing easy-to-use scalable methods for web search & scraping</h3>
8
+
<p></p>
8
9
9
10
## Features
10
11
@@ -18,58 +19,37 @@ For a quick start you can try to run our example files in this repositories unde
18
19
19
20
## Installation
20
21
To install the package, open your terminal:
21
-
> [!NOTE]
22
-
> If you are using macOS you will need to open a virtual environment for your project first.
23
22
24
-
```bash
23
+
```python
25
24
pip install brightdata-sdk
26
25
```
26
+
> If using macOS, first open a virtual environment for your project
27
27
28
28
## Quick Start
29
29
30
+
Create a [Bright Data](https://brightdata.com/) account and copy your API key
31
+
30
32
### 1. Initialize the Client
31
-
> [!IMPORTANT]
32
-
> Go to your [**account settings**](https://brightdata.com/cp/setting/users), to verify that your API key have **"admin permissions"**.
33
33
34
34
```python
35
35
from brightdata import bdclient
36
36
37
37
client = bdclient(api_token="your_api_token_here") # can also be defined as BRIGHTDATA_API_TOKEN in your .env file
38
38
```
39
39
40
-
Or you can use a custom zone name
40
+
Or you can configure a custom zone name
41
+
41
42
```python
42
43
client = bdclient(
43
44
api_token="your_token",
44
45
auto_create_zones=False, # Else it creates the Zone automatically
45
-
web_unlocker_zone="custom_zone",# Custom zone name for web scraping
46
-
serp_zone="custom_serp_zone"# Custom zone name for search requests
46
+
web_unlocker_zone="custom_zone",
47
+
serp_zone="custom_serp_zone"
47
48
)
48
-
```
49
-
> [!TIP]
50
-
> Hover over the "bdclient" (or over each function in the package) with your cursor to see all its available parameters.
The SDK includes built-in input validation and retry logic
210
+
211
+
In case of zone related problems, use the **list_zones()** function to check your active zones, and check that your [**account settings**](https://brightdata.com/cp/setting/users), to verify that your API key have **"admin permissions"**.
0 commit comments