[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FGXT8GVB45H2785MWVVT01":3,"skill-same:01M6FGXT8GVB45H2785MWVVT01":89},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":27,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":62,"install":63,"resources":76},"01M6FGXT8GVB45H2785MWVVT01","notion",null,"Notion API integration with managed OAuth. Query databases, create and update pages, manage blocks. Use this skill when users want to interact with Notion workspaces, databases, or pages. For other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fbyungkyu\u002Fnotion-api-skill\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[5,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"apps","clawhub","pages","gateway skill","query","maton","notion api","api integration","manage","workspaces","databases","access","api","api-gateway","network","gateway","update","create","valid","2026-11-10 10:12:30",false,"---\nname: notion\ndescription: |\n  Notion API integration with managed OAuth. Query databases, create and update pages, manage blocks. Use this skill when users want to interact with Notion workspaces, databases, or pages. For other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\ncompatibility: Requires network access and valid Maton API key\nmetadata:\n  author: maton\n  version: \"1.0\"\n---\n\n# Notion\n\nAccess the Notion API with managed OAuth authentication. Query databases, create pages, manage blocks, and search your workspace.\n\n## Quick Start\n\n```bash\n# Search for pages\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'query': 'meeting notes'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fnotion\u002Fv1\u002Fsearch', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nreq.add_header('Notion-Version', '2025-09-03')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n## Base URL\n\n```\nhttps:\u002F\u002Fgateway.maton.ai\u002Fnotion\u002F{native-api-path}\n```\n\nReplace `{native-api-path}` with the actual Notion API endpoint path. The gateway proxies requests to `api.notion.com` and automatically injects your OAuth token.\n\n## Required Headers\n\nAll Notion API requests require the version header:\n\n```\nNotion-Version: 2025-09-03\n```\n\n## Authentication\n\nAll requests require the Maton API key in the Authorization header:\n\n```\nAuthorization: Bearer $MATON_API_KEY\n```\n\n**Environment Variable:** Set your API key as `MATON_API_KEY`:\n\n```bash\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n```\n\n### Getting Your API Key\n\n1. Sign in or create an account at [maton.ai](https:\u002F\u002Fmaton.ai)\n2. Go to [maton.ai\u002Fsettings](https:\u002F\u002Fmaton.ai\u002Fsettings)\n3. Copy your API key\n\n## Connection Management\n\nManage your Notion OAuth connections at `https:\u002F\u002Fctrl.maton.ai`.\n\n### List Connections\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections?app=notion&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Create Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'notion'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Get Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"connection\": {\n    \"connection_id\": \"21fd90f9-5935-43cd-b6c8-bde9d915ca80\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2025-12-08T07:20:53.488460Z\",\n    \"last_updated_time\": \"2026-01-31T20:03:32.593153Z\",\n    \"url\": \"https:\u002F\u002Fconnect.maton.ai\u002F?session_token=...\",\n    \"app\": \"notion\",\n    \"metadata\": {}\n  }\n}\n```\n\nOpen the returned `url` in a browser to complete OAuth authorization.\n\n### Delete Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Specifying Connection\n\nIf you have multiple Notion connections, specify which one to use with the `Maton-Connection` header:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'query': 'meeting notes'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fnotion\u002Fv1\u002Fsearch', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nreq.add_header('Notion-Version', '2025-09-03')\nreq.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\n## Key Concept: Databases vs Data Sources\n\nIn API version 2025-09-03, databases and data sources are separate:\n\n| Concept | Use For |\n|---------|---------|\n| **Database** | Creating databases, getting data source IDs |\n| **Data Source** | Querying, updating schema, updating properties |\n\nUse `GET \u002Fdatabases\u002F{id}` to get the `data_sources` array, then use `\u002Fdata_sources\u002F` endpoints:\n\n```json\n{\n  \"object\": \"database\",\n  \"id\": \"abc123\",\n  \"data_sources\": [\n    {\"id\": \"def456\", \"name\": \"My Database\"}\n  ]\n}\n```\n\n## API Reference\n\n### Search\n\nSearch for pages:\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fsearch\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"query\": \"meeting notes\",\n  \"filter\": {\"property\": \"object\", \"value\": \"page\"}\n}\n```\n\nSearch for data sources:\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fsearch\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"filter\": {\"property\": \"object\", \"value\": \"data_source\"}\n}\n```\n\n### Data Sources\n\n#### Get Data Source\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fdata_sources\u002F{dataSourceId}\nNotion-Version: 2025-09-03\n```\n\n#### Query Data Source\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fdata_sources\u002F{dataSourceId}\u002Fquery\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"filter\": {\n    \"property\": \"Status\",\n    \"select\": {\"equals\": \"Active\"}\n  },\n  \"sorts\": [\n    {\"property\": \"Created\", \"direction\": \"descending\"}\n  ],\n  \"page_size\": 100\n}\n```\n\n#### Update Data Source\n\n```bash\nPATCH \u002Fnotion\u002Fv1\u002Fdata_sources\u002F{dataSourceId}\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"title\": [{\"type\": \"text\", \"text\": {\"content\": \"Updated Title\"}}],\n  \"properties\": {\n    \"NewColumn\": {\"rich_text\": {}}\n  }\n}\n```\n\n### Databases\n\n#### Get Database\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fdatabases\u002F{databaseId}\nNotion-Version: 2025-09-03\n```\n\n#### Create Database\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fdatabases\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"parent\": {\"type\": \"page_id\", \"page_id\": \"PARENT_PAGE_ID\"},\n  \"title\": [{\"type\": \"text\", \"text\": {\"content\": \"New Database\"}}],\n  \"properties\": {\n    \"Name\": {\"title\": {}},\n    \"Status\": {\"select\": {\"options\": [{\"name\": \"Active\"}, {\"name\": \"Done\"}]}}\n  }\n}\n```\n\n### Pages\n\n#### Get Page\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fpages\u002F{pageId}\nNotion-Version: 2025-09-03\n```\n\n#### Create Page\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fpages\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"parent\": {\"page_id\": \"PARENT_PAGE_ID\"},\n  \"properties\": {\n    \"title\": {\"title\": [{\"text\": {\"content\": \"New Page\"}}]}\n  }\n}\n```\n\n#### Create Page in Data Source\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fpages\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"parent\": {\"data_source_id\": \"DATA_SOURCE_ID\"},\n  \"properties\": {\n    \"Name\": {\"title\": [{\"text\": {\"content\": \"New Page\"}}]},\n    \"Status\": {\"select\": {\"name\": \"Active\"}}\n  }\n}\n```\n\n#### Update Page Properties\n\n```bash\nPATCH \u002Fnotion\u002Fv1\u002Fpages\u002F{pageId}\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"properties\": {\n    \"Status\": {\"select\": {\"name\": \"Done\"}}\n  }\n}\n```\n\n#### Update Page Icon\n\n```bash\nPATCH \u002Fnotion\u002Fv1\u002Fpages\u002F{pageId}\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"icon\": {\"type\": \"emoji\", \"emoji\": \"?\"}\n}\n```\n\n#### Archive Page\n\n```bash\nPATCH \u002Fnotion\u002Fv1\u002Fpages\u002F{pageId}\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"archived\": true\n}\n```\n\n### Blocks\n\n#### Get Block Children\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fblocks\u002F{blockId}\u002Fchildren\nNotion-Version: 2025-09-03\n```\n\n#### Append Block Children\n\n```bash\nPATCH \u002Fnotion\u002Fv1\u002Fblocks\u002F{blockId}\u002Fchildren\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"children\": [\n    {\n      \"object\": \"block\",\n      \"type\": \"paragraph\",\n      \"paragraph\": {\n        \"rich_text\": [{\"type\": \"text\", \"text\": {\"content\": \"New paragraph\"}}]\n      }\n    }\n  ]\n}\n```\n\n#### Delete Block\n\n```bash\nDELETE \u002Fnotion\u002Fv1\u002Fblocks\u002F{blockId}\nNotion-Version: 2025-09-03\n```\n\n### Users\n\n#### List Users\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fusers\nNotion-Version: 2025-09-03\n```\n\n#### Get Current User\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fusers\u002Fme\nNotion-Version: 2025-09-03\n```\n\n## Filter Operators\n\n- `equals`, `does_not_equal`\n- `contains`, `does_not_contain`\n- `starts_with`, `ends_with`\n- `is_empty`, `is_not_empty`\n- `greater_than`, `less_than`\n\n## Block Types\n\n- `paragraph`, `heading_1`, `heading_2`, `heading_3`\n- `bulleted_list_item`, `numbered_list_item`\n- `to_do`, `code`, `quote`, `divider`\n\n## Code Examples\n\n### JavaScript\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fgateway.maton.ai\u002Fnotion\u002Fv1\u002Fsearch', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application\u002Fjson',\n    'Authorization': `Bearer ${process.env.MATON_API_KEY}`,\n    'Notion-Version': '2025-09-03'\n  },\n  body: JSON.stringify({ query: 'meeting' })\n});\n```\n\n### Python\n\n```python\nimport os\nimport requests\n\nresponse = requests.post(\n    'https:\u002F\u002Fgateway.maton.ai\u002Fnotion\u002Fv1\u002Fsearch',\n    headers={\n        'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}',\n        'Notion-Version': '2025-09-03'\n    },\n    json={'query': 'meeting'}\n)\n```\n\n## Notes\n\n- All IDs are UUIDs (with or without hyphens)\n- Use `GET \u002Fdatabases\u002F{id}` to get the `data_sources` array containing data source IDs\n- Creating databases requires `POST \u002Fdatabases` endpoint\n- Delete blocks returns the block with `archived: true`\n- IMPORTANT: When using curl commands, use `curl -g` when URLs contain brackets (`fields[]`, `sort[]`, `records[]`) to disable glob parsing\n- IMPORTANT: When piping curl output to `jq` or other commands, environment variables like `$MATON_API_KEY` may not expand correctly in some shell environments. You may get \"Invalid API key\" errors when piping.\n\n## Error Handling\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Missing Notion connection |\n| 401 | Invalid or missing Maton API key |\n| 429 | Rate limited (10 req\u002Fsec per account) |\n| 4xx\u002F5xx | Passthrough error from Notion API |\n\n### Troubleshooting: Invalid API Key\n\n**When you receive a \"Invalid API key\" error, ALWAYS follow these steps before concluding there is an issue:**\n\n1. Check that the `MATON_API_KEY` environment variable is set:\n\n```bash\necho $MATON_API_KEY\n```\n\n2. Verify the API key is valid by listing connections:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n## Resources\n\n- [Notion API Introduction](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fintro)\n- [Search](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpost-search.md)\n- [Query Database](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpost-database-query.md)\n- [Get Page](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fretrieve-a-page.md)\n- [Create Page](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpost-page.md)\n- [Update Page](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpatch-page.md)\n- [Append Block Children](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpatch-block-children.md)\n- [Filter Reference](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpost-database-query-filter.md)\n- [LLM Reference](https:\u002F\u002Fdevelopers.notion.com\u002Fllms.txt)\n","# Notion\n\nAccess the Notion API with managed OAuth authentication. Query databases, create pages, manage blocks, and search your workspace.\n\n## Quick Start\n\n```bash\n# Search for pages\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'query': 'meeting notes'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fnotion\u002Fv1\u002Fsearch', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nreq.add_header('Notion-Version', '2025-09-03')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n## Base URL\n\n```\nhttps:\u002F\u002Fgateway.maton.ai\u002Fnotion\u002F{native-api-path}\n```\n\nReplace `{native-api-path}` with the actual Notion API endpoint path. The gateway proxies requests to `api.notion.com` and automatically injects your OAuth token.\n\n## Required Headers\n\nAll Notion API requests require the version header:\n\n```\nNotion-Version: 2025-09-03\n```\n\n## Authentication\n\nAll requests require the Maton API key in the Authorization header:\n\n```\nAuthorization: Bearer $MATON_API_KEY\n```\n\n**Environment Variable:** Set your API key as `MATON_API_KEY`:\n\n```bash\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n```\n\n### Getting Your API Key\n\n1. Sign in or create an account at [maton.ai](https:\u002F\u002Fmaton.ai)\n2. Go to [maton.ai\u002Fsettings](https:\u002F\u002Fmaton.ai\u002Fsettings)\n3. Copy your API key\n\n## Connection Management\n\nManage your Notion OAuth connections at `https:\u002F\u002Fctrl.maton.ai`.\n\n### List Connections\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections?app=notion&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Create Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'notion'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Get Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"connection\": {\n    \"connection_id\": \"21fd90f9-5935-43cd-b6c8-bde9d915ca80\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2025-12-08T07:20:53.488460Z\",\n    \"last_updated_time\": \"2026-01-31T20:03:32.593153Z\",\n    \"url\": \"https:\u002F\u002Fconnect.maton.ai\u002F?session_token=...\",\n    \"app\": \"notion\",\n    \"metadata\": {}\n  }\n}\n```\n\nOpen the returned `url` in a browser to complete OAuth authorization.\n\n### Delete Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Specifying Connection\n\nIf you have multiple Notion connections, specify which one to use with the `Maton-Connection` header:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'query': 'meeting notes'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fnotion\u002Fv1\u002Fsearch', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nreq.add_header('Notion-Version', '2025-09-03')\nreq.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\n## Key Concept: Databases vs Data Sources\n\nIn API version 2025-09-03, databases and data sources are separate:\n\n| Concept | Use For |\n|---------|---------|\n| **Database** | Creating databases, getting data source IDs |\n| **Data Source** | Querying, updating schema, updating properties |\n\nUse `GET \u002Fdatabases\u002F{id}` to get the `data_sources` array, then use `\u002Fdata_sources\u002F` endpoints:\n\n```json\n{\n  \"object\": \"database\",\n  \"id\": \"abc123\",\n  \"data_sources\": [\n    {\"id\": \"def456\", \"name\": \"My Database\"}\n  ]\n}\n```\n\n## API Reference\n\n### Search\n\nSearch for pages:\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fsearch\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"query\": \"meeting notes\",\n  \"filter\": {\"property\": \"object\", \"value\": \"page\"}\n}\n```\n\nSearch for data sources:\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fsearch\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"filter\": {\"property\": \"object\", \"value\": \"data_source\"}\n}\n```\n\n### Data Sources\n\n#### Get Data Source\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fdata_sources\u002F{dataSourceId}\nNotion-Version: 2025-09-03\n```\n\n#### Query Data Source\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fdata_sources\u002F{dataSourceId}\u002Fquery\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"filter\": {\n    \"property\": \"Status\",\n    \"select\": {\"equals\": \"Active\"}\n  },\n  \"sorts\": [\n    {\"property\": \"Created\", \"direction\": \"descending\"}\n  ],\n  \"page_size\": 100\n}\n```\n\n#### Update Data Source\n\n```bash\nPATCH \u002Fnotion\u002Fv1\u002Fdata_sources\u002F{dataSourceId}\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"title\": [{\"type\": \"text\", \"text\": {\"content\": \"Updated Title\"}}],\n  \"properties\": {\n    \"NewColumn\": {\"rich_text\": {}}\n  }\n}\n```\n\n### Databases\n\n#### Get Database\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fdatabases\u002F{databaseId}\nNotion-Version: 2025-09-03\n```\n\n#### Create Database\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fdatabases\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"parent\": {\"type\": \"page_id\", \"page_id\": \"PARENT_PAGE_ID\"},\n  \"title\": [{\"type\": \"text\", \"text\": {\"content\": \"New Database\"}}],\n  \"properties\": {\n    \"Name\": {\"title\": {}},\n    \"Status\": {\"select\": {\"options\": [{\"name\": \"Active\"}, {\"name\": \"Done\"}]}}\n  }\n}\n```\n\n### Pages\n\n#### Get Page\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fpages\u002F{pageId}\nNotion-Version: 2025-09-03\n```\n\n#### Create Page\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fpages\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"parent\": {\"page_id\": \"PARENT_PAGE_ID\"},\n  \"properties\": {\n    \"title\": {\"title\": [{\"text\": {\"content\": \"New Page\"}}]}\n  }\n}\n```\n\n#### Create Page in Data Source\n\n```bash\nPOST \u002Fnotion\u002Fv1\u002Fpages\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"parent\": {\"data_source_id\": \"DATA_SOURCE_ID\"},\n  \"properties\": {\n    \"Name\": {\"title\": [{\"text\": {\"content\": \"New Page\"}}]},\n    \"Status\": {\"select\": {\"name\": \"Active\"}}\n  }\n}\n```\n\n#### Update Page Properties\n\n```bash\nPATCH \u002Fnotion\u002Fv1\u002Fpages\u002F{pageId}\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"properties\": {\n    \"Status\": {\"select\": {\"name\": \"Done\"}}\n  }\n}\n```\n\n#### Update Page Icon\n\n```bash\nPATCH \u002Fnotion\u002Fv1\u002Fpages\u002F{pageId}\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"icon\": {\"type\": \"emoji\", \"emoji\": \"?\"}\n}\n```\n\n#### Archive Page\n\n```bash\nPATCH \u002Fnotion\u002Fv1\u002Fpages\u002F{pageId}\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"archived\": true\n}\n```\n\n### Blocks\n\n#### Get Block Children\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fblocks\u002F{blockId}\u002Fchildren\nNotion-Version: 2025-09-03\n```\n\n#### Append Block Children\n\n```bash\nPATCH \u002Fnotion\u002Fv1\u002Fblocks\u002F{blockId}\u002Fchildren\nContent-Type: application\u002Fjson\nNotion-Version: 2025-09-03\n\n{\n  \"children\": [\n    {\n      \"object\": \"block\",\n      \"type\": \"paragraph\",\n      \"paragraph\": {\n        \"rich_text\": [{\"type\": \"text\", \"text\": {\"content\": \"New paragraph\"}}]\n      }\n    }\n  ]\n}\n```\n\n#### Delete Block\n\n```bash\nDELETE \u002Fnotion\u002Fv1\u002Fblocks\u002F{blockId}\nNotion-Version: 2025-09-03\n```\n\n### Users\n\n#### List Users\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fusers\nNotion-Version: 2025-09-03\n```\n\n#### Get Current User\n\n```bash\nGET \u002Fnotion\u002Fv1\u002Fusers\u002Fme\nNotion-Version: 2025-09-03\n```\n\n## Filter Operators\n\n- `equals`, `does_not_equal`\n- `contains`, `does_not_contain`\n- `starts_with`, `ends_with`\n- `is_empty`, `is_not_empty`\n- `greater_than`, `less_than`\n\n## Block Types\n\n- `paragraph`, `heading_1`, `heading_2`, `heading_3`\n- `bulleted_list_item`, `numbered_list_item`\n- `to_do`, `code`, `quote`, `divider`\n\n## Code Examples\n\n### JavaScript\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fgateway.maton.ai\u002Fnotion\u002Fv1\u002Fsearch', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application\u002Fjson',\n    'Authorization': `Bearer ${process.env.MATON_API_KEY}`,\n    'Notion-Version': '2025-09-03'\n  },\n  body: JSON.stringify({ query: 'meeting' })\n});\n```\n\n### Python\n\n```python\nimport os\nimport requests\n\nresponse = requests.post(\n    'https:\u002F\u002Fgateway.maton.ai\u002Fnotion\u002Fv1\u002Fsearch',\n    headers={\n        'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}',\n        'Notion-Version': '2025-09-03'\n    },\n    json={'query': 'meeting'}\n)\n```\n\n## Notes\n\n- All IDs are UUIDs (with or without hyphens)\n- Use `GET \u002Fdatabases\u002F{id}` to get the `data_sources` array containing data source IDs\n- Creating databases requires `POST \u002Fdatabases` endpoint\n- Delete blocks returns the block with `archived: true`\n- IMPORTANT: When using curl commands, use `curl -g` when URLs contain brackets (`fields[]`, `sort[]`, `records[]`) to disable glob parsing\n- IMPORTANT: When piping curl output to `jq` or other commands, environment variables like `$MATON_API_KEY` may not expand correctly in some shell environments. You may get \"Invalid API key\" errors when piping.\n\n## Error Handling\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Missing Notion connection |\n| 401 | Invalid or missing Maton API key |\n| 429 | Rate limited (10 req\u002Fsec per account) |\n| 4xx\u002F5xx | Passthrough error from Notion API |\n\n### Troubleshooting: Invalid API Key\n\n**When you receive a \"Invalid API key\" error, ALWAYS follow these steps before concluding there is an issue:**\n\n1. Check that the `MATON_API_KEY` environment variable is set:\n\n```bash\necho $MATON_API_KEY\n```\n\n2. Verify the API key is valid by listing connections:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n## Resources\n\n- [Notion API Introduction](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fintro)\n- [Search](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpost-search.md)\n- [Query Database](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpost-database-query.md)\n- [Get Page](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fretrieve-a-page.md)\n- [Create Page](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpost-page.md)\n- [Update Page](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpatch-page.md)\n- [Append Block Children](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpatch-block-children.md)\n- [Filter Reference](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fpost-database-query-filter.md)\n- [LLM Reference](https:\u002F\u002Fdevelopers.notion.com\u002Fllms.txt)\n",{"name":5,"metadata":52,"description":54,"compatibility":55},{"author":33,"version":53},"1.0","Notion API integration with managed OAuth. Query databases, create and update pages, manage blocks. Use this skill when users want to interact with Notion workspaces, databases, or pages. For other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\n","Requires network access and valid Maton API key","main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fbyungkyu\u002Fnotion-api-skill",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add kbarbel640-del\u002Fskills --skill notion",{"tool":69,"command":70},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill notion",{"tool":72,"command":73},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill notion","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fbyungkyu\u002Fnotion-api-skill\u002FSKILL.md",true,[77,83],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"_meta.json","REFERENCE","参考文档",630,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fbyungkyu\u002Fnotion-api-skill\u002F_meta.json",{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"LICENSE.txt","LICENSE","许可证",1072,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fbyungkyu\u002Fnotion-api-skill\u002FLICENSE.txt",[90,118,144,165,171,191],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":99,"publishedAt":47},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[96],{"categoryNo":97,"categoryName":98,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000036","内容创作者",[100,101,40,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117],"crowd prompting","prompting","with","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":127,"publishedAt":47},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[124],{"categoryNo":125,"categoryName":126,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[128,40,129,130,131,132,45,133,134,135,136,137,138,139,140,141,142,106,143],"dilemm ai","arena","analyze","browser","openclaw agent","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":153,"publishedAt":47},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[150],{"categoryNo":151,"categoryName":152,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000021","资料检索与研究",[154,155,156,157,158,159,160,102,161,141,143,162,40,163,164],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":166,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":170,"publishedAt":47},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[169],{"categoryNo":151,"categoryName":152,"taxonomyType":20,"taxonomyTypeDesc":21},[157,156,155,154,164,159,160,102,158,141,143,161,162,40,163],{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":47},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[178,179,180,181,182,183,184,185,186,187,188,189,190],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":201,"publishedAt":47},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[197,198],{"categoryNo":125,"categoryName":126,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":199,"categoryName":200,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000037","律师与法务",[202,203,204,205,102,32,206,56,207,162,208,209,210,211,212,115,213,214,215],"agent constitution","constitution","contracts","tree","base","log","check","Rules","projects","compliance","actions","state","governance","github"]