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

# You.com

> Search the web from your Agno agents with the You.com Search API.

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

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

# Example 1: Default search agent
agent = Agent(
    tools=[YouTools(show_results=True)],
    markdown=True,
)

# Example 2: Search with a domain allowlist and a larger result count
agent_filtered = Agent(
    tools=[
        YouTools(
            include_domains=["cnbc.com", "reuters.com", "bloomberg.com"],
            num_results=8,
            show_results=True,
        )
    ],
    markdown=True,
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    agent.print_response("Search for the latest AAPL news", markdown=True)

    agent_filtered.print_response(
        "What did major financial outlets say about NVDA earnings this week?",
        markdown=True,
    )
```

## Run the Example

```bash theme={null}
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/91_tools

# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate

export YDC_API_KEY=***

python youcom_tools.py
```

For details, see the [You.com cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/youcom_tools.py).
