notion
Installation
SKILL.md
Notion Integration
Overview
Create, read, and update Notion pages and databases via the API.
Prerequisites
- Create an integration at https://www.notion.so/my-integrations
- Set
NOTION_API_KEYenvironment variable - Share target pages/databases with the integration
API Reference
Search
curl -s -X POST "https://api.notion.com/v1/search" \
-H "Authorization: Bearer $NOTION_API_KEY" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{"query": "Meeting Notes"}' \
| jq '.results[] | {id: .id, title: (.properties.title.title[0].plain_text // .properties.Name.title[0].plain_text // "untitled")}'
Read a page
curl -s "https://api.notion.com/v1/pages/<page-id>" \
-H "Authorization: Bearer $NOTION_API_KEY" \
-H "Notion-Version: 2022-06-28" | jq
Read page content (blocks)
curl -s "https://api.notion.com/v1/blocks/<page-id>/children" \
-H "Authorization: Bearer $NOTION_API_KEY" \
-H "Notion-Version: 2022-06-28" \
| jq '.results[] | {type: .type, text: (.paragraph.rich_text[0].plain_text // .heading_1.rich_text[0].plain_text // .heading_2.rich_text[0].plain_text // "")}'
Create a page
curl -s -X POST "https://api.notion.com/v1/pages" \
-H "Authorization: Bearer $NOTION_API_KEY" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{
"parent": {"page_id": "<parent-page-id>"},
"properties": {
"title": {"title": [{"text": {"content": "New Page Title"}}]}
},
"children": [
{"paragraph": {"rich_text": [{"text": {"content": "Page content here."}}]}}
]
}' | jq '.id'
Query a database
curl -s -X POST "https://api.notion.com/v1/databases/<db-id>/query" \
-H "Authorization: Bearer $NOTION_API_KEY" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{"filter": {"property": "Status", "select": {"equals": "In Progress"}}}' \
| jq '.results[] | {id: .id, name: .properties.Name.title[0].plain_text}'
Add item to database
curl -s -X POST "https://api.notion.com/v1/pages" \
-H "Authorization: Bearer $NOTION_API_KEY" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{
"parent": {"database_id": "<db-id>"},
"properties": {
"Name": {"title": [{"text": {"content": "New Item"}}]},
"Status": {"select": {"name": "To Do"}}
}
}'
Tips
- All page/database IDs are UUIDs — find them in Notion URLs
- API version header is required:
Notion-Version: 2022-06-28 - Integration must be shared with each page/database it accesses
- Use
jqto navigate the nested response structure - Rate limit: 3 requests/second per integration
Related skills
More from phuetz/code-buddy
blender
Blender 3D modeling, animation, and rendering automation via Python bpy scripting and CLI
19figma
Automate Figma design workflows via REST API, Plugin API, and MCP integration
3github
Interact with GitHub using the gh CLI for issues, PRs, CI runs, releases, and API queries
3gif-search
Search and download GIFs from Tenor and Giphy APIs
3ableton-live
Ableton Live music production automation via OSC protocol, MIDI, and Max for Live
3gitlab
GitLab DevOps platform with CI/CD pipelines, API automation, and glab CLI control
3