Notion
API actions for the Notion integration.
Notion
Connect to Notion to search content, query databases, and manage pages.
Append block children
Append child blocks to an existing Notion page or block.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | Block or page ID. To append to a page, use the page ID from create_page or retrieve_page. |
children | array | Yes | Block objects to append. Each block must have a 'type' field and a corresponding object with that type name containing 'rich_text' array. |
Response
{
"appended": 3,
"has_more": false,
"next_cursor": null,
"status": "success"
}Create page in database
Create a new page within a Notion database with optional children blocks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
parent_database_id | string | Yes | Parent database ID. Use the list_databases action first to retrieve available database IDs. |
title | string | Yes | Page title. |
properties | object | No | Additional page properties. |
children | array | No | Child blocks to append. Each block must have a 'type' field and a corresponding object with that type name containing 'rich_text' array. |
title_property | string | No | Title property name. |
Response
{
"id": "n7m8l9k0j1i2",
"status": "success",
"title": "New Page",
"url": "https://www.notion.so/New-Page-n7m8l9k0j1i2"
}List databases
List accessible Notion databases with pagination and optional search query.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | No | Search query. |
page_size | number | No | Number of results to return. |
start_cursor | string | No | Pagination cursor. |
Response
{
"count": 1,
"databases": [
{
"id": "x9y8z7w6v5u4",
"name": "Tasks Database",
"url": "https://www.notion.so/Tasks-Database-x9y8z7w6v5u4"
}
],
"has_more": false,
"next_cursor": null,
"status": "success"
}Query database
Run a filtered query against a Notion database.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
database_id | string | Yes | Database ID. |
filter | object | No | Notion filter object. |
sorts | array | No | Sort definitions. |
page_size | number | No | Number of results to return. |
start_cursor | string | No | Pagination cursor. |
Response
{
"count": 1,
"has_more": false,
"next_cursor": null,
"results": [
{
"id": "p1q2r3s4t5u6",
"last_edited_time": "2024-01-15T14:20:00.000Z",
"properties": {
"Name": "Task 1",
"Status": "In Progress"
},
"title": "Task 1",
"url": "https://www.notion.so/Task-1-p1q2r3s4t5u6"
}
],
"status": "success"
}Retrieve page details
Retrieve a single Notion page and return simplified metadata.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page_id | string | Yes | Notion page ID. |
Response
{
"archived": false,
"id": "a1b2c3d4e5f6",
"last_edited_time": "2024-01-15T10:30:00.000Z",
"properties": {
"Name": "Meeting Notes",
"Status": "Complete"
},
"status": "success",
"title": "Meeting Notes",
"url": "https://www.notion.so/Meeting-Notes-a1b2c3d4e5f6"
}Search pages
Search for Notion pages using a text query with pagination support.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query. |
page_size | number | No | Number of results to return. |
start_cursor | string | No | Pagination cursor. |
Response
{
"count": 1,
"has_more": false,
"next_cursor": null,
"pages": [
{
"id": "a1b2c3d4e5f6",
"last_edited_time": "2024-01-15T10:30:00.000Z",
"title": "Project Planning",
"url": "https://www.notion.so/Project-Planning-a1b2c3d4e5f6"
}
],
"status": "success"
}Update page properties
Update properties on an existing Notion page.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page_id | string | Yes | Notion page ID. |
properties | object | Yes | Properties to update, in Notion API format. |
Response
{
"id": "a1b2c3d4e5f6",
"last_edited_time": "2024-01-15T10:30:00.000Z",
"status": "success",
"title": "Updated Page",
"url": "https://www.notion.so/Updated-Page-a1b2c3d4e5f6"
}