---
title: "Export a page"
description: "Downloads a page as portable Markdown (md), one self-contained HTML file (html), or a .zip with its images (zip)."
canonical_url: https://docs.markdrop.in/api/pages/export-a-page
last_updated: 2026-11-04
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Export a page

`GET https://api.markdrop.in/api/v1/documents/{slug}/export`

Downloads a page as portable Markdown (`md`), one self-contained HTML file (`html`), or a `.zip` with its images (`zip`). With `subpages=true` its sub-pages come too, in a `.zip`. Editors can always export; readers can unless the page turns exporting off.

- **Authentication:** Token optional: send `Authorization: Bearer mdk_…` to act as your account, or the document's edit secret in `X-Edit-Secret`; `X-Read-Password` for a password-protected document.
- **Rate limit:** 30 per minute per IP address.
- **MCP tool:** `export_page` ([tools](https://docs.markdrop.in/ai/tools))
- **Guide:** [Export a page](https://docs.markdrop.in/pages/export)

## Path parameters

- `slug` (string, required): The document's address: the part after `markdrop.in/`.

## Query parameters

- `format` (string): `md` (the default), `html` or `zip`. One of `md`, `html`, `zip`. One of `md`, `html`, `zip`. Default `"md"`.
- `subpages` (boolean): Include its sub-pages. Default `false`.

## Headers

- `X-Read-Password` (string): The password of a password-protected document.
- `X-Edit-Secret` (string): The document's edit secret (`sk_…`), for a document published without an account. See [Edit key](https://docs.markdrop.in/documents/edit-key).
- `X-Markdrop-Workspace` (string): A workspace's id: answer only if the document is in that workspace, else `404`. Workspace domains send it; you rarely need it.

## Responses

- `200`: OK.
- `413`: Too many pages to export at once.
- `422`: The document is end-to-end encrypted: export it from the page in your browser.
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl https://api.markdrop.in/api/v1/documents/k3x9q2m/export \
  -H "Authorization: Bearer $MARKDROP_TOKEN"
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/documents/k3x9q2m/export", {
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
  },
});
const data = await res.text();
```

**Python**

```python
import os

import requests

r = requests.get(
    "https://api.markdrop.in/api/v1/documents/k3x9q2m/export",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
)
r.raise_for_status()
print(r.text)
```
