> For clean Markdown of any page on these docs, append `.md` to the page URL
> Full documentation index: https://you.com/docs/llms.txt
> Search over these docs using a free, read-only MCP server (it is the best way to pick the right API(s) for the job and understand how to use them): https://you.com/docs/_mcp/server
> Access web search, web fetch, and deep research tools using our product MCP server: https://api.you.com/mcp (use `/mcp/research` and `/mcp/finance` paths for Research and Finance Research respectively)
> Call live Web Search for free: https://api.you.com/mcp/free
> OpenAPI spec index: https://you.com/docs/openapi.json
> How to authenticate: https://you.com/docs/using-the-api/authentication
> Changelog: https://you.com/docs/changelog
> Full onboarding instructions for agents: https://you.com/SKILL.md

# Python SDK

The Python SDK is the official client for the Web Search, Answer, Extract, Contents, Research, and Finance Research APIs. It is published on [PyPI](https://pypi.org/project/youdotcom/) and tracks new API fields as they ship.

```bash
pip install youdotcom
```

The client reads `YDC_API_KEY` from the environment.

> **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`](https://www.npmjs.com/package/@youdotcom-oss/mcp), or the hosted server at `https://api.you.com/mcp`, when an agent should call the tools. Use the [Python SDK](/docs/integrations/python-sdk) when you want a typed client that tracks new API fields. The `@youdotcom-oss/sdk` package is deprecated.

Every API guide includes a Python sample next to the request. Open the quickstart for the API you are calling:

* [Web Search API](/docs/guides/search/quickstart)
* [Answer API](/docs/guides/answer/quickstart)
* [Extract API](/docs/guides/extract/quickstart) (`you.extract()` and `you.extract_async()`, SDK 3.7.0 and later)
* [Research API](/docs/guides/research/quickstart)
* [Finance Research API](/docs/guides/finance-research/quickstart)

Background research helpers live on [Background Requests](/docs/guides/research/background-requests). Source, model docs, and release history are on [GitHub](https://github.com/youdotcom-oss/youdotcom-python-sdk/).