/notion/.
For API key setup, see Notion Setup.
Config
Filesystem Layout
pages/ hierarchy mirrors Notion’s standalone page tree. Each page
directory contains a page.json with the page metadata and content, and
child pages appear as nested directories.
The databases/ hierarchy is one level deeper than the page tree,
because the 2025-09-03 API generation split a database into a
container plus one or more data sources. The column schema and the
rows both live on the data source, so a row page sits at depth 4 under
databases/, not 3. The name stutters for a single-source database
because Notion names the auto-created data source after its database;
that disappears the moment a database holds two.
ls a data source directory to enumerate its row pages.
database.json
The container’s identity. It carriesdatabase_id, title, url,
timestamps, parent, archived, is_inline, and the data_sources
stubs that name the directories beneath it. It does not carry
properties: at this API version the column schema lives on the data
source, and GET /v1/databases/{id} no longer answers with one.
data_source.json
The typed column schema (Notion’s own property objects), with no rows inline:ntn datasources resolve <database-id>.
page.json
A page, including a database row. Notion blocks render tomarkdown and
stay available raw under blocks; a row’s cell values are under
properties, as Notion’s own property objects, answering to the schema
in the data_source.json one level up:
children key, and
the Markdown renders nested blocks with indentation. A standalone page’s
properties holds only its title, which is what the API returns for
one.
Cache
UsesIndexCacheStore for page metadata. No separate content
cache - file content caching is handled by the workspace IOResult
mechanism.
Example
Shell Commands
Standard commands available on the mounted Notion tree:
Acting on Notion (creating, editing and trashing pages, querying data
sources, and every route that has no typed verb) goes through the
ntn CLI when installed. Ids are positional: use the
<page-id> / <database-id> / <data-source-id> from a path segment as
the operand.