skillfed

notion2md

Notion Markdown Exporter with Python Cli

notion2md v2.9.0 257.7K downloads/30d#8,436 on PyPI757
Permissive license MIT DORMANT released

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 notion2md

uv

uv add notion2md

poetry

poetry add notion2md

Installing 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

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

Tags

notion to markdown exporternotion api markdown exportnotion page to mdnotion block markdown converternotion content exportnotion markdown cliexport notion to files
notion-integrationmarkdown-exportcli-tool

More Markup packages