> 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

# Extract API Quickstart

The Extract API fetches any webpage or PDF and parses it into clean Markdown or HTML. Send one URL per request and read the page from `contents.full_page`.

> **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 full API tour and [API key management](/docs/administration/api-keys) for best practices.

## Extract a Webpage

```python
from youdotcom import You

with You() as you:
    page = you.extract(
        url="https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
        full_page={"extraction_formats": ["markdown", "html"]},
    )

# An empty object means nothing was extracted
if page.contents:
    print(f"Title: {page.title}")
    print(f"Content preview: {page.contents.full_page.markdown[:300]}")
```

```typescript
const response = await fetch("https://ydc-index.io/v1/extract", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.YDC_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
    full_page: { extraction_formats: ["markdown", "html"] },
  }),
});

if (!response.ok) {
  throw new Error(`Extract API error ${response.status}: ${await response.text()}`);
}

const page = await response.json();

// An empty object means nothing was extracted
if (page.contents) {
  console.log(`Title: ${page.title}`);
  console.log(`Preview: ${page.contents.full_page.markdown.slice(0, 300)}`);
}
```

```curl
curl -X POST https://ydc-index.io/v1/extract \
  -H "X-API-Key: $YDC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
    "full_page": {"extraction_formats": ["markdown", "html"]}
  }'
```

The response is one object:

```json maxLines=20
{
  "url": "https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
  "extraction_source": "blend",
  "title": "Retrieval-augmented generation - Wikipedia",
  "contents": {
    "full_page": {
      "markdown": "# Retrieval-augmented generation\n\n**Retrieval-augmented generation** (**RAG**) is a technique...",
      "html": "<h1>Retrieval-augmented generation</h1>\n<p><b>Retrieval-augmented generation</b> (<b>RAG</b>) is a technique...</p>"
    }
  },
  "metadata": {
    "site_name": "Wikipedia",
    "favicon_url": "https://api.ydc-index.io/favicon?domain=en.wikipedia.org&size=128"
  }
}
```

## Extract a PDF

Send a PDF URL to the same endpoint. Tables come back with their rows and columns intact. Use `parse_effort: "lite"` for text-based PDFs to skip the per-page charge, or keep the default `standard` when charts and images carry the information you need. Raise `timeout` (up to 100 seconds) for long documents.

```bash
curl -X POST https://ydc-index.io/v1/extract \
  -H "X-API-Key: $YDC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://arxiv.org/pdf/2512.06710",
    "parse_effort": "lite",
    "timeout": 60
  }'
```

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

## Next Steps

#### [Extract API Overview](/docs/guides/extract)

Cache control, PDF parse effort, errors, use cases, and pricing

#### [API Reference](/docs/api-reference/extract)

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

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

Discover URLs first, then extract the pages you need

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

Try every API in one tour