Skip to navigation

Contents API Quickstart

Extract clean Markdown or HTML from URLs you already have.
View as MarkdownOpen in Claude

The Contents API extracts clean HTML or Markdown from URLs you already have. Pass a list of URLs and get back the page content for each—no parsing, no HTML noise, no browser automation.

Get an API key at you.com/platform. 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
from youdotcom.models import ContentsFormats
with You() as you:
pages = you.contents(
urls=["https://you.com/about"],
formats=[ContentsFormats.MARKDOWN],
)
for page in pages:
print(f"Title: {page.title}")
print(f"Content preview: {page.markdown[:300]}\n")
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.

If you have a query rather than URLs, use full page extraction on the Web Search API instead.

Next Steps