Skip to main content
Notion API client following the official Notion CLI grammar. Install it on the workspace and the whole tree is discoverable with ntn --help.

Install

Two installs under different names are two accounts. In YAML, the same install rides the clis: section; see the CLI overview.

Verbs

The grammar follows the official Notion CLI (ntn pages get/create/edit/trash, ntn datasources query); blocks, comments and search are mirage extensions spelled with the REST API’s nouns. JSON bodies are the raw Notion API resources.

Pages

create requires a parent key in the body; edit sends the body as a PATCH /pages request; trash sets in_trash.

Blocks and comments

datasources query returns the database’s row pages; search returns compact rows (title, page_id, url, last_edited, parent_type). Use the <page-id> / <database-id> from a mounted path segment as the --page, --block, or --datasource value.