Getting 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 |
Query parameters
|
Name |
Description |
|
cursor |
Any of 2 types
Pagination cursor from Example: `` |
|
order_by |
Type: string If specified, sort the results by this field in the Const: Example: `` |
|
order_direction |
All of: OrderDirection
Sort direction when Default: Example: `` |
|
page_size |
Type: integer Number of results per page. Default: Min value: Max value: |
|
status_filter |
All of: CommentResolveStatus
Filter by comment status. Possible values: Example: `` |
Responses
200 OK
OK
Body
application/json
{
"results": [
{
"id": 0,
"body": "example",
"inline_text": "example",
"parent_id": 0,
"author": {
"id": 0,
"identity": {},
"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": {}
}
}
],
"next_cursor": "example",
"prev_cursor": "example"
}
|
Name |
Description |
|
results |
Type: CommentSchemaExt[] Items on the current page of results Example
|
|
next_cursor |
Any of 2 types
A cursor for requesting the next page of results Example: |
|
prev_cursor |
Any of 2 types
Cursor for requesting the previous page of results Example: |
UserIdentity
User ID
|
Name |
Description |
|
cloud_uid |
Any of 2 types
User identifier in the cloud Example: |
|
uid |
Any of 2 types
Yandex user ID Example: |
Example
{
"uid": "example",
"cloud_uid": "example"
}
UserSchema
User information
|
Name |
Description |
|
affiliation |
Type: string User affiliation Example: |
|
display_name |
Type: string User display name Example: |
|
id |
Type: integer Internal user identifier |
|
is_dismissed |
Type: boolean The user is dismissed |
|
username |
Type: string User login Example: |
|
identity |
Any of 2 types
User identifier in the system 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 |
Type: UserSchema User who added the reaction User information Example
|
|
created_at |
Type: string<date-time> Date and time when the reaction was added Example: |
|
type |
Type: ReactionType Reaction type Comment reaction type:
Enum: |
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 |
Type: UserSchema Comment author User information Example
|
|
body |
Type: string The comment text Example: |
|
created_at |
Type: string<date-time> The date and time when the comment was created Example: |
|
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
|
|
resolve_status |
Type: CommentResolveStatus Comment resolution status Comment resolution status:
Enum: |
|
inline_text |
Any of 2 types
Text that the comment is attached to (for inline comments) Example: |
|
parent_id |
Any of 2 types
Parent comment ID (for replies in a thread) Example: |
|
thread_id |
Any of 2 types
Comment thread ID Example: |
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 |
Type: CommentSchema The latest active reply in the comment thread Comment on a page Example
|
|
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": {
"uid": null,
"cloud_uid": 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"
}
]
}
}
CommentSchemaExt
|
Name |
Description |
|
author |
Type: UserSchema Comment author User information Example
|
|
body |
Type: string The comment text Example: |
|
created_at |
Type: string<date-time> The date and time when the comment was created Example: |
|
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
|
|
resolve_status |
Type: CommentResolveStatus Comment resolution status Comment resolution status:
Enum: |
|
inline_text |
Any of 2 types
Text that the comment is attached to (for inline comments) Example: |
|
parent_id |
Any of 2 types
Parent comment ID (for replies in a thread) Example: |
|
thread_id |
Any of 2 types
Comment thread ID Example: |
|
thread_info |
Any of 2 types
Information about replies in the thread. Populated for the initial comment if there are replies. Example
|
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
]
}
}
}