{
  "openapi": "3.0.1",
  "info": {
    "title": "Notion Mcp Server",
    "description": "MCP Server for Notion API. AI agents can search, create, and manage pages, databases, blocks, and comments. 20 operations with full CRUD. Supports pagination and batch queries.",
    "version": "1.0",
    "x-build-id": "yheHqbcK6BTrlFefZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/constant_quadruped~notion-mcp-server/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-constant_quadruped-notion-mcp-server",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/constant_quadruped~notion-mcp-server/runs": {
      "post": {
        "operationId": "runs-sync-constant_quadruped-notion-mcp-server",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/constant_quadruped~notion-mcp-server/run-sync": {
      "post": {
        "operationId": "run-sync-constant_quadruped-notion-mcp-server",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "notionToken": {
            "title": "Notion API Token",
            "type": "string",
            "description": "Your Notion integration token (starts with ntn_ or secret_). Get one at notion.so/profile/integrations"
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "demo",
              "search",
              "get_page",
              "create_page",
              "update_page",
              "archive_page",
              "get_page_property",
              "get_database",
              "query_database",
              "create_database",
              "update_database",
              "get_block",
              "get_block_children",
              "append_block_children",
              "update_block",
              "delete_block",
              "get_comments",
              "create_comment",
              "get_user",
              "list_users",
              "get_bot_user"
            ],
            "type": "string",
            "description": "The Notion API operation to perform",
            "default": "demo"
          },
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Search query for the search operation"
          },
          "pageId": {
            "title": "Page ID",
            "type": "string",
            "description": "Notion page ID or URL"
          },
          "databaseId": {
            "title": "Database ID",
            "type": "string",
            "description": "Notion database ID or URL"
          },
          "blockId": {
            "title": "Block ID",
            "type": "string",
            "description": "Notion block ID or URL"
          },
          "userId": {
            "title": "User ID",
            "type": "string",
            "description": "Notion user ID"
          },
          "parentPageId": {
            "title": "Parent Page ID",
            "type": "string",
            "description": "Parent page ID for creating pages/databases"
          },
          "parentDatabaseId": {
            "title": "Parent Database ID",
            "type": "string",
            "description": "Parent database ID for creating pages as database entries"
          },
          "title": {
            "title": "Title",
            "type": "string",
            "description": "Title for new pages or databases"
          },
          "properties": {
            "title": "Properties",
            "type": "string",
            "description": "JSON string of properties for create/update operations"
          },
          "children": {
            "title": "Children Blocks",
            "type": "string",
            "description": "JSON string of block children to append"
          },
          "filter": {
            "title": "Filter",
            "type": "string",
            "description": "JSON string filter for search/query operations"
          },
          "sorts": {
            "title": "Sorts",
            "type": "string",
            "description": "JSON string sort configuration"
          },
          "richText": {
            "title": "Rich Text",
            "type": "string",
            "description": "JSON string of rich text content for comments"
          },
          "propertyId": {
            "title": "Property ID",
            "type": "string",
            "description": "Property ID for get_page_property operation"
          },
          "discussionId": {
            "title": "Discussion ID",
            "type": "string",
            "description": "Discussion ID for reply comments"
          },
          "startCursor": {
            "title": "Start Cursor",
            "type": "string",
            "description": "Pagination cursor for fetching next page of results"
          },
          "pageSize": {
            "title": "Page Size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of results per page (max 100)",
            "default": 100
          },
          "archived": {
            "title": "Archived",
            "type": "boolean",
            "description": "Set archived status for update operations"
          },
          "icon": {
            "title": "Icon",
            "type": "string",
            "description": "JSON string of icon configuration"
          },
          "cover": {
            "title": "Cover",
            "type": "string",
            "description": "JSON string of cover image configuration"
          },
          "persistResults": {
            "title": "Persist Results",
            "type": "boolean",
            "description": "Save results to dataset",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}