notion-api
This skill should be used when the user asks to "search Notion", "find in Notion", "search my Notion workspace", "create Notion page", "make a Notion page", "update Notion page", "edit Notion page", "query Notion database", "get Notion database", "read Notion page", "get page content from Notion", "list Notion pages", or mentions Notion integration, Notion workspace, or Notion API access.
Best use case
notion-api is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. This skill should be used when the user asks to "search Notion", "find in Notion", "search my Notion workspace", "create Notion page", "make a Notion page", "update Notion page", "edit Notion page", "query Notion database", "get Notion database", "read Notion page", "get page content from Notion", "list Notion pages", or mentions Notion integration, Notion workspace, or Notion API access.
This skill should be used when the user asks to "search Notion", "find in Notion", "search my Notion workspace", "create Notion page", "make a Notion page", "update Notion page", "edit Notion page", "query Notion database", "get Notion database", "read Notion page", "get page content from Notion", "list Notion pages", or mentions Notion integration, Notion workspace, or Notion API access.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "notion-api" skill to help with this workflow task. Context: This skill should be used when the user asks to "search Notion", "find in Notion", "search my Notion workspace", "create Notion page", "make a Notion page", "update Notion page", "edit Notion page", "query Notion database", "get Notion database", "read Notion page", "get page content from Notion", "list Notion pages", or mentions Notion integration, Notion workspace, or Notion API access.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/notion-api/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How notion-api Compares
| Feature / Agent | notion-api | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This skill should be used when the user asks to "search Notion", "find in Notion", "search my Notion workspace", "create Notion page", "make a Notion page", "update Notion page", "edit Notion page", "query Notion database", "get Notion database", "read Notion page", "get page content from Notion", "list Notion pages", or mentions Notion integration, Notion workspace, or Notion API access.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Notion API Integration
Access Notion pages, databases, and content through TypeScript scripts executed via Bun.
## Overview
This skill provides access to the Notion API for:
- **Search**: Find pages and databases across your workspace
- **Pages**: Get, create, and update pages
- **Databases**: Query database entries with filters and sorting
- **Blocks**: Read page content as blocks
All scripts return JSON and require a `NOTION_TOKEN` environment variable.
## Response Format
All scripts output JSON with a consistent structure:
### Success
```json
{"status": "success", "data": {...}}
```
### Authentication Required
```json
{
"status": "auth_required",
"message": "Set NOTION_TOKEN environment variable with your integration token...",
"setupUrl": "https://www.notion.so/my-integrations"
}
```
When you receive `auth_required`, display to the user:
```
To access Notion, you need to set up an integration:
1. Go to: https://www.notion.so/my-integrations
2. Create a new integration for your workspace
3. Copy the "Internal Integration Secret"
4. Set the NOTION_TOKEN environment variable with this token
5. Share your pages/databases with the integration (click "..." menu > "Add connections")
Let me know when you've completed setup.
```
### Error
```json
{"status": "error", "error": "Error description"}
```
## Search
Search for pages and databases across your Notion workspace.
All scripts are located at `${CLAUDE_PLUGIN_ROOT}/skills/notion/scripts/`.
```bash
# Search for pages/databases matching a query
bun run ${CLAUDE_PLUGIN_ROOT}/skills/notion/scripts/search.ts --query "meeting notes"
# Search only pages
bun run search.ts --query "project" --filter page
# Search only databases
bun run search.ts --filter database --top 20
# List all accessible items (no query)
bun run search.ts --top 10
```
## Pages
Get, create, and update Notion pages.
### Get Page
```bash
bun run ${CLAUDE_PLUGIN_ROOT}/skills/notion/scripts/pages.ts get --id <page-id>
```
### Create Page
```bash
# Create as child of another page
bun run pages.ts create --parent-id <page-id> --title "New Page"
# Create as child of another page with icon
bun run pages.ts create --parent-id <page-id> --title "New Page" --icon "📝"
# Create as database entry
bun run pages.ts create --parent-id <database-id> --parent-type database --title "New Entry"
# Create database entry with properties
bun run pages.ts create --parent-id <db-id> --parent-type database --title "Task" \
--properties '{"Status": {"select": {"name": "To Do"}}, "Priority": {"select": {"name": "High"}}}'
```
### Update Page
```bash
# Update title
bun run pages.ts update --id <page-id> --title "Updated Title"
# Update icon
bun run pages.ts update --id <page-id> --icon "🎉"
# Archive page
bun run pages.ts update --id <page-id> --archived true
# Restore archived page
bun run pages.ts update --id <page-id> --archived false
# Update database page properties
bun run pages.ts update --id <page-id> --properties '{"Status": {"select": {"name": "Done"}}}'
```
## Databases
Query and get information about Notion databases.
### Get Database Schema
```bash
bun run ${CLAUDE_PLUGIN_ROOT}/skills/notion/scripts/databases.ts get --id <database-id>
```
Returns the database title, description, and all property definitions.
### Query Database
```bash
# Query all entries
bun run databases.ts query --id <database-id>
# Query with limit
bun run databases.ts query --id <db-id> --top 20
# Query with filter
bun run databases.ts query --id <db-id> --filter '{"property": "Status", "select": {"equals": "Done"}}'
# Query with multiple conditions (AND)
bun run databases.ts query --id <db-id> --filter '{"and": [
{"property": "Status", "select": {"equals": "In Progress"}},
{"property": "Priority", "select": {"equals": "High"}}
]}'
# Query with sorting
bun run databases.ts query --id <db-id> --sorts '[{"property": "Created", "direction": "descending"}]'
# Sort by last edited time
bun run databases.ts query --id <db-id> --sorts '[{"timestamp": "last_edited_time", "direction": "descending"}]'
```
### Common Filter Examples
```bash
# Text contains
--filter '{"property": "Name", "rich_text": {"contains": "project"}}'
# Checkbox is checked
--filter '{"property": "Done", "checkbox": {"equals": true}}'
# Date is after
--filter '{"property": "Due Date", "date": {"after": "2024-01-01"}}'
# Number greater than
--filter '{"property": "Score", "number": {"greater_than": 80}}'
# OR conditions
--filter '{"or": [
{"property": "Status", "select": {"equals": "Done"}},
{"property": "Status", "select": {"equals": "Archived"}}
]}'
```
## Blocks (Page Content)
Read page content as blocks.
### List Page Blocks
```bash
# Get blocks from a page
bun run ${CLAUDE_PLUGIN_ROOT}/skills/notion/scripts/blocks.ts list --id <page-id>
# Get blocks with limit
bun run blocks.ts list --id <page-id> --top 100
# Get blocks recursively (includes nested content)
bun run blocks.ts list --id <page-id> --recursive
```
### Get Specific Block
```bash
bun run blocks.ts get --id <block-id>
```
### Block Types
Blocks can be: paragraph, heading_1, heading_2, heading_3, bulleted_list_item, numbered_list_item, to_do, toggle, code, quote, callout, divider, table, image, bookmark, and more.
Each block includes:
- `id`: Block identifier
- `type`: Block type
- `content`: Text content (if applicable)
- `hasChildren`: Whether block has nested blocks
- `children`: Nested blocks (when using --recursive)
## Authentication Setup
1. Go to https://www.notion.so/my-integrations
2. Click "New integration"
3. Give it a name and select the workspace
4. Copy the "Internal Integration Secret"
5. Set the environment variable:
```bash
export NOTION_TOKEN=secret_xxxxx
```
6. Share pages/databases with the integration:
- Open the page or database in Notion
- Click the "..." menu in the top right
- Select "Add connections"
- Find and select your integration
## Important Notes
- **Sharing required**: Pages and databases must be shared with your integration before they can be accessed
- **Rate limits**: Notion API allows ~3 requests per second on average
- **Page IDs**: Can be found in the page URL (the 32-character string after the page name)
- **Database IDs**: Same format as page IDs, found in the database URL
## Script Reference
| Script | Purpose |
|--------|---------|
| `search.ts` | Search pages and databases across workspace |
| `pages.ts` | Get, create, update pages |
| `databases.ts` | Get database schema, query entries |
| `blocks.ts` | Read page content as blocks |
## Additional Resources
For detailed API reference, see:
- **`references/notion-api.md`** - Notion API endpoints and parametersRelated Skills
notion-template-business
Expert in building and selling Notion templates as a business - not just making templates, but building a sustainable digital product business. Covers template design, pricing, marketplaces, marketing, and scaling to real revenue. Use when: notion template, sell templates, digital product, notion business, gumroad.
notion-automation
Automate Notion tasks via Rube MCP (Composio): pages, databases, blocks, comments, users. Always search tools first for current schemas.
notion-spec-to-implementation
Turn Notion specs into implementation plans, tasks, and progress tracking; use when implementing PRDs/feature specs and creating Notion plans + tasks from them.
notion-research-documentation
Research across Notion and synthesize into structured documentation; use when gathering info from multiple Notion sources to produce briefs, comparisons, or reports with citations.
notion-meeting-intelligence
Prepare meeting materials with Notion context and Codex research; use when gathering context, drafting agendas/pre-reads, and tailoring materials to attendees.
notion-knowledge-capture
Capture conversations and decisions into structured Notion pages; use when turning chats/notes into wiki entries, how-tos, decisions, or FAQs with proper linking.
azure-quotas
Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".
raindrop-io
Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.
zlibrary-to-notebooklm
自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。
discover-skills
当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。
web-performance-seo
Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.
project-to-obsidian
将代码项目转换为 Obsidian 知识库。当用户提到 obsidian、项目文档、知识库、分析项目、转换项目 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入规则(默认到 00_Inbox/AI/、追加式、统一 Schema) 3. 执行 STEP 0: 使用 AskUserQuestion 询问用户确认 4. 用户确认后才开始 STEP 1 项目扫描 5. 严格按 STEP 0 → 1 → 2 → 3 → 4 顺序执行 【禁止行为】: - 禁止不读 SKILL.md 就开始分析项目 - 禁止跳过 STEP 0 用户确认 - 禁止直接在 30_Resources 创建(先到 00_Inbox/AI/) - 禁止自作主张决定输出位置