Skip to content

API Endpoints Reference

Fresh Complete list of Notion API endpoints.

Base URL

https://api.notion.com/v1

Authentication

All requests require:

http
Authorization: Bearer secret_xxxxxxxxxxxxx
Notion-Version: 2022-06-28
Content-Type: application/json

Endpoints Overview

Pages

MethodEndpointDescription
POST/pagesCreate a page
GET/pages/{page_id}Retrieve a page
PATCH/pages/{page_id}Update page properties

Create Page

http
POST /pages
json
{
  "parent": { "database_id": "xxx" },
  "properties": {
    "Name": {
      "title": [{ "text": { "content": "New Page" } }]
    }
  }
}

Retrieve Page

http
GET /pages/{page_id}

Query parameters:

  • filter_properties - Comma-separated property IDs to include

Update Page

http
PATCH /pages/{page_id}
json
{
  "properties": {
    "Status": { "select": { "name": "Done" } }
  }
}

Archive Page

http
PATCH /pages/{page_id}
json
{
  "archived": true
}

Databases

MethodEndpointDescription
POST/databasesCreate a database
GET/databases/{database_id}Retrieve database schema
PATCH/databases/{database_id}Update database schema
POST/databases/{database_id}/queryQuery database pages

Create Database

http
POST /databases
json
{
  "parent": { "page_id": "xxx" },
  "title": [{ "text": { "content": "Tasks" } }],
  "properties": {
    "Name": { "title": {} },
    "Status": {
      "select": {
        "options": [
          { "name": "To Do", "color": "gray" },
          { "name": "Done", "color": "green" }
        ]
      }
    }
  }
}

Query Database

http
POST /databases/{database_id}/query
json
{
  "filter": {
    "property": "Status",
    "select": { "equals": "Done" }
  },
  "sorts": [
    { "property": "Created", "direction": "descending" }
  ],
  "page_size": 100,
  "start_cursor": "xxx"
}

Update Database

http
PATCH /databases/{database_id}
json
{
  "title": [{ "text": { "content": "Updated Title" } }],
  "properties": {
    "NewProperty": { "checkbox": {} }
  }
}

Blocks

MethodEndpointDescription
GET/blocks/{block_id}Retrieve a block
PATCH/blocks/{block_id}Update a block
DELETE/blocks/{block_id}Delete (archive) a block
GET/blocks/{block_id}/childrenList child blocks
PATCH/blocks/{block_id}/childrenAppend child blocks

Retrieve Block

http
GET /blocks/{block_id}

Update Block

http
PATCH /blocks/{block_id}
json
{
  "paragraph": {
    "rich_text": [{ "text": { "content": "Updated text" } }]
  }
}

Delete Block

http
DELETE /blocks/{block_id}

List Children

http
GET /blocks/{block_id}/children

Query parameters:

  • start_cursor - Pagination cursor
  • page_size - Results per page (max 100)

Append Children

http
PATCH /blocks/{block_id}/children
json
{
  "children": [
    {
      "object": "block",
      "type": "paragraph",
      "paragraph": {
        "rich_text": [{ "text": { "content": "New paragraph" } }]
      }
    }
  ],
  "after": "block_id_to_insert_after"
}

Users

MethodEndpointDescription
GET/usersList all users
GET/users/{user_id}Retrieve a user
GET/users/meGet current bot user

List Users

http
GET /users

Query parameters:

  • start_cursor - Pagination cursor
  • page_size - Results per page (max 100)

Get Bot User

http
GET /users/me

Returns the bot user associated with the integration.

MethodEndpointDescription
POST/searchSearch pages and databases

Search

http
POST /search
json
{
  "query": "search term",
  "filter": {
    "value": "page",
    "property": "object"
  },
  "sort": {
    "direction": "descending",
    "timestamp": "last_edited_time"
  },
  "page_size": 100
}

Comments

MethodEndpointDescription
POST/commentsCreate a comment
GET/commentsList comments

Create Comment

http
POST /comments
json
{
  "parent": { "page_id": "xxx" },
  "rich_text": [{ "text": { "content": "Comment text" } }]
}

List Comments

http
GET /comments

Query parameters:

  • block_id - Block or page ID (required)
  • start_cursor - Pagination cursor
  • page_size - Results per page

Pagination

All list endpoints support pagination:

ParameterDescription
page_sizeNumber of results (1-100, default varies)
start_cursorCursor from previous response

Response includes:

  • has_more - Boolean indicating more results exist
  • next_cursor - Cursor for next page (if has_more is true)

Pagination Example

javascript
async function fetchAll(queryFn) {
  const results = [];
  let cursor = undefined;

  do {
    const response = await queryFn(cursor);
    results.push(...response.results);
    cursor = response.has_more ? response.next_cursor : undefined;
  } while (cursor);

  return results;
}

Response Codes

CodeMeaning
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid token
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
409Conflict - Resource already exists
429Too Many Requests - Rate limited
500Internal Server Error

See Also

Built with VitePress | Powered by Claude AI