> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Oxylabs

> OxylabsTools give an Agent access to Oxylabs' SERP, Amazon product, and universal web scraping APIs.

**OxylabsTools** provide Agents with access to Oxylabs' web scraping services, including SERP, Amazon product data, and universal web scraping endpoints.

## Prerequisites

The following examples require the `oxylabs` library:

```shell theme={null}
uv pip install -U oxylabs openai
```

Set your credentials as environment variables (recommended):

```shell theme={null}
export OXYLABS_USERNAME=your_oxylabs_username
export OXYLABS_PASSWORD=your_oxylabs_password
```

## Example

```python cookbook/91_tools/oxylabs_tools.py theme={null}
from agno.agent import Agent
from agno.tools.oxylabs import OxylabsTools

agent = Agent(
    tools=[OxylabsTools()],
    markdown=True,
)

agent.print_response(
    "Let's search for 'latest iPhone reviews' and provide a summary of the top 3 results."
)
```

## Amazon Product Search

```python theme={null}
from agno.agent import Agent
from agno.tools.oxylabs import OxylabsTools

agent = Agent(
    tools=[OxylabsTools()],
    markdown=True,
)

agent.print_response(
    "Let's search for an Amazon product with ASIN 'B07FZ8S74R'",
)
```

## Toolkit Params

| Parameter  | Type            | Default | Description                                                                             |
| ---------- | --------------- | ------- | --------------------------------------------------------------------------------------- |
| `username` | `Optional[str]` | `None`  | Oxylabs dashboard username. If not provided, it defaults to `OXYLABS_USERNAME` env var. |
| `password` | `Optional[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. Parameters: `query` (str), `domain_code` (str, default `"com"`).                                         |
| `get_amazon_product`     | Retrieves the details of an Amazon product. Parameters: `asin` (str, 10 alphanumeric characters), `domain_code` (str, default `"com"`). |
| `search_amazon_products` | Searches for Amazon product(s) using a search term. Parameters: `query` (str), `domain_code` (str, default `"com"`).                    |
| `scrape_website`         | Scrapes a webpage URL. Parameters: `url` (str), `render_javascript` (bool, default `False`).                                            |

## Developer Resources

* [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/oxylabs.py)
