Overview
Integration details
Class | Package | Serializable | JS support | Version |
---|---|---|---|---|
BrightDataWebScraperAPI | langchain-brightdata | ✅ | ❌ |
Tool features
Native async | Returns artifact | Return data | Pricing |
---|---|---|---|
❌ | ❌ | Structured data from websites (Amazon products, LinkedIn profiles, etc.) | Requires Bright Data account |
Setup
The integration lives in thelangchain-brightdata
package.
Instantiation
Here we show how to instantiate an instance of the BrightDataWebScraperAPI tool. This tool allows you to extract structured data from various websites including Amazon product details, LinkedIn profiles, and more using Bright Data’s Dataset API. The tool accepts various parameters during instantiation:bright_data_api_key
(required, str): Your Bright Data API key for authentication.dataset_mapping
(optional, Dict[str, str]): A dictionary mapping dataset types to their corresponding Bright Data dataset IDs. The default mapping includes:- “amazon_product”: “gd_l7q7dkf244hwjntr0”
- “amazon_product_reviews”: “gd_le8e811kzy4ggddlq”
- “linkedin_person_profile”: “gd_l1viktl72bvl7bjuj0”
- “linkedin_company_profile”: “gd_l1vikfnt1wgvvqz95w”
Invocation
Basic Usage
Advanced Usage with Parameters
Customization Options
The BrightDataWebScraperAPI tool accepts several parameters for customization:Parameter | Type | Description |
---|---|---|
url | str | The URL to extract data from |
dataset_type | str | Type of dataset to use (e.g., “amazon_product”) |
zipcode | str | Optional zipcode for location-specific data |
Available Dataset Types
The tool supports the following dataset types for structured data extraction:Dataset Type | Description |
---|---|
amazon_product | Extract detailed Amazon product data |
amazon_product_reviews | Extract Amazon product reviews |
linkedin_person_profile | Extract LinkedIn person profile data |
linkedin_company_profile | Extract LinkedIn company profile data |