---
title: "Distill Single Page"
method: POST
path: "/distill"
tags: ["Distill"]
---

# Distill Single Page

`POST /distill`

Convert a web page into clean, LLM-ready Markdown format.

**Use Cases:**
- Prepare web content for RAG (Retrieval-Augmented Generation)
- Extract article content for AI processing
- Convert documentation pages to markdown
- Process dynamic web applications

**What's Included:**
- Clean markdown content with preserved structure
- Automatic removal of ads, navigation, and boilerplate
- Metadata extraction (title, description, language)
- JavaScript rendering for dynamic content
- Automatic handling of anti-bot measures

**Output Format:**
Returns markdown optimized for LLM consumption with minimal noise and maximum signal.

## Request body

- object
  - `url` string, required — The URL of the web page to distill
  - `timeout` number — Request timeout in milliseconds (default: 30000, max: 60000)
  - `waitFor` number — Time to wait (in milliseconds) after page load for dynamic content to render before extracting content
  - `includeTags` string[] — Only include content from these HTML tags (e.g., ['article', 'main', 'div.content'])
  - `excludeTags` string[] — Exclude content from these HTML tags (e.g., ['nav', 'footer', 'aside'])
  - `headers` object — Custom HTTP headers to send with the request

## Response `200`

Success response

- object
  - `success` boolean
  - `data` object
    - `url` string — The URL that was distilled
    - `markdown` string — Clean markdown content extracted from the page
    - `html` string — Raw HTML content (optional, only if requested)
    - `metadata` object
      - `title` string — Page title extracted from <title> tag or Open Graph
      - `description` string — Meta description or excerpt
      - `language` string — Detected language code (ISO 639-1)
      - `author` string — Article author if available
      - `publishedDate` string, date-time — Publication date if available
      - `image` string — Featured image URL from Open Graph or Twitter Card
      - `sourceURL` string — Original URL (may differ from requested URL due to redirects)
      - `statusCode` integer — HTTP status code of the response
      - `contentLength` integer — Length of the markdown content in characters
    - `links` object[] — Links found in the content
      - `text` string
      - `href` string

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication failed, invalid API Key
- `429` — Too many requests, rate limit triggered

---

[API](https://skmtc.dev/thunderbit/apis/thunderbit-open-api.md) · [All operations](https://skmtc.dev/thunderbit/apis/thunderbit-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/thunderbit/thunderbit-open-api/revisions/45aa863b3172/schema)
