Skip to navigation

Quickstart

View as MarkdownOpen in Claude

You.com gives you real-time web intelligence through five APIs—Web Search, Answer, Extract, Research, and Finance Research—plus the Inference Router for leading open-weight models grounded in real-time web search. Two ways to get started—write code, or connect your agent.

Give Your Agent Access

Four ways to give your agent access, from zero setup to installed skills. Build With Agents compares them and maps each job to an API.

Append .md to any page URL to get that page as Markdown, such as you.com/docs/quickstart.md. you.com/docs/llms.txt indexes the full site, and each section has its own index, such as you.com/docs/api-reference/llms.txt.


The six APIs:

  • Web Search API—real-time web and news results as LLM-ready JSON
  • Inference Router API—leading open-weight models through one API, grounded in real-time web search
  • Answer API—a cited, synthesized answer from a single query
  • Extract API—fetches any webpage or PDF and parses into clean Markdown or HTML
  • Research API—multi-step, cited answers to complex questions
  • Finance Research API—cited answers from a finance-optimized index

Choose the Right API compares job fit, latency, and price for every API.


1

Get Your API Key

Sign in or create an account, then get an API key here: https://you.com/platform. New accounts get $10 in free API credit at signup, plus $90 more when you verify your account. No credit card required.

The code samples below read your key from an environment variable named YDC_API_KEY—the canonical variable name across our docs, SDKs, and integrations. Set it once (export YDC_API_KEY="your-key") and the examples will pick it up. See API key management for best practices.

Each API has its own endpoint. Every request sends your API key in the X-API-Key header, except Inference Router requests, which send it as Authorization: Bearer.

APIEndpointGuideAPI reference
Web Search APIPOST https://ydc-index.io/v1/search (also GET)Overview/v1/search
Inference Router APIPOST https://api.you.com/v1/chat/completions (OpenAI-compatible) and POST https://api.you.com/v1/messages (Anthropic-compatible)Overview/v1/chat/completions
Extract APIPOST https://ydc-index.io/v1/extractOverview/v1/extract
Answer APIPOST https://api.you.com/v1/answerOverview/v1/answer
Research APIPOST https://api.you.com/v1/researchOverview/v1/research
Finance Research APIPOST https://api.you.com/v1/finance_researchOverview/v1/finance_research

The Inference Router, Answer, Research, and Finance Research APIs run only on api.you.com. Sending one of those paths to ydc-index.io returns 403 with {"message": "Missing Authentication Token"}, even when the key is valid.

2

Try the Web Search API

The Web Search API returns real-time web and news results as structured, LLM-ready JSON. Feed the results directly into your prompt to ground your AI in fresh information.

from youdotcom import You
with You() as you:
results = you.search(query="global birth rate trends", count=5)
for result in results.results.web:
print(result.title)
print(result.url)
highlights = result.contents.highlights if result.contents else None
if highlights:
print(highlights[0])

The Python sample follows the SDK default and prints contents.highlights. The TypeScript and curl calls omit extraction, so raw POST /v1/search returns snippets. you.search() in the Python SDK 3.6.0 and later sends knowledge="core" and extraction={"extraction_mode": "highlights"} when you pass neither argument, and snippets is None. Knowledge adds no extra charge. See Billing.

Pass both arguments as None for snippets:

results = you.search(
query="global birth rate trends",
count=5,
knowledge=None,
extraction=None,
)

Highlights accepts count up to 50. The SDK default uses highlights, so a count above 50 needs extraction=None or extraction_mode set to full_page.

A raw POST /v1/search call returns JSON like this:

{
"results": {
"web": [
{
"url": "https://www.worldbank.org/en/topic/population",
"title": "Population | World Bank",
"description": "The World Bank tracks global birth rate and population trends.",
"snippets": [
"Global fertility rates have declined significantly over the past five decades, falling from an average of 5 births per woman in 1960 to around 2.3 today."
],
"page_age": "2025-10-01T00:00:00",
"favicon_url": "https://ydc-index.io/favicon?domain=worldbank.org&size=128"
}
]
},
"metadata": {
"query": "global birth rate trends",
"search_uuid": "a1b2c3d4-0000-0000-0000-000000000000",
"latency": 0.38
}
}
TypeScript, MCP, or the Python SDK

TypeScript and JavaScript have three paths. Use fetch against the REST APIs when the application needs the JSON. Use @youdotcom-oss/mcp, or the hosted server at https://api.you.com/mcp, when an agent should call the tools. Use the Python SDK when you want a typed client that tracks new API fields. The @youdotcom-oss/sdk package is deprecated.

Ground a Model with Highlights

Snippets are the HTTP default. Raw POST /v1/search returns them when the body omits extraction. The Python SDK 3.6.0 and later defaults to highlights and knowledge="core", so you.search() returns contents.highlights and snippets is None. Pass knowledge=None and