Comments

Returns active initial comments of discussions on the page. Replies within threads are not included in
this list. Use GET /v1/pages/{idx}/comments/{comment_id}/thread to get them.

By default, comments are sorted by creation time, from newest to oldest.

For common headers and authentication methods, see Access to the API. For sample scenarios, see API usage examples.

Request

GET

https://api.wiki.yandex.net/v1/pages/{idx}/comments

Path parameters

Name

Description

idx

Type: integer

Page ID. The value of idx is the same as the id field value in the response to GET /v1/pages?slug=… or POST /v1/pages.

Query parameters

Name

Description

cursor

Type: string

A pagination cursor from next_cursor or prev_cursor in the previous response

Example: ``

order_by

Type: string

If specified, sort results by this field in the direction given by order_direction

Const: created_at

Example: ``

order_direction

All of: OrderDirection
  • OrderDirection

    Type: string

    An enumeration.

    Enum: asc, desc

Sort direction, used if the order_by field is specified

Default: asc

Example: ``

page_size

Type: integer

Number of results per page.

Default: 50

Min value: 1

Max value: 100

status_filter

All of: CommentResolveStatus
  • CommentResolveStatus

    Type: string

    An enumeration.

    Enum: resolved, unresolved

Filter by comment resolution status. Possible values: resolved, unresolved.

Example: ``

Responses

200 OK

OK

Body

application/json
{
  "results": [
    {
      "id": 0,
      "body": "example",
      "inline_text": "example",
      "parent_id": 0,
      "author": {
        "id": 0,
        "identity": null,
        "username": "example",
        "display_name": "example",
        "is_dismissed": true,
        "affiliation": "example"
      },
      "thread_id": 0,
      "created_at": "2025-01-01T00:00:00Z",
      "is_deleted": true,
      "resolve_status": "resolved",
      "reactions": [
        {
          "type": null,
          "author": null,
          "created_at": "2025-01-01T00:00:00Z"
        }
      ],
      "thread_info": {
        "total_posts": 0,
        "last_comment": null
      }
    }
  ],
  "next_cursor": "example",
  "prev_cursor": "example"
}

Name

Description

results

Type: CommentSchemaExt[]

Items on the current page of results

Example
[
  {
    "id": 0,
    "body": "example",
    "inline_text": "example",
    "parent_id": 0,
    "author": {
      "id": 0,
      "identity": null,
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    },
    "thread_id": 0,
    "created_at": "2025-01-01T00:00:00Z",
    "is_deleted": true,
    "resolve_status": "resolved",
    "reactions": [
      {
        "type": "like",
        "author": null,
        "created_at": "2025-01-01T00:00:00Z"
      }
    ],
    "thread_info": {
      "total_posts": 0,
      "last_comment": null
    }
  }
]

next_cursor

Type: string

A cursor for requesting the next page of results

Example: example

prev_cursor

Type: string

Cursor for requesting the previous page of results

Example: example

UserIdentity

User identifier

Name

Description

cloud_uid

Type: string

User identifier in the cloud

Example: example

uid

Type: string

Yandex user ID

Example: example

Example
{
  "uid": "example",
  "cloud_uid": "example"
}

UserSchema

User information

Name

Description

affiliation

Type: string

User affiliation

Example: example

display_name

Type: string

User display name

Example: example

id

Type: integer

Internal user identifier

is_dismissed

Type: boolean

The user is dismissed

username

Type: string

User login

Example: example

identity

All of 1 type
  • UserIdentity

    Type: UserIdentity

    User identifier

    Example
    {
      "uid": "example",
      "cloud_uid": "example"
    }
    

User identifier in the system

Example
{
  "uid": "example",
  "cloud_uid": "example"
}
Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

CommentResolveStatus

Comment resolution status:

  • resolved: The comment is resolved.
  • unresolved: The comment is unresolved.

Type: string

Enum: resolved, unresolved

ReactionType

Comment reaction type:

  • like: Like.
  • hooray: Hooray.
  • confused: Confused.
  • heart: Heart.
  • rocket: Rocket.
  • eyes: Seen.
  • fire: Fire.
  • ok: OK.
  • facepalm: Facepalm.
  • check: Check mark.
  • laugh: Laugh.
  • dislike: Dislike.

Type: string

Enum: like, hooray, confused, heart, rocket, eyes, fire, ok, facepalm, check, laugh, dislike

CommentReactionSchema

Name

Description

author

All of 1 type
  • UserSchema

    Type: UserSchema

    User information

    Example
    {
      "id": 0,
      "identity": {
        "uid": "example",
        "cloud_uid": "example"
      },
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    }
    

User who added the reaction

Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

created_at

Type: string<date-time>

Date and time when the reaction was added

Example: 2025-01-01T00:00:00Z

type

All of 1 type
  • ReactionType

    Type: ReactionType

    Comment reaction type:

    • like: Like.
    • hooray: Hooray.
    • confused: Confused.
    • heart: Heart.
    • rocket: Rocket.
    • eyes: Seen.
    • fire: Fire.
    • ok: OK.
    • facepalm: Facepalm.
    • check: Check mark.
    • laugh: Laugh.
    • dislike: Dislike.

    Enum: like, hooray, confused, heart, rocket, eyes, fire, ok, facepalm, check, laugh, dislike

Reaction type

Example: like

Example
{
  "type": "like",
  "author": {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  },
  "created_at": "2025-01-01T00:00:00Z"
}

CommentSchema

Comment on a page

Name

Description

author

All of 1 type
  • UserSchema

    Type: UserSchema

    User information

    Example
    {
      "id": 0,
      "identity": {
        "uid": "example",
        "cloud_uid": "example"
      },
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    }
    

Comment author

Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

body

Type: string

Comment text

Example: example

created_at

Type: string<date-time>

Date and time the comment was created

Example: 2025-01-01T00:00:00Z

id

Type: integer

Unique comment ID

is_deleted

Type: boolean

Indicates whether the comment has been deleted

reactions

Type: CommentReactionSchema[]

Reactions to the comment

Example
[
  {
    "type": "like",
    "author": {
      "id": 0,
      "identity": null,
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    },
    "created_at": "2025-01-01T00:00:00Z"
  }
]

resolve_status

All of 1 type
  • CommentResolveStatus

    Type: CommentResolveStatus

    Comment resolution status:

    • resolved: The comment is resolved.
    • unresolved: The comment is unresolved.

    Enum: resolved, unresolved

Comment resolution status

Example: resolved

inline_text

Type: string

Text the comment is attached to (for inline comments)

Example: example

parent_id

Type: integer

ID of the parent comment (for replies in a thread)

thread_id

Type: integer

Comment thread ID

Example
{
  "id": 0,
  "body": "example",
  "inline_text": "example",
  "parent_id": 0,
  "author": {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  },
  "thread_id": 0,
  "created_at": "2025-01-01T00:00:00Z",
  "is_deleted": true,
  "resolve_status": "resolved",
  "reactions": [
    {
      "type": "like",
      "author": null,
      "created_at": "2025-01-01T00:00:00Z"
    }
  ]
}

ThreadSchema

Name

Description

last_comment

All of 1 type
  • CommentSchema

    Type: CommentSchema

    Comment on a page

    Example
    {
      "id": 0,
      "body": "example",
      "inline_text": "example",
      "parent_id": 0,
      "author": {
        "id": 0,
        "identity": {
          "uid": "example",
          "cloud_uid": "example"
        },
        "username": "example",
        "display_name": "example",
        "is_dismissed": true,
        "affiliation": "example"
      },
      "thread_id": 0,
      "created_at": "2025-01-01T00:00:00Z",
      "is_deleted": true,
      "resolve_status": "resolved",
      "reactions": [
        {
          "type": "like",
          "author": null,
          "created_at": "2025-01-01T00:00:00Z"
        }
      ]
    }
    

The latest active reply in the comment thread

Example
{
  "id": 0,
  "body": "example",
  "inline_text": "example",
  "parent_id": 0,
  "author": {
    "id": 0,
    "identity": null,
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  },
  "thread_id": 0,
  "created_at": "2025-01-01T00:00:00Z",
  "is_deleted": true,
  "resolve_status": "resolved",
  "reactions": [
    {
      "type": "like",
      "author": null,
      "created_at": "2025-01-01T00:00:00Z"
    }
  ]
}

total_posts

Type: integer

Number of replies in the comment thread

Example
{
  "total_posts": 0,
  "last_comment": {
    "id": 0,
    "body": "example",
    "inline_text": "example",
    "parent_id": 0,
    "author": {
      "id": 0,
      "identity": null,
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    },
    "thread_id": 0,
    "created_at": "2025-01-01T00:00:00Z",
    "is_deleted": true,
    "resolve_status": "resolved",
    "reactions": [
      {
        "type": null,
        "author": null,
        "created_at": "2025-01-01T00:00:00Z"
      }
    ]
  }
}

CommentSchemaExt

Name

Description

author

All of 1 type
  • UserSchema

    Type: UserSchema

    User information

    Example
    {
      "id": 0,
      "identity": {
        "uid": "example",
        "cloud_uid": "example"
      },
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    }
    

Comment author

Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

body

Type: string

The comment text

Example: example

created_at

Type: string<date-time>

The date and time when the comment was created

Example: 2025-01-01T00:00:00Z

id

Type: integer

The unique comment ID

is_deleted

Type: boolean

Indicates whether the comment has been deleted

reactions

Type: CommentReactionSchema[]

Reactions to the comment

Example
[
  {
    "type": "like",
    "author": {
      "id": 0,
      "identity": null,
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    },
    "created_at": "2025-01-01T00:00:00Z"
  }
]

resolve_status

All of 1 type
  • CommentResolveStatus

    Type: CommentResolveStatus

    Comment resolution status:

    • resolved: The comment is resolved.
    • unresolved: The comment is unresolved.

    Enum: resolved, unresolved

Comment resolution status

Example: resolved

inline_text

Type: string

Text that the comment is attached to (for inline comments)

Example: example

parent_id

Type: integer

Parent comment ID (for replies in a thread)

thread_id

Type: integer

Comment thread ID

thread_info

All of 1 type
  • ThreadSchema

    Type: ThreadSchema

    Example
    {
      "total_posts": 0,
      "last_comment": {
        "id": 0,
        "body": "example",
        "inline_text": "example",
        "parent_id": 0,
        "author": {
          "id": 0,
          "identity": null,
          "username": "example",
          "display_name": "example",
          "is_dismissed": true,
          "affiliation": "example"
        },
        "thread_id": 0,
        "created_at": "2025-01-01T00:00:00Z",
        "is_deleted": true,
        "resolve_status": "resolved",
        "reactions": [
          {
            "type": null,
            "author": null,
            "created_at": "2025-01-01T00:00:00Z"
          }
        ]
      }
    }
    

Information about replies in the thread. Populated for the initial comment if there are replies.

Example
{
  "total_posts": 0,
  "last_comment": {
    "id": 0,
    "body": "example",
    "inline_text": "example",
    "parent_id": 0,
    "author": null,
    "thread_id": 0,
    "created_at": "2025-01-01T00:00:00Z",
    "is_deleted": true,
    "resolve_status": "resolved",
    "reactions": [
      {}
    ]
  }
}
Example
{
  "id": 0,
  "body": "example",
  "inline_text": "example",
  "parent_id": 0,
  "author": {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  },
  "thread_id": 0,
  "created_at": "2025-01-01T00:00:00Z",
  "is_deleted": true,
  "resolve_status": "resolved",
  "reactions": [
    {
      "type": "like",
      "author": null,
      "created_at": "2025-01-01T00:00:00Z"
    }
  ],
  "thread_info": {
    "total_posts": 0,
    "last_comment": {
      "id": 0,
      "body": "example",
      "inline_text": "example",
      "parent_id": 0,
      "author": null,
      "thread_id": 0,
      "created_at": "2025-01-01T00:00:00Z",
      "is_deleted": true,
      "resolve_status": null,
      "reactions": [
        null
      ]
    }
  }
}