Developers » API methods » Board » board.getComments
Returns a list of comments on a topic on a community's discussion board.
This method can be called by a service token. Only public data is returned.
This method can be called with a user token.
group_idID of the community that owns the discussion board.
positive number, required parameter
topic_idTopic ID.
positive number, required parameter
need_likes1 to return the likes field;
0 not to return the likes field (by default).
flag, either 1 or 0
start_comment_idStart comment ID.
positive number, accessible for versions from 5.33
offsetOffset needed to return a specific subset of comments.
int (number)
countNumber of comments to return.
positive number, default 20, maximum value 100
extended1 to return information about users who posted comments;
0 to return no additional fields (by default).
flag, either 1 or 0
sortSort order. Possible values:
  • asc by creation date in chronological order;
  • desc by creation date in reverse chronological order.
If start_comment_id is set, the position of the comment in the list (or the closest earlier one to it) will be found. From this position, count amount of comments will be returned. Offset in this case will be counted from this position (it can be negative).
Returns an object containing a comments field and poll field (if there is a poll in the topic) and profiles field (if extended is set to 1).

Items field contains the total number of comments and an array of comment objects.

If there is a poll in the topic, returns poll field that contains an array with the following fields:
  • owner_id Poll owner ID;
  • poll_id Poll ID;
  • created Date (in Unix time) the poll was created;
  • is_closed Whether the poll is closed so that no one can participate (0 not closed; 1 closed);
  • question Text of the question;
  • votes Total number of voters;
  • answer_id ID of the current user's answer; if the user has not yet participated in the poll, then 0;
  • answers Array with objects containing answer choices for the poll question:
    • id Answer ID;
    • text Text of the answer;
    • votes Number of users who voted for this answer;
    • rate Rating of this answer as a percentage.

If extended is set to 1, also returns a profiles field containing user objects, as well as the following fields:
  • uid User ID;
  • first_name User first name;
  • last_name User last name;
  • photo URL of the 50x50px user photo;
  • photo_medium_rec URL of the 100x100px user photo;
  • sex User sex;
  • online Information whether the user is online.

If start_comment_id is set, real_offset will be returned the resulting offset of a given subset of comments (it can be negative).
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
In the methods wall.getComments, market.getComments, photos.getComments, video.getComments, board.getComments, graffiti now has a separate attach type.

Methods market.add, market.edit can be passed the parameter url. The market object can now return url and button_title.
In all methods that return people objects, photo, photo_medium_rec fields were renamed to photo_50, photo_100.
In wall attachment from and copy_owner fields return as user or community object, not array.