Export Notion Pages to Markdown

Back up your Notion content, sync to static sites, or track changes in Git. Convert any Notion page to clean Markdown with a single API call.

Why Export Notion to Markdown?

Transform your Notion content into portable, version-controlled Markdown:

💾
Content Backup → Export pages to Markdown for safe, portable backups
📚
Documentation Sync → Keep docs in Notion, export to static site generators
🔄
Version Control → Track Notion content changes with Git
🚀
Content Migration → Move content from Notion to other platforms

Setup

What You'll Need

Two simple steps to start exporting:

1. Get Your Mark2Notion API Key

Sign up free • 100 requests/month included

2. Create a Notion Integration

  1. Go to notion.so/my-integrations
  2. Click "New integration"
  3. Copy the Internal Integration Token (starts with ntn_)
  4. Share the Notion page with your integration (click "..." → "Connections" → Add your integration)

Copy-Paste Examples

Export a Notion Page

curl -X POST "https://api.mark2notion.com/api/notion-to-markdown" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "notionToken": "ntn_your_notion_token",
    "pageId": "your-page-id"
  }'

📖 Getting the Page ID: Copy it from your Notion URL: https://notion.so/Page-Title-[PAGE_ID_HERE]

Understanding the Response

📄 Simple Page Response
{
  "status": "success",
  "data": {
    "markdown": {
      "parent": "# My Page\n\nContent here..."
    },
    "pageId": "abc123..."
  }
}

Access parent content with data.markdown.parent

📚 Page with Child Pages
{
  "status": "success",
  "data": {
    "markdown": {
      "parent": "# Main Page\n...",
      "Child Page 1": "## Content...",
      "Another Child": "## More..."
    },
    "pageId": "abc123..."
  }
}

Child pages are separate properties named by their title

💡 Pro Tip: Handling Child Pages

Iterate over all pages including children:

// JavaScript example
Object.entries(result.data.markdown).forEach(([title, content]) => {
  console.log(`Page: ${title}`);
  console.log(content);
});

Comprehensive Export

All Your Notion Content, Perfectly Preserved

Every block type converted to clean, standard Markdown.

Text & Formatting
Headings, paragraphs, bold, italic, code, quotes, callouts, and lists (bulleted, numbered, to-do).
Tables & Code Blocks
Full table support with headers. Code blocks preserve syntax highlighting language tags.
Images & Media
Both uploaded and external images converted to standard Markdown image syntax.
Child Pages & Structure
Child pages exported separately, preserving your content hierarchy.

Troubleshooting

Can't find the answer you're looking for? Check the API documentation or reach out to customer support.

"Invalid Notion Token"
  • Verify your token starts with ntn_
  • Check for extra spaces when copying the token
  • Ensure the integration is still active at notion.so/my-integrations
"Page Not Found" or "Access Denied"
  • Make sure the page is shared with your integration (click "..." → "Connections")
  • Verify the page ID is correct (copy from the URL)
Rate limit exceeded
Child pages not appearing
  • Your integration must have access to child pages too
  • Share the parent page with the integration - child access is inherited
  • Check that child pages aren't archived or deleted

Start backing up your Notion content today

100 free exports per month. No credit card required.