video

video.getComments

The translation was generated automatically and may contain mistakes

Returns the list of comments to the video.

To call this method, you can use:
• user access token (access right required: video — this is issued in exceptional cases by a request to support at devsupport@corp.vk.com)

Parameters

owner_id

integer

The identity of the user or community that owns the video.

Note the community ID in the parameter owner_id It is necessary to indicate the sign "-" - for example, owner_id = -1 corresponds to the community identifier VKontakte API (club1).

video_id

positive

Video ID.

Required parameter

need_likes

checkbox

1 An additional field will be returned. likes . Default field likes doesn't come back.

start_comment_id

integer

The comment ID, starting with which you need to return the list (see details below).

offset

integer

The offset required to select a specific subset of comments. By default: 0 .

count

positive

Number of comments that need to be returned.

sort

string

Order of comments. Possible values:

  • asc From old to new;
  • desc From new to old.
extended

checkbox

1 Additional fields will be returned.. profiles and groups containing information about users and communities. By default: 0 .

fields

string

An optional parameter. Additional Field Information profiles and groups . Considered if a parameter is passed extended with meaning 1 .

comment_id

integer

thread_items_count

positive

If a parameter has been passed start_comment_id , the comment position in the list (or the one closest to it earlier) will be found.. From this position will be returned.. count comments. Displacement offset in this case, it will be counted from this position (it can be negative).

Result

After successful execution, it returns an object containing the number of results in the field count and an array of comment objects in the field items . Each object describing a comment contains the following fields:

  • id — ID of the comment;
  • from_id — ID of the author of the comment;
  • date Date of addition of the comment in the format unixtime ;
  • text the text of the comment;
  • likes Information about the marks Like it. current comment (if a parameter has been set need_likes ), an object with fields:
    • count the number of users who liked the comment,
    • user_likes Availability of Mark Like it. from the current user ( 1 - there is, 0 - No,,
    • can_like — information about whether the current user can put a mark Like it. ( 1 - maybe, 0 - can't).

If a parameter has been set extended = 1 returns the number of results in the field count , a separate array of comment objects in the field items , users in the field profiles and community Communities in the field groups .

If a parameter has been passed start_comment_id The field will also be returned. real_offset - the final offset of this subset of comments (it can be negative if it was indicated negative offset ).

Error codes

801
Comments for this video are closed

Common errors may occur during execution

Linked versions

Go to API versions page

If no end date is specified in the method call parameters, return objects that describe community They no longer have a field.. finish_data . Previously, this field was present in the response and contained the default, equal to start_date + 2 hours.

A parameter has been added to the methods that return comments start_comment_id , which indicates the initial comment for a return.