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

# You.com

> Reference the Agno v2.7.2 YouTools adapter and use You.com's MCP endpoint for current search requests.

**YouTools** wraps the You.com Search API, but its Agno v2.7.2 response parser and livecrawl parameters target an older API contract.

> [!WARNING]
>
> Agno v2.7.2 expects a flat `results` list, while the current Search API returns results under `results.web` and `results.news`. The adapter therefore returns an empty result set after a successful request. Its non-default livecrawl values and string-form `livecrawl_formats` also differ from the current API. Use You.com's MCP endpoint below or call the [current Search API](https://you.com/docs/api-reference/search/v1-search.md) directly until the adapter is updated.

## Prerequisites

YouTools uses the `httpx` client already bundled with Agno. The source-reference example below runs on the default OpenAI model, so it needs the `openai` library and a You.com API key, available at [you.com/platform/api-keys](https://you.com/platform/api-keys).

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

```shell theme={null}
export YDC_API_KEY=***
# optional: override the default API endpoint (https://ydc-index.io)
export YDC_BASE_URL=***
```

For a working current integration, You.com hosts a free MCP profile at `https://api.you.com/mcp?profile=free` (`you-search`, 100 queries/day, no signup). Plug that URL into Agno's [MCPTools](https://agno-v2.mintlify.site/tools/mcp/overview.md).

## Example

The following source-reference agent shows the v2.7.2 toolkit configuration. It requires the parser and parameter updates described above before it can return current Search API results.

```python youcom_tools.py theme={null}
from agno.agent import Agent
from agno.tools.youcom import YouTools

agent = Agent(
    tools=[YouTools(
        include_domains=["cnbc.com", "reuters.com", "bloomberg.com"],
        num_results=8,
        show_results=True,
    )],
)
agent.print_response("Search for AAPL news", markdown=True)
```

## Toolkit Functions

| Function | Description |
| - | - |
| `you_search` | Search the web for a given query. Accepts `query` (str) and an optional `num_results` (int) to override the configured count. Returns results as JSON or markdown. |

## Toolkit Params

| Parameter | Type | Default | Description |
| - | - | - | - |
| `api_key` | `Optional[str]` | `None` | You.com API key. Falls back to the `YDC_API_KEY` environment variable. |
| `base_url` | `Optional[str]` | `None` | Override the API base URL. Falls back to `YDC_BASE_URL`, then `https://ydc-index.io`. |
| `num_results` | `int` | `5` | Default number of search results. |
| `livecrawl` | `Literal['always', 'fallback', 'never', 'web']` | `'web'` | Values exposed by the v2.7.2 adapter. The current API accepts `web`, `news`, or `all`; the other adapter values are stale. |
| `livecrawl_formats` | `str` | `'markdown'` | String value sent by the v2.7.2 adapter. The current API expects an array containing `html` and/or `markdown`. |
| `text_length_limit` | `int` | `1000` | Maximum length of text content per result. |
| `include_domains` | `Optional[List[str]]` | `None` | Restrict results to these domains. |
| `exclude_domains` | `Optional[List[str]]` | `None` | Exclude results from these domains. |
| `timeout` | `int` | `30` | Maximum time in seconds to wait for API responses. |
| `format` | `Literal['json', 'markdown']` | `'json'` | Output format for search results. |
| `show_results` | `bool` | `False` | Log responses for debugging. |

## Developer Resources

* [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/youcom.py)
* [Cookbook example](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/youcom_tools.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.