Answer API Quickstart

Get a cited, synthesized answer from a single query.
View as MarkdownOpen in Claude

The Answer API returns a synthesized natural-language answer with citations and the web results used to generate it. Send a query. The API retrieves web results and synthesizes an answer with inline citations.

Get an API key at you.com/platform. New accounts start with $100 in complimentary credits. The samples below read YDC_API_KEY. See the site Quickstart for the five-API tour and API key management for best practices.

from youdotcom import You
with You() as you:
response = you.answer(query="Top 5 EV-selling companies worldwide in 2025 so far")
print(response.answer)
print(f"\n--- {len(response.citations or [])} citations ---")
for i, citation in enumerate(response.citations or [], 1):
print(f"[{i}] {citation.source}")

Every citation is verified against the source text before the answer is returned. The excerpts are the verbatim passages the model used.

Steer results with freshness, country, language, and domain filters. See Search Controls.

Next Steps