Skip to main content

You.com Search

Get API Key (optional, for higher rate limits): https://you.com/docs

You.com offers two tiers:

ModeEndpointAuthLimits
Keyless free tier (default)https://api.you.com/v1/agents/searchnoneIP-throttled, ~100 queries/day
Keyed tierhttps://ydc-index.io/v1/searchX-API-Keyhigher rate limits

If YOUCOM_API_KEY is not set, the adapter automatically uses the keyless endpoint — no signup required to start.

LiteLLM Python SDK​

Keyless (zero config)​

You.com Search - keyless
from litellm import search

response = search(
query="latest AI developments",
search_provider="you_com",
max_results=5
)

for result in response.results:
print(f"{result.title}: {result.url}")
print(f"Snippet: {result.snippet}\n")

With API key (higher limits)​

You.com Search - keyed
import os
from litellm import search

os.environ["YOUCOM_API_KEY"] = "sk-..."

response = search(
query="latest AI developments",
search_provider="you_com",
max_results=5
)

LiteLLM AI Gateway​

1. Setup config.yaml​

config.yaml
model_list:
- model_name: gpt-4
litellm_params:
model: gpt-4
api_key: os.environ/OPENAI_API_KEY

search_tools:
- search_tool_name: you-com-search
litellm_params:
search_provider: you_com
# api_key optional - omit to use the keyless free tier
api_key: os.environ/YOUCOM_API_KEY

2. Start the proxy​

litellm --config /path/to/config.yaml

# RUNNING on http://0.0.0.0:4000

3. Test the search endpoint​

Test Request
curl http://0.0.0.0:4000/v1/search/you-com-search \
-H "Authorization: Bearer sk-1234" \
-H "Content-Type: application/json" \
-d '{
"query": "latest AI developments",
"max_results": 5
}'

Unified Parameters​

You.com supports the standard Perplexity unified spec parameters:

You.com Search with unified parameters
from litellm import search

response = search(
query="machine learning research",
search_provider="you_com",
max_results=10, # -> count
search_domain_filter=["arxiv.org"], # -> include_domains
country="US" # -> country (lowercased)
)
Unified spec parameterMapped to You.com parameter
max_resultscount
search_domain_filterinclude_domains
countrycountry (lowercased)
max_tokens_per_pageignored (no equivalent)

Provider-specific Parameters​

You can pass any You.com-specific parameter as a keyword argument; unrecognized parameters are forwarded to the upstream request body:

You.com Search with provider-specific parameters
from litellm import search

response = search(
query="AI breakthroughs",
search_provider="you_com",
# You.com-specific parameters (passed through verbatim)
freshness="week", # 'day', 'week', 'month', 'year', or date range
exclude_domains=["example.com"],
language="en"
)

Response Notes​

You.com's API returns results split into web and news arrays. The LiteLLM adapter flattens both into a single ordered results list (web first, then news) so the response matches the unified SearchResponse shape.

For each result:

  • snippet prefers the first entry of the upstream snippets array; falls back to description.
  • date is populated from upstream page_age (ISO 8601 datetime).