Install the package
Open the terminal and run:Launch scrapes and web searches
Try these examples to use Bright Data’s SDK functions from your IDEClient
Add Client parameters
Client
Add Client parameters
Search
Add advanced search parameters
Search
Add advanced search parameters
Search the web using the SERP API
Name | Type | Description | Default | ||
---|---|---|---|---|---|
query | `string | string[]` | Search query string or array of queries | — | |
options.searchEngine | `“google" | "bing" | "yandex”` | Search engine | "google" |
options.zone | string | Zone identifier (auto-configured if null) | — | ||
options.format | `“json" | "raw”` | Response format | "raw" | |
options.method | string | HTTP method | "GET" | ||
options.country | string | Two-letter country code | "" | ||
options.dataFormat | `“markdown" | "screenshot" | "html”` | Returned content format | "html" |
options.concurrency | number | Max parallel workers | 10 | ||
options.timeout | number (ms) | Request timeout | 30000 |
Scrape
Add advanced Scrape parameters
Scrape
Add advanced Scrape parameters
Scrape a single URL or list of URLs using the Web Unlocker API.
Name | Type | Description | Default | ||
---|---|---|---|---|---|
url | `string | string[]` | Single URL string or array of URLs | — | |
options.zone | string | Zone identifier (auto-configured if null) | — | ||
options.format | `“json" | "raw”` | Response format | "raw" | |
options.method | string | HTTP method | "GET" | ||
options.country | string | Two-letter country code | "" | ||
options.dataFormat | `“markdown" | "screenshot" | "html”` | Returned content format | "html" |
options.concurrency | number | Max parallel workers | 10 | ||
options.timeout | number (ms) | Request timeout | 30000 |
saveResults
Save content to local file.
saveResults
Save content to local file.
Parameters:
Name | Type | Description | Default | ||
---|---|---|---|---|---|
content | any | Content to save | — | ||
options.filename | string | Output filename (auto-generated if null) | — | ||
options.format | `“json" | "csv" | "txt”` | File format | — |
Error handling
Logging
Enable advence logging
Logging
Enable advence logging
Enable
VERBOSE
in the Client for advenced logging (see Client parameters) Use the listZones()
func to check available zonesAuthentication
Bright Data Auth
Authentication
Bright Data Auth
Create a Bright Data account and copy your API key Go to account settings, and make sure that your API key have admin permissions