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

# You.com

> Search the web with YouTools using domain filters, livecrawl, and structured You.com results.

`YouTools` searches the You.com Search API and returns JSON or markdown 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,
        )
    ],
    markdown=True,
)

agent.print_response("Search for the latest AAPL news")
```

## Setup

```shell theme={null}
uv pip install -U agno openai
export YDC_API_KEY=***
```

`YDC_BASE_URL` overrides the default `https://ydc-index.io` endpoint.

## Toolkit Function

| Function     | Parameters                                        | Description                                                               |
| ------------ | ------------------------------------------------- | ------------------------------------------------------------------------- |
| `you_search` | `query: str`, `num_results: Optional[int] = None` | Search the web. `num_results` overrides the toolkit default for one call. |

## Toolkit Parameters

| Parameter           | Type                                      | Default      | Description                                                                                      |
| ------------------- | ----------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------ |
| `api_key`           | `Optional[str]`                           | `None`       | You.com API key. Falls back to `YDC_API_KEY`.                                                    |
| `base_url`          | `Optional[str]`                           | `None`       | API base URL. Falls back to `YDC_BASE_URL`, then `https://ydc-index.io`.                         |
| `num_results`       | `int`                                     | `5`          | Default result count.                                                                            |
| `livecrawl`         | `Optional[Literal["web", "news", "all"]]` | `None`       | Enable livecrawl for the selected source.                                                        |
| `livecrawl_formats` | `Union[str, List[str]]`                   | `"markdown"` | Livecrawl content formats. Strings may be comma-separated.                                       |
| `text_length_limit` | `int`                                     | `1000`       | Maximum livecrawled text length per result.                                                      |
| `include_domains`   | `Optional[List[str]]`                     | `None`       | Restrict results to these domains. Cannot be combined with `exclude_domains` or `boost_domains`. |
| `exclude_domains`   | `Optional[List[str]]`                     | `None`       | Exclude these domains.                                                                           |
| `country`           | `Optional[str]`                           | `None`       | Country code for the search focus.                                                               |
| `freshness`         | `Optional[str]`                           | `None`       | Result freshness, such as `day`, `week`, `month`, or `year`.                                     |
| `language`          | `Optional[str]`                           | `None`       | Result language in BCP 47 format.                                                                |
| `safesearch`        | `Optional[str]`                           | `None`       | Content filter: `off`, `moderate`, or `strict`.                                                  |
| `offset`            | `Optional[int]`                           | `None`       | Pagination offset from `0` through `9`.                                                          |
| `boost_domains`     | `Optional[List[str]]`                     | `None`       | Boost these domains without restricting results. Cannot be combined with `include_domains`.      |
| `crawl_timeout`     | `int`                                     | `10`         | Livecrawl timeout from 1 through 60 seconds.                                                     |
| `search_params`     | `Optional[Dict[str, Any]]`                | `None`       | Additional query parameters. These values override the parameters above.                         |
| `timeout`           | `int`                                     | `30`         | HTTP request timeout in seconds.                                                                 |
| `format`            | `Literal["json", "markdown"]`             | `"json"`     | Result format.                                                                                   |
| `show_results`      | `bool`                                    | `False`      | Log the formatted result.                                                                        |

You.com also provides an MCP profile at `https://api.you.com/mcp?profile=free`. Use it with [MCPTools](/tools/mcp/overview) when you want the hosted `you-search` MCP tool.

## Developer Resources

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