Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/notiondocs/notionapi
The unofficial Javascript API for Notion content. Written in Typescript, GraphQL friendly.
https://github.com/notiondocs/notionapi
api cms graphql notion typescript
Last synced: 4 months ago
JSON representation
The unofficial Javascript API for Notion content. Written in Typescript, GraphQL friendly.
- Host: GitHub
- URL: https://github.com/notiondocs/notionapi
- Owner: NotionDocs
- Created: 2021-02-13T06:59:00.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-06T18:54:37.000Z (over 2 years ago)
- Last Synced: 2024-10-14T10:14:36.962Z (4 months ago)
- Topics: api, cms, graphql, notion, typescript
- Language: TypeScript
- Homepage:
- Size: 319 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
NotionAPI
The unofficial Javascript API for Notion content. Written in Typescript, GraphQL friendly.
[](https://github.com/NotionDocs/NotionAPI/actions/workflows/build.yml)
[](https://github.com/NotionDocs/NotionAPI/releases)
[](https://github.com/NotionDocs/NotionAPI/commits/main)
[](#contributors-)
---
## Overview
NotionAPI comes with 3 packages: [`@notiondocs/api-client`](https://github.com/NotionDocs/NotionAPI/packages/696039), [`@notiondocs/api-core`](https://github.com/NotionDocs/NotionAPI/packages/696041), and [`@notiondocs/api-transform`](https://github.com/NotionDocs/NotionAPI/packages/696040). Each package serves a different purpose:
- [`@notiondocs/api-client`](https://github.com/NotionDocs/NotionAPI/packages/696039) is used for making queries to the Notion backend. It is a required dependency for the `core` package.
- [`@notiondocs/api-core`](https://github.com/NotionDocs/NotionAPI/packages/696041) provides a layer of abstraction on top of the `client` package that makes manipulating data from the Notion backend a breeze.
- [`@notiondocs/api-transform`](https://github.com/NotionDocs/NotionAPI/packages/696040) allows 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](https://github.com/NotionDocs/NotionAPI/tree/main/packages/client) |
| Query private pages | ✅ | see [`client` package](https://github.com/NotionDocs/NotionAPI/tree/main/packages/client) |
| Get user information | 😕 | not directly supported, but possible with [`client` package](https://github.com/NotionDocs/NotionAPI/tree/main/packages/client) |### Notion page
| Feature | Availability | Notes |
|---------|--------------|-------|
| Read page properties | ✅ | see [`core` package](https://github.com/NotionDocs/NotionAPI/tree/main/packages/core) |
| Read page metadata | ✅ | see [`core` package](https://github.com/NotionDocs/NotionAPI/tree/main/packages/core) |
| Read full page content | ✅ | see [`core` package](https://github.com/NotionDocs/NotionAPI/tree/main/packages/core) |
| Transform content block map | ✅ | see [`transform` package](https://github.com/NotionDocs/NotionAPI/tree/main/packages/transform) |
| Update page | ❌ | Feature coming soon! 👀 |### Notion table/collection
| Feature | Availability | Notes |
|---------|--------------|-------|
| Fetch collection schema | ✅ | see [`core` package](https://github.com/NotionDocs/NotionAPI/tree/main/packages/core) |
| Fetch collection from collection page | ✅ | see [`core` package](https://github.com/NotionDocs/NotionAPI/tree/main/packages/core) |
| Fetch collection from collection ID | ✅ | see [`core` package](https://github.com/NotionDocs/NotionAPI/tree/main/packages/core) |
| Filter collection based on view | ✅ | see [`core` package](https://github.com/NotionDocs/NotionAPI/tree/main/packages/core) |
| 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](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!