DeepAgent

Notion

Notion API client.

The Notion API provides a router for accessing pages, databases, and content.

  • package: @deepagent/notion
  • exports: class NotionClient, namespace notion
  • env vars: NOTION_API_KEY
  • source
  • notion api docs

Install

npm install @deepagent/notion
yarn add @deepagent/notion
pnpm add @deepagent/notion

Usage

import { NotionClient } from '@deepagent/notion'

const notion = new NotionClient()
const authenticatedUser = await notion.getSelf()

You'll need to set up a Notion Integration, give it access to some pages in your Notion workspace, and then set the NOTION_API_KEY environment variable to the integration's token.

On this page