NotionAPI
The unofficial Javascript API for Notion content. Written in Typescript, GraphQL friendly.
Install / Use
/learn @NotionDocs/NotionAPIREADME
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
Overview
NotionAPI comes with 3 packages: @notiondocs/api-client, @notiondocs/api-core, and @notiondocs/api-transform. Each package serves a different purpose:
@notiondocs/api-clientis used for making queries to the Notion backend. It is a required dependency for thecorepackage.@notiondocs/api-coreprovides a layer of abstraction on top of theclientpackage that makes manipulating data from the Notion backend a breeze.@notiondocs/api-transformallows you to transform Notion page content by providing specific transformation rules.
Features
Notion API supports all read operations on pages and collections. Write operations are coming soon!
Notion backend
| Feature | Availability | Notes |
|---------|--------------|-------|
| Query Notion backend | ✅ | see client package |
| Query private pages | ✅ | see client package |
| Get user information | 😕 | not directly supported, but possible with client package |
Notion page
| Feature | Availability | Notes |
|---------|--------------|-------|
| Read page properties | ✅ | see core package |
| Read page metadata | ✅ | see core package |
| Read full page content | ✅ | see core package |
| Transform content block map | ✅ | see transform package |
| Update page | ❌ | Feature coming soon! 👀 |
Notion table/collection
| Feature | Availability | Notes |
|---------|--------------|-------|
| Fetch collection schema | ✅ | see core package |
| Fetch collection from collection page | ✅ | see core package |
| Fetch collection from collection ID | ✅ | see core package |
| Filter collection based on view | ✅ | see core package |
| Create new page in collection | ❌ | |
| Delete page in collection | ❌ | |
Documentation
Documentation is coming soon, once the entire NotionDocs suite is finished. That being said, NotionAPI is written entirely in Typescript and is (WIP) fully documented in code.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tr> <td align="center"><a href="https://colegaw.in"><img src="https://avatars.githubusercontent.com/u/8595795?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cole Gawin</b></sub></a><br /><a href="https://github.com/NotionDocs/NotionAPI/commits?author=chroline" title="Code">💻</a> <a href="#content-chroline" title="Content">🖋</a> <a href="#design-chroline" title="Design">🎨</a> <a href="#ideas-chroline" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-chroline" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-chroline" title="Maintenance">🚧</a> <a href="#projectManagement-chroline" title="Project Management">📆</a></td> </tr> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->This project follows the all-contributors specification. Contributions of any kind welcome!
