Usage
How to use the Notion Downloader.
Usage
Follow these steps to use the Notion Downloader:
-
Get your
NOTION_TOKENandROOT_IDby following the guide in Notion Setup. -
Initialize your project Run the following command to create a
downloader.jsonconfiguration file:npx notion-downloader initThis will prompt you for the required configuration options and create a
downloader.jsonfile in your current directory. -
Configure downloader.json (Optional) If needed, customize your
downloader.jsonfile by following the Configuration Guide. -
Add your Notion token Refer to the Notion Token Setup guide for instructions on obtaining your Notion token. Once you have your token, you can use it in one of two ways:
a. Add it to a
.envfile in your project root:NOTION_TOKEN=your_token_hereb. Use it directly with the CLI (see step 5).
-
Download your Notion content Run one of the following commands to pull your Notion content:
a. If you've set up your token in a
.envfile:npx notion-downloader pullb. If you want to use the token directly with the CLI:
npx notion-downloader pull --notion-token your_token_here
Choose the method that best fits your workflow. Using a .env file is recommended for security and convenience in development environments, while the CLI option is useful for quick tests or one-off operations.