- Notion Markdown Exporter using official notion api by notion-sdk-py
-
Before getting started, create an integration and find the token. → Learn more about authorization.
-
Then save your api key(token) as your os environment variable
$ export NOTION_TOKEN="{your integration token key}"$ pip install notion2md- Notion2md requires either
idorurlof the Notion page/block - Download option will download files/images in the
pathdirectory
notion2md --download -n post -p ~/MyBlog/content/posts -u https://notion.so/...- This command will generate "post.md" in your '~/MyBlog/content/posts' directory
from notion2md.exporter import block_markdown_exporter, block_string_exporter
# block_markdown_exporter will make markdown file on your output path
block_markdown_exporter(id='...',path='...',download=True)
# block_string_exporter will return output as String type
md = block_string_exporter(id='...',path='...')- Download file object(image and files)
- Table blocks
- Synced Block
- Page Exporter
- Database Exporter
- Child page
- Column List and Column Blocks
Please read Contribution Guide
If you think Notion2Md is helpful to you, you can support me here:


