notion by steipete/clawdis
npx skills add https://github.com/steipete/clawdis --skill notion使用 Notion API 创建/读取/更新页面、数据源(数据库)和块。
ntn_ 或 secret_ 开头)mkdir -p ~/.config/notion
echo "ntn_your_key_here" > ~/.config/notion/api_key
4. 将目标页面/数据库与您的集成共享(点击"..." → "连接到" → 您的集成名称)
所有请求都需要:
NOTION_KEY=$(cat ~/.config/notion/api_key)
curl -X GET "https://api.notion.com/v1/..." \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json"
注意: 请求头是必需的。此技能使用 (最新版本)。在此版本中,数据库在 API 中被称为"数据源"。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Notion-Version2025-09-03搜索页面和数据源:
curl -X POST "https://api.notion.com/v1/search" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{"query": "page title"}'
获取页面:
curl "https://api.notion.com/v1/pages/{page_id}" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03"
获取页面内容(块):
curl "https://api.notion.com/v1/blocks/{page_id}/children" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03"
在数据源中创建页面:
curl -X POST "https://api.notion.com/v1/pages" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"parent": {"database_id": "xxx"},
"properties": {
"Name": {"title": [{"text": {"content": "New Item"}}]},
"Status": {"select": {"name": "Todo"}}
}
}'
查询数据源(数据库):
curl -X POST "https://api.notion.com/v1/data_sources/{data_source_id}/query" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"filter": {"property": "Status", "select": {"equals": "Active"}},
"sorts": [{"property": "Date", "direction": "descending"}]
}'
创建数据源(数据库):
curl -X POST "https://api.notion.com/v1/data_sources" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"parent": {"page_id": "xxx"},
"title": [{"text": {"content": "My Database"}}],
"properties": {
"Name": {"title": {}},
"Status": {"select": {"options": [{"name": "Todo"}, {"name": "Done"}]}},
"Date": {"date": {}}
}
}'
更新页面属性:
curl -X PATCH "https://api.notion.com/v1/pages/{page_id}" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{"properties": {"Status": {"select": {"name": "Done"}}}}'
向页面添加块:
curl -X PATCH "https://api.notion.com/v1/blocks/{page_id}/children" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"children": [
{"object": "block", "type": "paragraph", "paragraph": {"rich_text": [{"text": {"content": "Hello"}}]}}
]
}'
数据库项目的常见属性格式:
{"title": [{"text": {"content": "..."}}]}{"rich_text": [{"text": {"content": "..."}}]}{"select": {"name": "Option"}}{"multi_select": [{"name": "A"}, {"name": "B"}]}{"date": {"start": "2024-01-15", "end": "2024-01-16"}}{"checkbox": true}{"number": 42}{"url": "https://..."}{"email": "a@b.com"}{"relation": [{"id": "page_id"}]}/data_sources/ 端点进行查询和检索database_id 和 data_source_id
database_id(parent: {"database_id": "..."})data_source_id(POST /v1/data_sources/{id}/query)"object": "data_source" 形式返回,并附带其 data_source_idparent.data_source_id 和 parent.database_idGET /v1/data_sources/{data_source_id}429 rate_limited 响应时会使用 Retry-After 头is_inline: true 可将其嵌入页面中每周安装量
377
代码仓库
GitHub 星标数
334.4K
首次出现
2026 年 1 月 24 日
安全审计
安装于
codex343
opencode343
gemini-cli341
github-copilot336
kimi-cli333
amp331
Use the Notion API to create/read/update pages, data sources (databases), and blocks.
ntn_ or secret_)mkdir -p ~/.config/notion
echo "ntn_your_key_here" > ~/.config/notion/api_key
4. Share target pages/databases with your integration (click "..." → "Connect to" → your integration name)
All requests need:
NOTION_KEY=$(cat ~/.config/notion/api_key)
curl -X GET "https://api.notion.com/v1/..." \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json"
Note: The
Notion-Versionheader is required. This skill uses2025-09-03(latest). In this version, databases are called "data sources" in the API.
Search for pages and data sources:
curl -X POST "https://api.notion.com/v1/search" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{"query": "page title"}'
Get page:
curl "https://api.notion.com/v1/pages/{page_id}" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03"
Get page content (blocks):
curl "https://api.notion.com/v1/blocks/{page_id}/children" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03"
Create page in a data source:
curl -X POST "https://api.notion.com/v1/pages" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"parent": {"database_id": "xxx"},
"properties": {
"Name": {"title": [{"text": {"content": "New Item"}}]},
"Status": {"select": {"name": "Todo"}}
}
}'
Query a data source (database):
curl -X POST "https://api.notion.com/v1/data_sources/{data_source_id}/query" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"filter": {"property": "Status", "select": {"equals": "Active"}},
"sorts": [{"property": "Date", "direction": "descending"}]
}'
Create a data source (database):
curl -X POST "https://api.notion.com/v1/data_sources" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"parent": {"page_id": "xxx"},
"title": [{"text": {"content": "My Database"}}],
"properties": {
"Name": {"title": {}},
"Status": {"select": {"options": [{"name": "Todo"}, {"name": "Done"}]}},
"Date": {"date": {}}
}
}'
Update page properties:
curl -X PATCH "https://api.notion.com/v1/pages/{page_id}" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{"properties": {"Status": {"select": {"name": "Done"}}}}'
Add blocks to page:
curl -X PATCH "https://api.notion.com/v1/blocks/{page_id}/children" \
-H "Authorization: Bearer $NOTION_KEY" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d '{
"children": [
{"object": "block", "type": "paragraph", "paragraph": {"rich_text": [{"text": {"content": "Hello"}}]}}
]
}'
Common property formats for database items:
{"title": [{"text": {"content": "..."}}]}{"rich_text": [{"text": {"content": "..."}}]}{"select": {"name": "Option"}}{"multi_select": [{"name": "A"}, {"name": "B"}]}{"date": {"start": "2024-01-15", "end": "2024-01-16"}}{"checkbox": true}{"number": 42}/data_sources/ endpoints for queries and retrievaldatabase_id and a data_source_id
database_id when creating pages (parent: {"database_id": "..."})data_source_id when querying (POST /v1/data_sources/{id}/query)"object": "data_source" with their data_source_id429 rate_limited responses using Retry-Afteris_inline: true when creating data sources to embed them in pagesWeekly Installs
377
Repository
GitHub Stars
334.4K
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex343
opencode343
gemini-cli341
github-copilot336
kimi-cli333
amp331
xdrop 文件传输脚本:Bun 环境下安全上传下载工具,支持加密分享
20,700 周安装
智能代码探索工具smart-explore:AST解析结构化代码搜索与导航
297 周安装
GrepAI Ollama 本地安装配置教程 - 私有化代码搜索嵌入模型设置指南
297 周安装
YouTube 全功能工具包:转录、搜索、频道分析 API | TranscriptAPI.com 集成
297 周安装
Firebase AI Logic 入门指南:为移动和Web应用集成Gemini生成式AI
297 周安装
UX设计原则与可用性启发式指南 | 用户研究、设计思维、尼尔森十大原则
297 周安装
Claude AI记忆增强工具:/si:remember显式保存项目知识,提升开发效率
298 周安装
{"url": "https://..."}{"email": "a@b.com"}{"relation": [{"id": "page_id"}]}parent.data_source_id alongside parent.database_idGET /v1/data_sources/{data_source_id}