> 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: append `?profile=free` to the MCP server path
> 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, 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)
* [Contents API](/docs/guides/contents/quickstart)
* [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/).