Skip to content

NotionReader

Defined in: .build/typescript/packages/providers/notion/src/reader.ts:18

Notion pages are retrieved recursively and converted to Document objects. Notion Database can also be loaded, and the serialization method can be customized.

[Note] To use this reader, must be created the Notion integration must be created in advance Please refer to this document for details.

  • BaseReader<Document>

new NotionReader(options): NotionReader

Defined in: .build/typescript/packages/providers/notion/src/reader.ts:25

Constructor for the NotionReader class

NotionReaderOptions

Configuration options for the reader

NotionReader

toDocuments(pages): Document<Metadata>[]

Defined in: .build/typescript/packages/providers/notion/src/reader.ts:34

Converts Pages to an array of Document objects

Page[]

The Notion pages to convert (Return value of loadPages)

Document<Metadata>[]

An array of Document objects


loadPages(rootPageId): Promise<Page[]>

Defined in: .build/typescript/packages/providers/notion/src/reader.ts:50

Loads recursively the Notion page with the specified root page ID.

string

The root Notion page ID

Promise<Page[]>

A Promise that resolves to a Pages object(Convertible with the toDocuments method)


loadData(rootPageId): Promise<Document<Metadata>[]>

Defined in: .build/typescript/packages/providers/notion/src/reader.ts:70

Loads recursively Notion pages and converts them to an array of Document objects

string

The root Notion page ID

Promise<Document<Metadata>[]>

A Promise that resolves to an array of Document objects

BaseReader.loadData