skillfed

notion-to-md-py

A package to convert Notion content into Markdown format

notion-to-md-py v0.1.5 133.1K downloads/30d#11,527 on PyPI28
Permissive license Active released

What it is and what it does

notion-to-md-py is a Python wrapper around the Notion API that extracts page content and converts it to Markdown format. It provides both synchronous and asynchronous interfaces, allowing you to export individual Notion pages or build batch export workflows. The package handles the translation of Notion's block-based content model into standard Markdown, making it useful for archiving, backing up, or migrating Notion content to Markdown-based systems.

The package depends on notion-client for API communication, httpx for HTTP requests, and pytablewriter for rendering Notion tables as Markdown. It requires a valid Notion API token and appropriate sharing permissions on the pages you want to export. The tool is limited by what the Notion API exposes—file downloads other than images are not supported, and complex Notion features may not translate perfectly to Markdown.

Use it for:

  • Back up Notion pages as Markdown files for version control or offline storage.
  • Migrate Notion documentation to a static site generator or Markdown-based wiki.
  • Batch export database records from Notion into individual Markdown files for processing.
  • Automate Notion-to-Markdown workflows in CI/CD pipelines using the async interface.
  • Convert Notion meeting notes or project pages into shareable Markdown documents.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts Notion pages to Markdown files via the Notion API, supporting both synchronous and asynchronous workflows.

Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a specific problem—exporting Notion content to Markdown—that has no obvious built-in alternative. The MIT license is permissive. Install it if you regularly need to extract Notion pages as Markdown; skip it if you only export occasionally or need features the Notion API doesn't support.

Install

notion-to-md-py on PyPI

pip

pip install notion-to-md-py

uv

uv add notion-to-md-py

poetry

poetry add notion-to-md-py

Installing notion-to-md-py

Before you install

Low install friction with a pure-Python wheel distribution. Actively maintained with recent commits; last release was 95 days ago. Depends on httpx, pytablewriter, and notion-client, all standard packages.

License in practice

Licensed under MIT (permissive), imposing no restrictions on use, modification, or distribution in your own projects.

Quickstart

pip install notion-to-md-py

from notion_client import Client
from notion_to_md import NotionToMarkdown

notion = Client(auth="your-auth-token")
n2m = NotionToMarkdown(notion)
md_blocks = n2m.page_to_markdown("page-id")
md_str = n2m.to_markdown_string(md_blocks).get('parent')
with open("output.md", "w") as f:
    f.write(md_str)

Requires a Notion API key and appropriate permissions; the Notion API limits what content types and features can be exported.

Verify before relying

  • Whether embedded content types beyond images are handled or silently dropped during conversion.
  • Performance characteristics when exporting large Notion workspaces or deeply nested page hierarchies.
  • Fidelity of Markdown output for complex Notion formatting (e.g., database properties, synced blocks, advanced layouts).

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 3 — httpx, pytablewriter, notion-client
Maintenance actively maintained — 95 days since the last release
Last repo commit
First released
Downloads 133,144/month — #11,527 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: notion_to_md_py-0.1.5-py3-none-any.whl

Keywords: notion, markdown, converter, python

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

notion to markdown converterexport notion pages markdownnotion api markdownnotion content extractionnotion page to mdnotion markdown export tool
notion-integrationmarkdown-exportasync-support

More Markup packages