← 返回
开发者工具 Key 中文

Notion API Integration

Complete Notion API for databases, pages, blocks, users, search, comments, and property types with pagination and error handling.
完整的 Notion API,覆盖数据库、页面、块、用户、搜索、评论及属性类型,具备分页和错误处理功能。
ivangdavila
开发者工具 clawhub v1.0.2 1 版本 100000 Key: 需要
★ 0
Stars
📥 966
下载
💾 38
安装
1
版本
#latest

概述

Notion API Integration

Complete Notion API reference. See auxiliary files for detailed operations.

Quick Start

curl 'https://api.notion.com/v1/users/me' \
  -H "Authorization: Bearer $NOTION_API_KEY" \
  -H "Notion-Version: 2022-06-28"

Setup

On first use, read setup.md. Preferences stored in ~/notion-api-integration/memory.md.

When to Use

Any Notion operation: databases, pages, blocks, users, search, comments, properties.

Architecture

~/notion-api-integration/
├── memory.md      # Workspace context
└── databases.md   # Tracked database IDs

Quick Reference

TopicFile
-------------
Setup and memorysetup.md, memory-template.md
Databases: query, create, updatedatabases.md
Pages: CRUD, propertiespages.md
Blocks: content, childrenblocks.md
Property types referenceproperties.md
Filters and sortsfilters.md
Search and userssearch.md
Pagination patternspagination.md
Error handlingerrors.md

Core Rules

  1. API version header required - Always include Notion-Version: 2022-06-28 (or newer)
  2. Bearer token auth - Authorization: Bearer $NOTION_API_KEY
  3. Page IDs without dashes - Remove dashes from URLs: abc123def456 not abc-123-def-456
  4. Property names are case-sensitive - Match exactly as defined in database
  5. Pagination mandatory - Use start_cursor for results over 100 items
  6. Rate limits - 3 requests/second average, burst allowed
  7. Integration access - Pages must be shared with integration to access

Authentication

Required environment variable:

  • NOTION_API_KEY - Internal integration token (starts with ntn_ or secret_)
# All requests require these headers
curl 'https://api.notion.com/v1/...' \
  -H "Authorization: Bearer $NOTION_API_KEY" \
  -H "Notion-Version: 2022-06-28" \
  -H "Content-Type: application/json"

Common Traps

  • Missing Notion-Version header - 400 error
  • Page ID with dashes - 404 not found
  • Property name mismatch - Silent failure or error
  • Skipping pagination - Miss data beyond first 100
  • No integration access - 404 even if page exists

External Endpoints

EndpointPurpose
-------------------
https://api.notion.com/v1/*All Notion API operations

No other endpoints are accessed.

Security & Privacy

Environment variable used:

  • NOTION_API_KEY - for API authentication

Sent to Notion: Database queries, page content, block updates via api.notion.com

Stays local: API key (in environment variable only), ~/notion-api-integration/ preferences

Never: Store API keys in files, access pages not shared with integration

Scope

This skill ONLY:

  • Makes requests to api.notion.com endpoints
  • Stores preferences in ~/notion-api-integration/
  • Provides curl and code examples

This skill NEVER:

  • Accesses files outside ~/notion-api-integration/
  • Makes requests to other endpoints
  • Stores API keys in files

Trust

By using this skill, data is sent to Notion (notion.com).

Only install if you trust Notion with your workspace data.

Related Skills

Install with clawhub install if user confirms:

  • api — REST API patterns
  • pkm — Personal knowledge management
  • productivity — Task and productivity workflows

Feedback

  • If useful: clawhub star notion-api-integration
  • Stay updated: clawhub sync

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-29 10:13 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 66 📥 179,904
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,351 📥 317,804
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,874