This guide shows how to install the Bright Data JavaScript SDK, scrape URLs, run searches, call platform-specific scrapers (LinkedIn, Amazon, Instagram, and more), and connect to the Browser API and Scraper Studio from Node.js.Documentation Index
Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
Use this file to discover all available pages before exploring further.
Install the package
Open the terminal and run:Launch scrapes and web searches
Platform scrapers and datasets
Collect data from popular platforms by URL, or discover content by parameters.Discover API
Search the web and get AI-ranked results in one call, or trigger and poll manually.Scraper Studio
Run your custom Scraper Studio collectors from the SDK.Browser API
Connect Playwright to Bright Data’s cloud browser.Datasets API
Query and download from any of the 126+ Bright Data datasets.Client and method parameters
Client
Add client parameters
Client
Add client parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
apiKey | string | Your API key (or BRIGHTDATA_API_KEY env var) | . |
autoCreateZones | boolean | Auto-create zones if they do not exist | true |
webUnlockerZone | string | Custom Web Unlocker zone name | . |
serpZone | string | Custom SERP zone name | . |
browserUsername | string | Browser API username (or BRIGHTDATA_BROWSERAPI_USERNAME env var) | . |
browserPassword | string | Browser API password (or BRIGHTDATA_BROWSERAPI_PASSWORD env var) | . |
logLevel | string | Log level | 'INFO' |
structuredLogging | boolean | Use structured JSON logging | true |
verbose | boolean | Enable verbose logging | false |
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.
| 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 advanced logging
Logging
Enable advanced logging
Enable
VERBOSE in the Client for advanced logging (see Client parameters). Use the listZones() function to check available zones.Authentication
Bright Data Auth
Authentication
Bright Data Auth
Create a Bright Data account and copy your API key. Go to account settings and make sure your API key has admin permissions.
Resources
GitHub
Visit the Bright Data SDK GitHub repository