This feature is deprecated and will be removed in the future.
It is not recommended for use.
A class that extends the BaseDocumentLoader class. It represents a document loader for loading documents from Notion using the Notion API.
import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters";const pageLoader = new NotionAPILoader({ clientOptions: { auth: "<NOTION_INTEGRATION_TOKEN>" }, id: "<PAGE_ID>", type: "page",});const splitter = new RecursiveCharacterTextSplitter();const pageDocs = await pageLoader.loadAndSplit(splitter);const dbLoader = new NotionAPILoader({ clientOptions: { auth: "<NOTION_INTEGRATION_TOKEN>" }, id: "<DATABASE_ID>", type: "database", propertiesAsHeader: true,});const dbDocs = await dbLoader.load(); Copy
import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters";const pageLoader = new NotionAPILoader({ clientOptions: { auth: "<NOTION_INTEGRATION_TOKEN>" }, id: "<PAGE_ID>", type: "page",});const splitter = new RecursiveCharacterTextSplitter();const pageDocs = await pageLoader.loadAndSplit(splitter);const dbLoader = new NotionAPILoader({ clientOptions: { auth: "<NOTION_INTEGRATION_TOKEN>" }, id: "<DATABASE_ID>", type: "database", propertiesAsHeader: true,});const dbDocs = await dbLoader.load();
Loads the documents from Notion based on the specified options.
A Promise that resolves to an array of Documents.
Generated using TypeDoc
⚠️ Deprecated ⚠️
This feature is deprecated and will be removed in the future.
It is not recommended for use.
A class that extends the BaseDocumentLoader class. It represents a document loader for loading documents from Notion using the Notion API.
Example