Skip to navigation

Simple Search

Your first API call in 2 minutes—fetch real-time web results in under 20 lines.

View as MarkdownOpen in Claude

If you’re new to the You.com API, this is the right place to begin. Before building RAG pipelines or research agents, you need to understand the foundation: the Search API. Send a query. Get back accurate web and news results.

The Search API gives you direct access to You.com’s search index—the same index that powers our Research API and our own search engine. You get titles, URLs, and descriptions for the most relevant pages on the web, fast. Then you decide what to do with them: filter them, rank them, display them in a UI, or feed them into a language model to synthesize an answer.

This example shows the simplest possible way to call it: a Python script and a small Next.js web app you can deploy to Vercel.


Try It Live

Run a real Search API request right here—no setup, no separate app to deploy. Open the Try It panel below, paste your API key, edit the query, and send it against the live endpoint.

POST
/v1/search
curl -X POST https://ydc-index.io/v1/search \
-H "X-API-Key: <apiKey>" \
-H "Content-Type: application/json" \
-d '{
"query": "What is the current state of quantum computing?",
"count": 10,
"extraction": {
"extraction_mode": "highlights"
}
}'
Response
{
"results": {
"web": [
{
"url": "https://arxiv.org/html/2602.15217v1",
"title": "Do we have a quantum computer? Expert perspectives on current status and future prospects",
"description": "",
"page_age": "2026-02-16T21:26:51",
"contents": {
"highlights": [
"# Do we have a quantum computer? Expert perspectives on current status and future prospects\n###### Abstract\nWhile experts agree that the current machines with physical qubits that are being built in the NISQ era should be called quantum computers, most estimated that it will take a decade to build a small fault-tolerant quantum computer, and several decades to achieve scalable systems capable of running Shor’s factoring algorithm with quantum advantage and some stated that they would find it exciting if some law of physics prevents achieving those ultimate goals.",
"## I Introduction\nThe current state of quantum computing is often characterized as the noisy intermediate-scale quantum (NISQ) era, a term coined by Preskill [96] to describe quantum processors that can perform certain computational tasks beyond the reach of classical computers but remain susceptible to decoherence and errors."
]
},
"favicon_url": "https://you.com/favicon?domain=arxiv.org&size=128"
},
{
"url": "https://hpcwire.com/2026/11/19/sc26-the-biggest-little-quantum-show-in-the-world",
"title": "HPCwire - Since 1987",
"description": "SC26 has broken all kinds of attendance records, with nearly 24,000 attendees piling into the McCormick Center in Chicago for the annual supercomputing extravaganza. AI is the big driver this week, but quantum isn’t far behind.",
"thumbnail_url": "https://www.hpcwire.com/wp-content/uploads/2026/01/sc26_300x300.png",
"page_age": "2026-11-20T00:23:19",
"contents": {
"highlights": [
"## SC26: The Biggest Little Quantum Show in the World\nSorensen’s update was mixed. While QC isn’t delivering computational benefits in production today, there are signs that we will see it soon. The number of players in the game and the amount of money funding them has never been higher.",
"Hyperion says the quantum computing market was worth $1.4 billion in 2025, and its forecast says QC will grow at a compound annual growth rate of about 30% to become a $3 billion business by 2028."
]
},
"favicon_url": "https://you.com/favicon?domain=hpcwire.com&size=128"
}
]
},
"metadata": {
"search_uuid": "f346c221-fb4c-44b2-9e78-e44df602cfab",
"query": "What is the current state of quantum computing?",
"latency": 0.604035671101883
}
}

What You’ll Build

The simplest possible example of the You.com Search API—pass a query, get back web results. No agents, no chaining, no extra dependencies. The unified endpoint returns title, URL, and description for the top results, ready to feed an LLM or render in a UI.


Prerequisites

Install the Python SDK.

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.

pip install youdotcom # Python ≥ 3.10

Run It

The quickest way to see the API in action is the command line.

simple_search.py
"""Simple Search — the "hello world" of the You.com Search API."""
import sys
from youdotcom import You
# take query from command line args, or use a default
query = sys.argv[1] if len(sys.argv) > 1 else "best programming languages 2026"
# initialize the client with your API key
you = You()
# run the search
response = you.search(query=query, count=5)
# print each result
for result in response.results.web:
print(f"{result.title}")
print(f" {result.url}")
print(f" {result.description}")
print()

Run it:

export YDC_API_KEY="your-api-key-here"
python simple_search.py "what is retrieval augmented generation"

No query? No problem—the example falls back to a default one, so python simple_search.py works too.

What you get back:

Each result has a title, URL, and a short description pulled from the page—clean, structured, and ready to use:

Title: What is RAG (Retrieval-Augmented Generation)? | IBM
https://www.ibm.com/topics/retrieval-augmented-generation
RAG is an AI framework that combines the strengths of traditional information
retrieval systems with the capabilities of generative large language models.

Next Steps


Resources