Loading...
Loading...
Interact with Notion using the unofficial private API - pages, databases, blocks, search, users, comments
npx skill4agent add devxoul/vibe-notion vibe-notionNote: This skill uses Notion's internal/private API (), which is separate from the official public API. For official API access, use/api/v3/.vibe-notionbot
# 1. Extract token_v2 from Notion desktop app
vibe-notion auth extract
# 2. Find your workspace ID
vibe-notion workspace list --pretty
# 3. Search for a page
vibe-notion search "Roadmap" --workspace-id <workspace-id> --pretty
# 4. Get page content
vibe-notion page get <page-id> --workspace-id <workspace-id> --pretty
# 5. Query a database
vibe-notion database query <collection-id> --workspace-id <workspace-id> --prettyImportant:is required for ALL commands that operate within a specific workspace. Use--workspace-idto find your workspace ID.vibe-notion workspace list
token_v2# Extract token_v2 from Notion desktop app
vibe-notion auth extract
# Check auth status (shows extracted token_v2)
vibe-notion auth status
# Remove stored token_v2
vibe-notion auth logouttoken_v2~/.config/vibe-notion/credentials.json0600~/.config/vibe-notion/MEMORY.mdReadWrite~/.config/vibe-notion/MEMORY.mdRead~/.config/vibe-notion/MEMORY.mdWriteworkspace listsearchpage listpage getdatabase listWritetoken_v2MEMORY.mdMEMORY.md# Vibe Notion Memory
## Workspaces
- `abc123-...` — Acme Corp (default)
## Pages (Acme Corp)
- `page-id-1` — Product Roadmap (top-level)
- `page-id-2` — Q1 Planning (under Product Roadmap)
## Databases (Acme Corp)
- `coll-id-1` — Tasks (under Product Roadmap, views: `view-1`)
- `coll-id-2` — Contacts (top-level)
## Aliases
- "roadmap" → `page-id-1` (Product Roadmap)
- "tasks" → `coll-id-1` (Tasks database)
## Notes
- User prefers --pretty output for search results
- Main workspace is "Acme Corp"Memory lets you skip repeatedandsearchcalls. When you already know an ID from a previous session, use it directly.workspace list
vibe-notion auth extract # Extract token_v2 from Notion desktop app
vibe-notion auth status # Check authentication status
vibe-notion auth logout # Remove stored token_v2# List pages in a space (top-level only)
vibe-notion page list --workspace-id <workspace_id> --pretty
vibe-notion page list --workspace-id <workspace_id> --depth 2 --pretty
# Get a page and all its content blocks
vibe-notion page get <page_id> --workspace-id <workspace_id> --pretty
vibe-notion page get <page_id> --workspace-id <workspace_id> --limit 50
vibe-notion page get <page_id> --workspace-id <workspace_id> --backlinks --pretty
# Create a new page under a parent
vibe-notion page create --workspace-id <workspace_id> --parent <parent_id> --title "My Page" --pretty
# Create a page with markdown content
vibe-notion page create --workspace-id <workspace_id> --parent <parent_id> --title "My Doc" --markdown '# Hello\n\nThis is **bold** text.'
# Create a page with markdown from a file
vibe-notion page create --workspace-id <workspace_id> --parent <parent_id> --title "My Doc" --markdown-file ./content.md
# Replace all content on a page with new markdown
vibe-notion page update <page_id> --workspace-id <workspace_id> --replace-content --markdown '# New Content'
vibe-notion page update <page_id> --workspace-id <workspace_id> --replace-content --markdown-file ./updated.md
# Update page title or icon
vibe-notion page update <page_id> --workspace-id <workspace_id> --title "New Title" --pretty
vibe-notion page update <page_id> --workspace-id <workspace_id> --icon "🚀" --pretty
# Archive a page
vibe-notion page archive <page_id> --workspace-id <workspace_id> --pretty# Get database schema
vibe-notion database get <collection_id> --workspace-id <workspace_id> --pretty
# Query a database (auto-resolves default view)
vibe-notion database query <collection_id> --workspace-id <workspace_id> --pretty
vibe-notion database query <collection_id> --workspace-id <workspace_id> --limit 10 --pretty
vibe-notion database query <collection_id> --workspace-id <workspace_id> --view-id <view_id> --pretty
vibe-notion database query <collection_id> --workspace-id <workspace_id> --search-query "keyword" --pretty
vibe-notion database query <collection_id> --workspace-id <workspace_id> --timezone "America/New_York" --pretty
# List all databases in workspace
vibe-notion database list --workspace-id <workspace_id> --pretty
# Create a database
vibe-notion database create --workspace-id <workspace_id> --parent <page_id> --title "Tasks" --pretty
vibe-notion database create --workspace-id <workspace_id> --parent <page_id> --title "Tasks" --properties '{"status":{"name":"Status","type":"select"}}' --pretty
# Update database title or schema
vibe-notion database update <collection_id> --workspace-id <workspace_id> --title "New Name" --pretty
# Add a row to a database
vibe-notion database add-row <collection_id> --workspace-id <workspace_id> --title "Row title" --pretty
vibe-notion database add-row <collection_id> --workspace-id <workspace_id> --title "Row title" --properties '{"Status":"In Progress","Due":{"start":"2025-03-01"}}' --pretty
# Get view configuration and property visibility
vibe-notion database view-get <view_id> --workspace-id <workspace_id> --pretty
# Show or hide properties on a view (comma-separated names)
vibe-notion database view-update <view_id> --workspace-id <workspace_id> --show "ID,Due" --pretty
vibe-notion database view-update <view_id> --workspace-id <workspace_id> --hide "Assignee" --pretty
vibe-notion database view-update <view_id> --workspace-id <workspace_id> --show "Status" --hide "Due" --pretty# Get a specific block
vibe-notion block get <block_id> --workspace-id <workspace_id> --pretty
vibe-notion block get <block_id> --workspace-id <workspace_id> --backlinks --pretty
# List child blocks
vibe-notion block children <block_id> --workspace-id <workspace_id> --pretty
vibe-notion block children <block_id> --workspace-id <workspace_id> --limit 50 --pretty
vibe-notion block children <block_id> --workspace-id <workspace_id> --start-cursor '<next_cursor_json>' --pretty
# Append child blocks
vibe-notion block append <parent_id> --workspace-id <workspace_id> --content '[{"type":"text","properties":{"title":[["Hello world"]]}}]' --pretty
# Append markdown content as blocks
vibe-notion block append <parent_id> --workspace-id <workspace_id> --markdown '# Hello\n\nThis is **bold** text.'
# Append markdown from a file
vibe-notion block append <parent_id> --workspace-id <workspace_id> --markdown-file ./content.md
# Update a block
vibe-notion block update <block_id> --workspace-id <workspace_id> --content '{"properties":{"title":[["Updated text"]]}}' --pretty
# Delete a block
vibe-notion block delete <block_id> --workspace-id <workspace_id> --pretty{"type": "header", "properties": {"title": [["Heading 1"]]}}
{"type": "sub_header", "properties": {"title": [["Heading 2"]]}}
{"type": "sub_sub_header", "properties": {"title": [["Heading 3"]]}}{"type": "text", "properties": {"title": [["Plain text paragraph"]]}}{"type": "bulleted_list", "properties": {"title": [["Bullet item"]]}}
{"type": "numbered_list", "properties": {"title": [["Numbered item"]]}}{"type": "to_do", "properties": {"title": [["Task item"]], "checked": [["Yes"]]}}
{"type": "to_do", "properties": {"title": [["Unchecked task"]], "checked": [["No"]]}}{"type": "code", "properties": {"title": [["console.log('hello')"]], "language": [["javascript"]]}}{"type": "quote", "properties": {"title": [["Quoted text"]]}}{"type": "divider"}| Format | Syntax | Example |
|---|---|---|
| Plain | | |
| Bold | | |
| Italic | | |
| Strikethrough | | |
| Inline code | | |
| Link | | |
| Bold + Italic | | |
[["plain "], ["bold", [["b"]]], [" more plain"]]# List comments on a page
vibe-notion comment list --page <page_id> --workspace-id <workspace_id> --pretty
# Create a comment on a page (starts a new discussion)
vibe-notion comment create "This is a comment" --page <page_id> --workspace-id <workspace_id> --pretty
# Reply to an existing discussion thread
vibe-notion comment create "Replying to thread" --discussion <discussion_id> --workspace-id <workspace_id> --pretty
# Get a specific comment by ID
vibe-notion comment get <comment_id> --workspace-id <workspace_id> --pretty# Search across workspace (--workspace-id is required)
vibe-notion search "query" --workspace-id <workspace_id> --pretty
vibe-notion search "query" --workspace-id <workspace_id> --limit 10 --pretty
vibe-notion search "query" --workspace-id <workspace_id> --start-cursor <offset> --pretty# Get current user info
vibe-notion user me --pretty
# Get a specific user
vibe-notion user get <user_id> --workspace-id <workspace_id> --pretty# Search results
vibe-notion search "Roadmap" --workspace-id <workspace_id>{
"results": [
{
"id": "305c0fcf-90b3-807a-bc1a-dc7cc18e0022",
"title": "Getting Started",
"score": 76.58
}
],
"has_more": true,
"next_cursor": "20",
"total": 100
}# Database query — properties use human-readable field names from the collection schema
vibe-notion database query <collection_id> --workspace-id <workspace_id>{
"results": [
{
"id": "row-uuid",
"properties": {
"Name": "Acme Corp",
"Status": "Active",
"Type": "Enterprise"
}
}
],
"has_more": false,
"next_cursor": null
}# Page get — returns page metadata with content blocks
vibe-notion page get <page_id> --workspace-id <workspace_id>{
"id": "page-uuid",
"title": "My Page",
"blocks": [
{ "id": "block-1", "type": "text", "text": "Hello world" },
{ "id": "block-2", "type": "to_do", "text": "Task item" }
]
}# With --backlinks: includes pages that link to this page/block
vibe-notion page get <page_id> --workspace-id <workspace_id> --backlinks
vibe-notion block get <block_id> --workspace-id <workspace_id> --backlinks{
"id": "page-uuid",
"title": "My Page",
"blocks": [...],
"backlinks": [
{ "id": "linking-page-uuid", "title": "Page That Links Here" }
]
}# Block get — collection_view blocks include collection_id and view_ids
vibe-notion block get <block_id> --workspace-id <workspace_id>{
"id": "block-uuid",
"type": "collection_view",
"text": "",
"parent_id": "parent-uuid",
"collection_id": "collection-uuid",
"view_ids": ["view-uuid"]
}--prettyvibe-notion search "Roadmap" --workspace-id <workspace_id> --pretty--backlinks--backlinks# BAD: 15 API calls — search, open empty pages, trace parents, find database, query
vibe-notion search "Enterprise Plan" ...
vibe-notion page get <plan-page-id> ... # empty
vibe-notion block get <plan-page-id> ... # find parent
# ... many more calls to discover the database
# GOOD: 2-3 API calls — search, then backlinks on the target
vibe-notion search "Enterprise Plan" ...
vibe-notion page get <plan-page-id> --backlinks --pretty
# → backlinks immediately show all people/rows linked to this planhas_morenext_cursorblock childrennext_cursor--start-cursorsearchnext_cursor--start-cursordatabase query--limithas_more--limitvibe-notionnpm install -g vibe-notionyarn global add vibe-notionpnpm add -g vibe-notionbun add -g vibe-notionauth extracttoken_v2