Notes & PKMDocumentedScanned
better-notion
Full CRUD for Notion pages, databases.
Share:
Installation
npx clawhub@latest install better-notionView the full skill documentation and source below.
Documentation
Notion
Use the Notion API for pages, data sources (databases), and blocks.
Setup
mkdir -p ~/.config/notion
echo "ntn_your_key_here" > ~/.config/notion/api_key
Share target pages/databases with your integration in Notion UI.
API Basics
NOTION_KEY=$(cat ~/.config/notion/api_key)
curl -X POST "" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json"
Common Operations
# Search
curl -X POST "" -d '{"query": "title"}'
# Get page
curl ""
# Get page blocks
curl ""
# Create page in database
curl -X POST "" -d '{
"parent": {"data_source_id": "xxx"},
"properties": {"Name": {"title": [{"text": {"content": "Item"}}]}}
}'
# Query database
curl -X POST "" -d '{
"filter": {"property": "Status", "select": {"equals": "Active"}}
}'
# Update page
curl -X PATCH "" -d '{
"properties": {"Status": {"select": {"name": "Done"}}}
}'
# Add blocks
curl -X PATCH "" -d '{
"children": [{"type": "paragraph", "paragraph": {"rich_text": [{"text": {"content": "Text"}}]}}]
}'
# Delete page or block (moves to trash)
curl -X DELETE ""
# Restore from trash (set archived to false)
curl -X PATCH "" -d '{"archived": false}'
Property Types
| Type | Format |
| Title | {"title": [{"text": {"content": "..."}}]} |
| Text | {"rich_text": [{"text": {"content": "..."}}]} |
| Select | {"select": {"name": "Option"}} |
| Multi-select | {"multi_select": [{"name": "A"}]} |
| Date | {"date": {"start": "2024-01-15"}} |
| Checkbox | {"checkbox": true} |
| Number | {"number": 42} |
| URL | {"url": ""} |
2025-09-03 API Notes
- Databases = "data sources" in API
- Use
data_source_idfor both creating pages and querying - Get
data_source_idfrom search results (theidfield) - Rate limit: ~3 req/sec