BrightData
BrightDataTools enable an Agent to scrape webpages as markdown, capture screenshots, run search engine queries, and pull structured data feeds from LinkedIn, Amazon, Instagram, and more.
BrightDataTools provide comprehensive web scraping capabilities including markdown conversion, screenshots, search engine results, and structured data feeds from various platforms like LinkedIn, Amazon, Instagram, and more.
Prerequisites
The following examples require the requests library:
uv pip install -U agno requests openaiYou'll also need a BrightData API key. Set the BRIGHT_DATA_API_KEY environment variable:
export BRIGHT_DATA_API_KEY="YOUR_BRIGHTDATA_API_KEY"Use the names of existing Web Unlocker and SERP zones in your Bright Data account. The default names and environment variables do not create zones:
export BRIGHT_DATA_WEB_UNLOCKER_ZONE="your_web_unlocker_zone"
export BRIGHT_DATA_SERP_ZONE="your_serp_zone"Example
Scrape a webpage and return its content as Markdown:
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.tools.brightdata import BrightDataTools
agent = Agent(
model=OpenAIResponses(id="gpt-5.2"),
tools=[
BrightDataTools(
enable_screenshot=False,
)
],
markdown=True,
)
# Example 1: Scrape a webpage as Markdown
agent.print_response(
"Scrape this webpage as markdown: https://docs.agno.com/introduction",
)Toolkit Params
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | Optional[str] | None | BrightData API key. If not provided, uses BRIGHT_DATA_API_KEY environment variable. |
enable_scrape_markdown | bool | True | Enable the scrape_as_markdown function. |
enable_screenshot | bool | True | Enable the get_screenshot function. |
enable_search_engine | bool | True | Enable the search_engine function. |
enable_web_data_feed | bool | True | Enable the web_data_feed function. |
all | bool | False | Enable all available functions. When True, all enable flags are ignored. |
serp_zone | str | "serp_api" | SERP zone for search operations. Can be overridden with BRIGHT_DATA_SERP_ZONE environment variable. |
web_unlocker_zone | str | "web_unlocker1" | Web unlocker zone for scraping operations. Can be overridden with BRIGHT_DATA_WEB_UNLOCKER_ZONE environment variable. |
verbose | bool | False | Enable verbose logging. |
timeout | int | 600 | Timeout in seconds for operations. |
Toolkit Functions
| Function | Description |
|---|---|
scrape_as_markdown | Scrapes a webpage and returns content in Markdown format. Parameters: url (str) - URL to scrape. |
get_screenshot | Captures a screenshot of a webpage and adds it as an image artifact. Parameters: url (str) - URL to screenshot. The toolkit has no output_path parameter. |
search_engine | Searches using Google, Bing, or Yandex and returns results in Markdown. Parameters: query (str), engine (str, default: "google"), num_results (int, default: 10), language (Optional[str]), country_code (Optional[str]). |
web_data_feed | Retrieves structured data from various sources like LinkedIn, Amazon, Instagram, etc. Parameters: source_type (str), url (str), num_of_reviews (Optional[int]). |
Current adapter limitations
get_screenshot stores base64 text where the image artifact expects PNG bytes, so it produces an invalid image artifact. The example disables screenshots until this is corrected upstream.
The youtube_videos data-feed mapping currently points to the Booking.com dataset. Use a direct request to the YouTube Videos dataset for that feed.
num_results, language, and country_code are applied only to Google queries by this adapter, not Bing or Yandex.
Supported Data Sources
E-commerce
amazon_product- Amazon product detailsamazon_product_reviews- Amazon product reviewsamazon_product_search- Amazon product search resultswalmart_product- Walmart product detailswalmart_seller- Walmart seller informationebay_product- eBay product detailshomedepot_products- Home Depot productszara_products- Zara productsetsy_products- Etsy productsbestbuy_products- Best Buy products
Professional Networks
linkedin_person_profile- LinkedIn person profileslinkedin_company_profile- LinkedIn company profileslinkedin_job_listings- LinkedIn job listingslinkedin_posts- LinkedIn postslinkedin_people_search- LinkedIn people search results
Social Media
instagram_profiles- Instagram profilesinstagram_posts- Instagram postsinstagram_reels- Instagram reelsinstagram_comments- Instagram commentsfacebook_posts- Facebook postsfacebook_marketplace_listings- Facebook Marketplace listingsfacebook_company_reviews- Facebook company reviewsfacebook_events- Facebook eventstiktok_profiles- TikTok profilestiktok_posts- TikTok poststiktok_shop- TikTok shoptiktok_comments- TikTok commentsx_posts- X (Twitter) posts
Other Platforms
google_maps_reviews- Google Maps reviewsgoogle_shopping- Google Shopping resultsgoogle_play_store- Google Play Store appsapple_app_store- Apple App Store appsyoutube_profiles- YouTube profilesyoutube_videos- Currently mapped incorrectly; see the adapter limitation aboveyoutube_comments- YouTube commentsreddit_posts- Reddit postszillow_properties_listing- Zillow property listingsbooking_hotel_listings- Booking.com hotel listingscrunchbase_company- Crunchbase company datazoominfo_company_profile- ZoomInfo company profilesreuter_news- Reuters newsgithub_repository_file- GitHub repository filesyahoo_finance_business- Yahoo Finance business data