Overview
The notion-to-markdown endpoint retrieves content from a Notion page and converts it to Markdown format. This is useful for exporting Notion content, creating backups, or integrating Notion content with other Markdown-based systems.Supported Block Types
The converter supports a comprehensive set of Notion block types:Text Blocks
- Paragraphs: Standard text blocks
- Headings: H1, H2, H3 (converted to
#
,##
,###
) - Quotes: Blockquote blocks
- Callouts: Notion callouts (converted to GFM-style alerts when possible)
- Code Blocks: With language syntax support
Lists
- Bulleted Lists: Converted to
-
items - Numbered Lists: Converted to
1.
items - To-do Lists: Converted to
- [ ]
or- [x]
checkboxes - Nested Lists: Full nesting support
Media & Embeds
- Images: Converted to

format - External Images: Both uploaded and external images supported
Advanced Blocks
- Tables: Full table support with headers
- Dividers: Converted to
---
- Child Pages: Referenced in the output
- Child Databases: Referenced in the output
Request
Your Mark2Notion API key
Your Notion integration token (starts with
secret_
)The ID of the Notion page to convert. Can be a 32-character ID or UUID format
Response
Will be “success” for successful requests
Examples
Error Responses
Handle Errors
Understand error responses and how to handle them.
Common Errors
Invalid Notion Token
Invalid Notion Token
Status Code: 401 UnauthorizedThe Notion token provided is invalid or expired. Make sure you’re using a valid integration token.
Page Not Found
Page Not Found
Status Code: 404 Not FoundThe page ID doesn’t exist or your integration doesn’t have access to it. Verify the page ID and ensure the page is shared with your integration.
Access Denied
Access Denied
Status Code: 403 ForbiddenYour Notion integration doesn’t have permission to access this page. Share the page with your integration in Notion.
Response Structure
Themarkdown
field in the response is an object that separates parent and child page content:
parent
: Contains the main page’s Markdown content[Child Page Title]
: If the page has child pages, each will be a separate property named after the child page title, containing that child’s Markdown content
- Access the main content via
data.markdown.parent
- Iterate over child pages if they exist
- Maintain the hierarchy of your Notion page structure
Usage Notes
Each notion-to-markdown request counts as 1 API call against your quota, regardless of the page size or number of child pages.
The endpoint returns standard Markdown that’s compatible with GitHub Flavored Markdown (GFM) and most Markdown processors.
Make sure your Notion integration has been granted access to the page you want to convert. Pages must be explicitly shared with your integration.
Setup Guide
To use this endpoint, you need a Notion integration token:- Go to https://www.notion.so/my-integrations
- Click “New integration”
- Give it a name and select the workspace
- Copy the “Internal Integration Token” (starts with
secret_
) - Share the pages you want to convert with this integration
Use Cases
- Content Backup: Export Notion pages to Markdown for backup purposes
- Static Site Generation: Convert Notion content to Markdown for static site generators
- Documentation Sync: Keep documentation in Notion and export to Markdown-based systems
- Content Migration: Move content from Notion to other platforms
- Version Control: Track Notion content changes in Git using Markdown format