> For clean Markdown of any page, append `.md` to the page URL.
> Documentation index: https://you.com/docs/llms.txt (section indexes: append `/llms.txt` to any section URL).
> Search these docs: Docs MCP at https://you.com/docs/_mcp/server (`searchDocs`, no API key).
> Call live You.com APIs: Product MCP at https://api.you.com/mcp (keyless `?profile=free` exposes `you-search` and `you-discover`. Research and finance use `/mcp/research`, `/mcp/finance`, or `?tools=` on `/mcp`). To pick an API or integration path, call `you-discover` on that server instead of guessing.
> OpenAPI: https://you.com/docs/openapi.json—auth header `X-API-Key`, env `YDC_API_KEY`.

# Contents API Quickstart

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.

> **Info**
>
> Get an API key at [you.com/platform](https://you.com/platform). The samples below read `YDC_API_KEY`. See the [site Quickstart](/docs/quickstart) for the five-API tour and [API key management](/docs/administration/api-keys) for best practices.

```python
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
const response = await fetch("https://ydc-index.io/v1/contents", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.YDC_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    urls: ["https://you.com/about"],
    formats: ["markdown"],
  }),
});

const pages = await response.json();

for (const page of pages) {
  console.log(`Title: ${page.title}`);
  console.log(`Preview: ${page.markdown?.slice(0, 300)}\n`);
}
```

```curl
curl -X POST https://ydc-index.io/v1/contents \
  -H "X-API-Key: $YDC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": ["https://you.com/about"],
    "formats": ["markdown"]
  }'
```

> **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.

#### [Try in Postman](https://www.postman.com/youdotcom/you-com-api-workspace/collection/46015159-037d5564-c4b5-4e11-9cea-1e41a5eba4aa)

Fork the Contents API collection, add your API key to the `production` environment, and hit Send.

If you have a query rather than URLs, use [full page extraction](/docs/guides/search/retrieve-page-content) on the Web Search API instead.

## Next Steps

#### [Contents API Overview](/docs/guides/contents)

Formats, timeouts, cache freshness, use cases, and pricing

#### [API reference](/docs/api-reference/contents)

Full parameter reference, request/response schemas, and error codes

#### [Web Search API](/docs/guides/search)

Discover URLs first, then enrich results with full page content

#### [Site Quickstart](/docs/quickstart)

Try all five APIs in one tour