Skip to content

Commit 67722a1

Browse files
authored
Update README.md
1 parent 26be454 commit 67722a1

File tree

1 file changed

+37
-32
lines changed

1 file changed

+37
-32
lines changed

README.md

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
<h3 align="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>
55

6-
7-
For a quick start you can try to run our example files in this repositories under the "Codespace" section.
6+
For a quick start run this repo's example files "Codespace" section.
87

98
## Features
109

@@ -18,58 +17,37 @@ For a quick start you can try to run our example files in this repositories unde
1817

1918
## Installation
2019
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.
2320

24-
```bash
21+
```python
2522
pip install brightdata-sdk
23+
# If using macOS, first open a virtual environment for your project.
2624
```
2725

2826
## Quick Start
2927

28+
Create a [Bright Data](https://brightdata.com/) account and copy your API key
29+
3030
### 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"**.
3331

3432
```python
3533
from brightdata import bdclient
3634

3735
client = bdclient(api_token="your_api_token_here") # can also be defined as BRIGHTDATA_API_TOKEN in your .env file
3836
```
3937

40-
Or you can use a custom zone name
38+
Or you can configure a custom zone name
39+
4140
```python
4241
client = bdclient(
4342
api_token="your_token",
4443
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
44+
web_unlocker_zone="custom_zone",
45+
serp_zone="custom_serp_zone"
4746
)
48-
```
49-
> [!TIP]
50-
> Hover over the "bdclient" (or over each function in the package) with your cursor to see all its available parameters.
51-
5247

53-
### 2. Scrape Websites
54-
55-
```python
56-
# Single URL
57-
result = client.scrape("https://example.com")
58-
59-
# Multiple URLs (parallel processing)
60-
urls = ["https://example1.com", "https://example2.com", "https://example3.com"]
61-
results = client.scrape(urls)
62-
63-
# Custom options
64-
result = client.scrape(
65-
"https://example.com",
66-
format="raw",
67-
country="gb",
68-
data_format="screenshot"
69-
)
7048
```
7149

72-
### 3. Search Engine Results
50+
### 2. Search Engine Results
7351

7452
```python
7553
# Single search query
@@ -90,6 +68,30 @@ results = client.search(
9068
)
9169
```
9270

71+
> [!TIP]
72+
> Hover over the "search" or each function in the package, to see all its available parameters.
73+
74+
![Hover-Over1](https://github.com/user-attachments/assets/51324485-5769-48d5-8f13-0b534385142e)
75+
76+
### 3. Scrape Websites
77+
78+
```python
79+
# Single URL
80+
result = client.scrape("https://example.com")
81+
82+
# Multiple URLs (parallel processing)
83+
urls = ["https://example1.com", "https://example2.com", "https://example3.com"]
84+
results = client.scrape(urls)
85+
86+
# Custom options
87+
result = client.scrape(
88+
"https://example.com",
89+
format="raw",
90+
country="gb",
91+
data_format="screenshot"
92+
)
93+
```
94+
9395
### 4. Download Content
9496

9597
```python
@@ -216,6 +218,9 @@ cd bright-data-sdk-python
216218
pip install .
217219
```
218220

221+
> [!IMPORTANT]
222+
> Go to your [**account settings**](https://brightdata.com/cp/setting/users), to verify that your API key have **"admin permissions"**.
223+
219224
## License
220225

221226
This project is licensed under the MIT License.

0 commit comments

Comments
 (0)