Notion to Markdown
Pricing
from $50.00 / 1,000 page converteds
Notion to Markdown
Convert Notion pages to clean Markdown with automatic image download, hosting, and optimization.
Pricing
from $50.00 / 1,000 page converteds
Rating
0.0
(0)
Developer
Lucen
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
14 hours ago
Last modified
Categories
Share
An Apify Actor that converts a single Notion page into Markdown. Optionally downloads every image referenced by the page, optimizes it with sharp (resize + re-encode to WebP/JPEG), and rewrites the Markdown so images keep working long after Notion's signed-URL expiration window.
What it does
- Accepts a Notion integration token and a page reference (ID, UUID, or URL).
- Fetches the page via the Notion API.
- Converts blocks to Markdown.
- For each image block (if enabled):
- Downloads the image.
- Optimizes it (resize to
maxWidth, re-encode to the chosen format at the chosen quality). - Stores the result in the run's key-value store.
- Rewrites the Markdown reference to point at the stored copy.
- Writes the final Markdown to the key-value store as
page.md. - Emits a dataset record summarizing the run.
GIFs and SVGs are stored as-is — re-encoding them would lose animation / vector data.
Input
| Field | Type | Default | Notes |
|---|---|---|---|
notionToken | string (secret) | — | Internal integration token. The integration must be shared with the target page. |
pageId | string | — | Raw ID, dashed UUID, or full Notion URL. |
downloadImages | boolean | true | If off, Markdown keeps original Notion S3 URLs (which expire). |
optimizeImages | boolean | true | Passes downloaded images through sharp. |
imageFormat | enum | webp | webp, jpeg, or original (keeps source format, still resizes). |
maxWidth | integer | 2400 | Wider images are scaled down. Smaller ones are left alone. |
quality | integer | 85 | Encoder quality for WebP/JPEG. |
relativeImagePaths | boolean | false | If on, Markdown references ./images/<filename> instead of a public Apify URL — useful when you want a portable bundle. |
Output
Key-value store
page.md— the converted Markdown.images/<filename>— each downloaded image.
Dataset (one record per run)
{"pageId": "…","title": "…","markdownUrl": "https://api.apify.com/v2/key-value-stores/…/records/page.md","imageCount": 5,"images": [{ "filename": "hero.webp", "url": "https://…" }],"downloadImages": true,"optimizeImages": true,"imageFormat": "webp","relativeImagePaths": false}
Getting a Notion token
- Visit https://www.notion.so/my-integrations and create an internal integration.
- Copy the token (it starts with
secret_orntn_). - Open the Notion page you want to convert, click the
···menu → Connections → add your integration.
Without step 3 the Actor will get a 404 when it tries to read the page.