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

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

Install

npm install @agentic/notion

Usage

import { NotionClient } from '@agentic/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.