notion2md
Notion Markdown Exporter with Python Cli
What it is and what it does
Notion2md is a command-line tool and Python library that converts Notion pages and blocks into Markdown format using the official Notion API. It can export content as standalone Markdown files or return it as a string, and optionally download embedded images and files to a local directory. The tool is built on notion-client (the official Notion SDK for Python) and cleo for CLI functionality.
You use it either as a shell command with options like --download and --unzipped, or programmatically by instantiating MarkdownExporter or StringExporter with a block ID and output path. It's designed for workflows where you want to extract Notion content for use in static site generators, blogs, or local documentation systems.
Use it for:
- Export Notion documentation or wiki pages to Markdown for use in static site generators like Hugo or Jekyll.
- Batch convert Notion blog drafts to Markdown for publishing to platforms that accept Markdown input.
- Back up Notion content as local Markdown files with embedded images and attachments downloaded.
- Integrate Notion as a content source in a CI/CD pipeline that processes Markdown.
- Extract structured Notion data (tables, synced blocks) into Markdown for version control or archival.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Exports Notion pages and blocks to Markdown files or strings using the official Notion API, with support for downloading embedded files and images.
Yes, if you need to export Notion content to Markdown and can accept dormant maintenance. The package is stable, has low install friction, no known vulnerabilities, and works with Python 3.7 through 3.12. However, the last release was 2024-01-10; if you encounter bugs or need support for newer Notion API features, you may need to fork or patch it yourself.
Install
notion2md on PyPI
pip
pip install notion2mduv
uv add notion2mdpoetry
poetry add notion2mdInstalling notion2md
Before you install
Low install friction with only two runtime dependencies (notion-client and cleo). Maintenance is dormant—last release was 2024-01-10—so expect no active bug fixes or feature updates, though the repository remains public and unarchived.
License in practice
MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions; suitable for both personal and commercial projects.
Quickstart
pip install notion2md
from notion2md.exporter.block import MarkdownExporter
MarkdownExporter(block_id='your_block_id', output_path='./output', download=True).export()
Requires a valid Notion integration token set via NOTION_TOKEN environment variable or passed via --token CLI option.
Verify before relying
- Completeness of Markdown conversion for all Notion block types (to-do list shows synced blocks and tables are supported, but page and column blocks are not yet implemented).
- Behavior and reliability when exporting large Notion workspaces or deeply nested block structures.
- Compatibility with recent Notion API changes since the last release in January 2024.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7,<4) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — notion-client, cleo |
| Maintenance | dormant — 947 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 257,728/month — #8,436 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: notion2md-2.9.0-py3-none-any.whl
Tags
More Markup packages
PyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
markdown-it-pyA Python markdown parser that converts markdown…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
et-xmlfileet_xmlfile writes large XML files with minimal…
permissive · top 1,000 on PyPI
tomlkitParses and edits TOML files while preserving…
permissive · top 1,000 on PyPI
docstring-parserParses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
notionUnofficial Python client for Notion.so API v3…
permissive · top 5,000 on PyPI
notion-to-md-pyConverts Notion pages to Markdown files via the…
permissive · top 15,000 on PyPI
md2pdfConverts Markdown files to PDF with custom CSS…
permissive · top 15,000 on PyPI
notion-clientA Python client library for the official Notion…
permissive · top 5,000 on PyPI
md-click-2Generates markdown documentation files…
permissive · top 15,000 on PyPI
m2r2Converts markdown files with embedded…
permissive · top 15,000 on PyPI
markdownifyConverts HTML to Markdown, with fine-grained…
permissive · top 1,000 on PyPI
pptx2mdConverts PowerPoint .pptx files to markdown,…
permissive · top 15,000 on PyPI
sphinx_mdincludeSphinx extension that lets you include and…
permissive · top 15,000 on PyPI
mdformat-blackA plugin for mdformat that automatically…
permissive · top 15,000 on PyPI