Why Use Bright Data With Smolagents?
The Bright Data tools for Smolagents provide the following capabilities:Web Search
Web Search
search_tool
Search Google and get structured search results. This tool can search the web and return relevant results for your queries.
Extract
Extract
extract_tool
Scrape webpages and extract content as Markdown format. This tool can bypass CAPTCHA and bot detection to reliably extract data from any website.
Structured Data Feeds
Structured Data Feeds
data_feeds_tool
Retrieve structured data from various platforms including LinkedIn, Amazon, Instagram, Facebook, X (Twitter), Zillow, and more.
- 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)
- And many more
How to Integrate Bright Data With Smolagents?
1
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.
2
Installation
Install the required packages. Important: As of December 9, 2025, these specific versions are mandatory to align with Smolagents:
3
Configure API Key
Set your Bright Data API key as an environment variable:Or set it in your Python code:
4
Obtain Your Hugging Face API Token
When using Or pass it directly when initializing the model:Note: Free Hugging Face accounts include inference credits. Upgrade to PRO for higher rate limits.
InferenceClientModel, you need a Hugging Face token for authentication:- Visit Hugging Face Settings - Tokens
- Create a new token with “Make calls to the serverless Inference API” permission
- Set it as an environment variable:
5
Usage
Here’s a complete example of how to use Bright Data tools with Smolagents:
Example Use Cases
Web Research
Web Research
Use the search tool to find information across the web:
Data Extraction
Data Extraction
Scrape and extract content from websites:
Competitor Analysis
Competitor Analysis
Extract structured data from e-commerce platforms:
Social Media Intelligence
Social Media Intelligence
Tips for Best Results
- Be specific with your prompts to help the agent understand exactly what data you need
- Combine tools for complex tasks - the agent can use search, extract, and data feeds together