Oxylabs
OxylabsTools provide Agents with access to Oxylabs' powerful web scraping capabilities, including SERP, Amazon product data, and universal web scraping endpoints.
Prerequisites
The following examples require the oxylabs-sdk library:
1uv pip install -U oxylabs-sdkSet your credentials as environment variables (recommended):
1export OXYLABS_USERNAME=your_oxylabs_username2export OXYLABS_PASSWORD=your_oxylabs_passwordExample
1from kern.agent import Agent2from kern.tools.oxylabs import OxylabsTools34agent = Agent(5 tools=[OxylabsTools()],6 markdown=True,7 )89agent.print_response("""10Search for 'latest iPhone reviews' and provide a summary of the top 3 results.11""")Amazon Product Search
1from kern.agent import Agent2from kern.tools.oxylabs import OxylabsTools34agent = Agent(5 tools=[OxylabsTools()],6 markdown=True,7 )89agent.print_response(10 "Let's search for an Amazon product with ASIN code 'B07FZ8S74R' ",11 )Toolkit Params
| Parameter | Type | Default | Description |
|---|---|---|---|
username | str | None | Oxylabs dashboard username. If not provided, it defaults to OXYLABS_USERNAME env var. |
password | str | None | Oxylabs dashboard password. If not provided, it defaults to OXYLABS_PASSWORD env var. |
Toolkit Functions
| Function | Description |
|---|---|
search_google | Performs a Google SERP search. Accepts all the standard Oxylabs params (e.g. query, geo_location). |
get_amazon_product | Retrieves the details of Amazon product(s). Accepts ASIN code or full product URL. |
search_amazon_products | Searches for Amazon product(s) using a search term. |
scrape_website | Scrapes a webpage URL. |
Developer Resources
- View Tools