How to Set Up Bright Data With LlamaIndex
This tool connects to Bright Data to enable your agent to crawl websites, search the web, and access structured data from platforms like LinkedIn, Amazon, and social media.
Bright Data’s tools provide robust web scraping capabilities with built-in CAPTCHA solving and bot detection avoidance, allowing you to reliably extract data from the web.
Why Use Bright Data With LlamaIndex?
The Bright Data tool provides the following capabilities:
Web Scraping
Web Scraping
scrape_as_markdown
Scrape a webpage and convert the content to Markdown format. This tool can bypass CAPTCHA and bot detection.
Visual Capture
Visual Capture
get_screenshot
Take a screenshot of a webpage and save it to a file.
Search Engine Access
Search Engine Access
search_engine
Search Google, Bing, or Yandex and get structured search results as JSON or Markdown. Supports advanced parameters for more specific searches.
Structured Web Data Extraction
Structured Web Data Extraction
web_data_feed
Retrieve structured data from various platforms including LinkedIn, Amazon, Instagram, Facebook, X (Twitter), Zillow, and more.
Advanced Configuration
Advanced Configuration
The Bright Data tool offers various configuration options for specialized use cases:
Search Engine Parameters
The search_engine
function supports advanced parameters like:
- Language targeting (
language
parameter) - Country-specific search (
country_code
parameter) - Different search types (images, shopping, news, etc.)
- Pagination controls
- Mobile device emulation
- Geolocation targeting
- Hotel search parameters
Supported Web Data Sources
The web_data_feed
function supports retrieving structured data from:
- LinkedIn (profiles and companies)
- Amazon (products and reviews)
- Instagram (profiles, posts, reels, comments)
- Facebook (posts, marketplace listings, company reviews)
- X/Twitter (posts)
- Zillow (property listings)
- Booking.com (hotel listings)
- YouTube (videos)
- ZoomInfo (company profiles)
For more information, visit the Bright Data documentation.
How to Integrate Bright Data With LlamaIndex?
Obtain Your Bright Data API Key
- Log in to your Bright Data dashboard.
- Go to Account Settings.
- Generate an API key if you haven’t already done so.
Installation
Install the required packages:
Usage
Here’s an example of how to use the BrightDataToolSpec with LlamaIndex: