Documentation Index
Fetch the complete documentation index at: https://nvd-54.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Notion is a collaboration platform with modified Markdown support that integrates kanban boards, tasks, wikis and databases. It is an all-in-one workspace for notetaking, knowledge and data management, and project and task management.
NotionDBLoader is a Python class for loading content from a Notion database. It retrieves pages from the database, reads their content, and returns a list of Document objects. NotionDirectoryLoader is used for loading data from a Notion database dump.
Requirements
- A
NotionDatabase - Notion Integration Token
设置
1. Create a notion table Database
Create a new table database in Notion. You can add any column to the database and they will be treated as metadata. For example you can add the following columns:- Title: set Title as the default property.
- Categories: A Multi-select property to store categories associated with the page.
- Keywords: A Multi-select property to store keywords associated with the page.
2. Create a notion integration
To create a Notion Integration, follow these steps:- Visit the Notion Developers page and log in with your Notion account.
- Click on the ”+ New integration” button.
- Give your integration a name and choose the workspace where your database is located.
- Select the require capabilities, this extension only need the Read content capability
- Click the “Submit” button to create the integration.
Once the integration is created, you’ll be provided with an
Integration Token (API key). Copy this token and keep it safe, as you’ll need it to use the NotionDBLoader.
3. Connect the integration to the Database
To connect your integration to the database, follow these steps:- Open your database in Notion.
- Click on the three-dot menu icon in the top right corner of the database view.
- Click on the ”+ New integration” button.
- Find your integration, you may need to start typing its name in the search box.
- Click on the “Connect” button to connect the integration to the database.
4. Get the Database ID
To get the database ID, follow these steps:- Open your database in Notion.
- Click on the three-dot menu icon in the top right corner of the database view.
- Select “Copy link” from the menu to copy the database URL to your clipboard.
- The database ID is the long string of alphanumeric characters found in the URL. It typically looks like this: www.notion.so/username/8935f9d140a04f95a872520c4f123456?v=… In this example, the database ID is 8935f9d140a04f95a872520c4f123456.
5. Installation
Instaall thelangchain-community integration package.
Notion Database loader
NotionDBLoader is part of the langchain package’s document loaders. You can use it as follows:Notion directory loader
设置
Export your dataset from Notion. You can do this by clicking on the three dots in the upper right hand corner and then clickingExport.
导出时,请确保选择 Markdown & CSV 格式选项。
这将在你的下载文件夹中生成一个 .zip 文件。将 .zip 文件移到此仓库中。
运行以下命令解压 zip 文件(根据需要将 Export... 替换为你自己的文件名)。
用法
Run the following command to ingest the data you just downloaded.通过 MCP 将这些文档连接到 Claude、VSCode 等工具以获取实时答案。

