comments.getTopRatedStreams REST

Skip to end of metadata
Go to start of metadata


This API retrieves a list of the streams that received the highest average stars via Gigya's Rating and Reviews plugin or the comments.postComment API. The method only retrieves streams created within the past predefined number of days and that contain a streamURL. You can set a streamURL using the comments.setStreamInfo API.


Request URL


Where <Data_Center> is:
  • - For the US data center.
  • - For the European data center.
  • - For the Australian data center.
  • - For the Russian data center.
  • - For the Chinese data center.

If you are not sure of your site's data center, see Finding Your Data Center.



categoryIDstringThe identifier of the comments category from which to retrieve the top streams. 
If this parameter is not specified, the method returns all site top streams (of all categories).
limitintegerThe maximum number of streams to retrieve. The default is 20 streams. The maximum is 1000 streams.
maxStreamAgeintegerThe maximum number of days since the streams were created (0-7). The method retrieves only streams that were created within the past maxStreamAge days. The default is 7, which means streams will be retrieved that are no more than 7 days old. To view streams more than 7 days old this must be set to 0.
minRatingCountintegerThe minimum amount of ratings that are required in order to consider the stream in the top-rated list. The default is 1.
streamTagstringThis parameter is used to filter the top streams. The method returns only streams that are associated with this tag.
format string Determines the format of the response. The options are:
  • json (default)
  • jsonp - if the format is jsonp then you are required to define a callback method (see parameter below).
callback string This parameter is required only when the format parameter is set to jsonp (see above). In such cases this parameter should define the name of the callback method to be called in the response, along with the jsonp response data.
httpStatusCodes Boolean The default value of this parameter is false, which means that the HTTP status code in Gigya's response is always 200 (OK), even if an error occurs. The error code and message is given within the response data (see below). If this parameter is set to true, the HTTP status code in Gigya's response would reflect an error, if one occurred.

Authorization Parameters

Each REST API request must contain identification and authorization parameters.

Please refer to the Authorization Parameters section for details. 


Response Data

statusCode integer The HTTP response code of the operation. Code '200' indicates success.
errorCode integer The result code of the operation. Code '0' indicates success, any other number indicates failure. For a complete list of error codes, see the Error Codes table.
statusReason string A brief explanation of the status code.
errorMessage string A short textual description of an error, associated with the errorCode, for logging purposes. This field will appear in the response only in case of an error.
errorDetails string This field will appear in the response only in case of an error and will contain the exception info, if available.
callId string Unique identifier of the transaction, for debugging purposes.
time string The time of the response represented in ISO 8601 format, i.e., yyyy-mm-dd-Thh:MM:ss.SSSZ or



streamsArray of Stream info objectsAn array listing the streams. Each stream is represented by a Stream info object.
isUserSubscribedbooleanWhether or not the user making the API request is subscribed to get changes/updates to the stream.

A field that does not contain data will not appear in the response.



Response Example

  "streams": [
      "streamID": "home",
      "status": "enabled",
      "streamURL": "",
      "streamTitle": "Daily Recipe - Gigya Demo Site",
      "streamTags": [],
      "categoryID": "demositeReview",
      "createDate": 1421749338323,
      "commentCount": 80,
      "approvedCommentCount": 80,
      "threadCount": 74,
      "ratingCount": 74,
      "rssURL": "",
      "avgRatings": {
        "_overall": 4.4,
        "Taste": 4.2,
        "Ease": 4.1,
        "Nutritional": 4.0
      "isUserSubscribed": false
  "statusCode": 200,
  "errorCode": 0,
  "statusReason": "OK",
  "callId": "c2285f67b4c441e9a0134fc794b45043",
  "time": "2017-02-21T10:36:00.313Z"