Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

go-notion

> 开发工具
Open source

Go client for the Notion API.

392 stars0 likes2 views
WebsiteGitHub

About

Go client for the Notion API.

go-notion

go-notion is a client for the Notion API, written in Go.

Features

The client supports all (non-deprecated) endpoints available in the Notion API, as of September 4, 2022:

Databases

  • Query a database
  • Create a database
  • Update database
  • Retrieve a database

Pages

  • Retrieve a page
  • Create a page
  • Update page
  • Retrieve a page property

Blocks

  • Retrieve a block
  • Update block
  • Retrieve block children
  • Append block children
  • Delete block

Users

  • Retrieve a user
  • List all users
  • Retrieve your token's bot user

Search

  • Search

Comments

  • Retrieve comments
  • Create a comment

Installation

bash
$ go get github.com/dstotijn/go-notion

Usage

To obtain an API key, follow Notion’s getting started guide.

go
import "github.com/dstotijn/go-notion"

(...)

client := notion.NewClient("secret-api-key")

page, err := client.FindPageByID(context.Background(), "18d35eb5-91f1-4dcb-85b0-c340fd965015")
if err != nil {
    // Handle error...
}

Check out the docs on pkg.go.dev for a complete reference and the examples directory for more example code.

Status

The Notion API itself is out of beta. This library is updated periodically following documented changes from the Notion changelog.

Note: This library will make breaking changes in its code until v1.0 of the module is released. There are no immediate plans for a v1.0 release. I want the design choices to be solidified and battle-tested more before committing to a stable release (and the possible burden of a "v2+" Go module should I want to introduce breaking changes).

License

MIT License

© 2022 David Stotijn

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goclientgogolangnotion

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具