Notion
Read and write Notion pages, databases, and blocks via the Notion API.
- Use
http_requestwithAuthorization: Bearer <NOTION_API_KEY>andNotion-Version: 2022-06-28headers for all API calls. - Base URL:
https://api.notion.com/v1 - Search pages/databases:
POST /searchwith{"query": "...", "filter": {"value": "page", "property": "object"}} - Read a page:
GET /pages/{page_id} - Read page content (blocks):
GET /blocks/{page_id}/children - Create a page:
POST /pageswith{"parent": {"database_id": "..."}, "properties": {...}, "children": [...]} - Append blocks:
PATCH /blocks/{page_id}/childrenwith{"children": [{"type": "paragraph", "paragraph": {"rich_text": [{"text": {"content": "..."}}]}}]} - Update a page property:
PATCH /pages/{page_id}with{"properties": {...}} - Store frequently-accessed page IDs and database IDs in memory for reuse.
- When creating rich content, use
calloutblocks for summaries andtoggleblocks for expandable details.