Notion: List comments
Notion comments.listComments: arguments, response, policy and SDK examples.
← Comments operations · Get started
Operation notion.list_comments
Provider route: GET /v1/comments. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/notion with npm, or alter-sdk-notion with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { NotionIntegration } from "@alter-ai/notion";
async function execute(input: Parameters<NotionIntegration["comments"]["listComments"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new NotionIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.comments.listComments(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_notion import NotionIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = NotionIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.comments.list_comments(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Required within parent | Additional keys: not allowed |
query.block_id | string | Required within parent | Identifier for a Notion block or page. |
query.start_cursor | string | Optional | If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results. |
query.page_size | integer | Optional | The number of items from the full list desired in the response. Maximum: 100 Maximum: 100 Minimum: 1 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
comment | Model | Required within parent | Expand List views — response body — view |
has_more | boolean | Required within parent | |
next_cursor | JSON | Required within parent | |
next_cursor (anyOf 1) | string | Alternative | Format: uuid |
next_cursor (anyOf 2) | null | Alternative | |
object | string | Required within parent | Always `list` Must equal: list |
request_status | Model | Optional | Expand List views — response body — request status |
results | array | Required within parent | |
results[] | Model | Each item | Expand Create a comment — response body — object comment — comment Object Response |
type | string | Required within parent | Always `comment` Must equal: comment |
Referenced models: List views — response body — view, Create a comment — response body — object comment — comment Object Response, List views — response body — request status
Schemas
Section titled “Schemas”13 more schemas are linked from the tables above, on the schema pages.
List views — response body — view
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
Create a comment — response body — object comment — comment Object Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
attachments | array | Optional | Any file attachments associated with the comment. Maximum items: 100 |
attachments[] | object | Each item | Additional keys: allowed |
attachments[].category | string | Required within parent | One of: `audio`, `image`, `pdf`, `productivity`, `video` Known values: audio, image, pdf, productivity, video |
attachments[].file | Model | Required within parent | Expand Get agent — response body — icon value File file |
created_by | Model | Required within parent | Expand Update page — response body — object page created by The user who created the comment. |
created_time | string | Required within parent | The time when the comment was created. Format: date-time |
discussion_id | string | Required within parent | The ID of the discussion thread this comment belongs to. Format: uuid |
display_name | object | Required within parent | The display name of the comment. Additional keys: allowed |
display_name.resolved_name | JSON | Required within parent | |
display_name.resolved_name (anyOf 1) | string | Alternative | |
display_name.resolved_name (anyOf 2) | null | Alternative | |
display_name.type | string | Required within parent | One of: `custom`, `user`, `integration` Known values: custom, user, integration |
has_pending_attachments | boolean | Required within parent | Whether any file attachments on this comment are still uploading. Pending files are not listed in `attachments` yet. A `comment.updated` webhook is sent when each upload finishes. |
id | string | Required within parent | The ID of the comment. Format: uuid |
last_edited_time | string | Required within parent | The time when the comment was last edited. Format: date-time |
object | string | Required within parent | The comment object type name. Must equal: comment |
original_content_deleted | boolean | Required within parent | Whether this comment's original content was deleted. |
parent | Model | Required within parent | Expand Create a comment — response body — object comment parent The parent of the comment. |
property_id | string | Optional | The ID of the database property the comment is on, for comments on a page property. Matches the property's `id` in the page object. Omitted for other comments. |
rich_text | array | Required within parent | The rich text content of the comment. Maximum items: 100 |
rich_text[] | Model | Each item | Expand Retrieve a page property item — response body — value Title title |
Referenced models: Create a comment — response body — object comment parent, Get agent — response body — icon value File file, Update page — response body — object page created by, Retrieve a page property item — response body — value Title title
List views — response body — request status
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
incomplete_reason | string | Optional | Why the result set is incomplete. Only present when `type` is `incomplete`. Must equal: query_result_limit_reached |
type | string | Required within parent | Whether the result set is complete or incomplete. `incomplete` means the response does not include all rows that match the query parameters (e.g. due to a server-side pagination depth limit). Known values: complete, incomplete |
Create a comment — response body — object comment parent
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Create a comment — response body — object comment parent Page Id |
$ (anyOf 2) | Model | Alternative | Expand Create a comment — response body — object comment parent Block Id |
Referenced models: Create a comment — response body — object comment parent Block Id, Create a comment — response body — object comment parent Page Id
Get agent — response body — icon value File file
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
expiry_time | string | Required within parent | The time when the URL will expire. Format: date-time |
url | string | Required within parent | The URL of the file. |
Update page — response body — object page created by
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
id | string | Required within parent | Format: uuid |
object | string | Required within parent | Always `user` Must equal: user |
Retrieve a page property item — response body — value Title title
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Retrieve a page property item — response body — value Title title annotations, href, plain text |
$ (allOf 2) | JSON | All variants apply | |
$ (allOf 2) (anyOf 1) | Model | Alternative | Expand Retrieve a page property item — response body — value Title title value Text |
$ (allOf 2) (anyOf 2) | Model | Alternative | Expand Retrieve a page property item — response body — value Title title value Mention |
$ (allOf 2) (anyOf 3) | Model | Alternative | Expand Retrieve a page property item — response body — value Title title value Equation |
Referenced models: Retrieve a page property item — response body — value Title title value Equation, Retrieve a page property item — response body — value Title title value Mention, Retrieve a page property item — response body — value Title title annotations, href, plain text, Retrieve a page property item — response body — value Title title value Text
Create a comment — response body — object comment parent Block Id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
block_id | string | Required within parent | Format: uuid |
type | string | Required within parent | Always `block_id` Must equal: block_id |
Create a comment — response body — object comment parent Page Id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
page_id | string | Required within parent | Format: uuid |
type | string | Required within parent | Always `page_id` Must equal: page_id |
Retrieve a page property item — response body — value Title title value Equation
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
equation | object | Required within parent | Notion supports inline LaTeX equations as rich text objects with a type value of `equation`. Additional keys: allowed |
equation.expression | string | Required within parent | A KaTeX compatible string. |
type | string | Required within parent | Always `equation` Must equal: equation |
Retrieve a page property item — response body — value Title title annotations, href, plain text
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
annotations | Model | Required within parent | Expand Retrieve a page property item — response body — value Title title annotations, href, plain text annotations All rich text objects contain an annotations object that sets the styling for the rich text. |
href | JSON | Required within parent | A URL that the rich text object links to or mentions. |
href (anyOf 1) | string | Alternative | |
href (anyOf 2) | null | Alternative | |
plain_text | string | Required within parent | The plain text content of the rich text object, without any styling. |
Referenced models: Retrieve a page property item — response body — value Title title annotations, href, plain text annotations
List custom emojis — response body — results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
id | string | Required within parent | The ID of the custom emoji. Format: uuid |
name | string | Required within parent | The name of the custom emoji. |
url | string | Required within parent | The URL of the custom emoji. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: notion.list_comments. Catalog operation: list_comments. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"Notion-Version": "2026-03-11"}