Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wonism/get-notion-data

Get public Notion page's data.
https://github.com/wonism/get-notion-data

cms notion

Last synced: about 1 month ago
JSON representation

Get public Notion page's data.

Awesome Lists containing this project

README

        

# Get Notion Data
> This will help you to get **PUBLIC** Notion page's data.

## Installation
```sh
$ npm i -S get-notion-data
```

## Usage
```js
const getNotionData = require('get-notion-data');

getNotionData(/* YOUR NOTION PAGE ID */).then((data) => {
console.log(JSON.stringify(data, null, 2));
});
```

First of all, you should make page public. Then you can get the ID of the page.

If the public Notion page's URL is https://www.notion.so/Personal-Home-db45cd2e7c694c3493c97f2376ab184a

You need to copy `db45cd2e7c694c3493c97f2376ab184a`. and make it to follow below format.

```
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
X{8}-X{4}-X{4}-X{4}-X{12}
```

Before run the source, you should set up the timezone like this. Default timezone is Asiz/Seoul.
```sh
$ TZ=Asia/Seoul
```