Skip to content
API wrapper for Notion's database [WIP]
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode beta version Aug 17, 2019
.gitignore init Aug 10, 2019
package-lock.json 0.6.8 Sep 10, 2019
package.json 0.6.8 Sep 10, 2019
test.js fix import error in nodejs Sep 7, 2019
yarn.lock beta version Aug 17, 2019

Notabase (WIP)

API Wrapper For Notion's Database

Getting Started


yarn add notabase


import Notabase from 'notabase'

// node env

// just Read public data
let nb = new Notabase()

// CRUD support
let nb = new Notabase({
  token: <token_v2>

// browser env
// without authCode Read public data
// with authCode CRUD support
let nb = new Notabase({
  proxy: {
    url: <cloudflare worker url>,
    authCode: <>

// get my music data
let db = await nb.fetchAll({
  songs: "",
  albums: "",
  artists: ""

// get all songs
let allSongs = db.songs.rows
// get song by index
let song = allSongs[0]

// get one song's title (base props)

// get artist's name of the song (related props)
console.log(`${song.artist[0].Name}`) // a song maybe has two or more artists

// search song by title in song's table
let aSong = allSongs.find(song=> song.title === "Bad Guy")

// search all song by artist's name in song's table
let songByArtistName = allSongs.filter(song=> song.artist[0].name === "someone")
// search all song by artist's name in artist's table
songByArtistName = db.artists.rows.filter(a=> === "someone").songs



  • collection.addRow({title:"",Tags:["tag1"]}) // add new row
  • collection.Tags = [...collection.Tags, newTag] // modify tags or mutil-select


  • row.delete() // delete a row
You can’t perform that action at this time.