Skip to content

Comment List

  • Endpoint Path: /api/fresns/v1/comment/list
  • Method: GET
  • Request: Query

Headers Optional Parameter

KeyPublic Mode (Required)Private Mode (Required)
X-Fresns-Aidoptionalrequired
X-Fresns-Aid-Tokenoptionalrequired
X-Fresns-Uidoptionalrequired
X-Fresns-Uid-Tokenoptionalrequired

Query Params

KeyTypeRequiredDescription
pidStringoptionalSpecify scope: Post
cidStringoptionalSpecify scope: Comment (retrieve descendant comments of this comment)
usersStringoptionalSpecify scope: User, uidOrUsername multiple separated by commas
hashtagsStringoptionalSpecify scope: Hashtag, htid multiple separated by commas
geotagsStringoptionalSpecify scope: Geotag, gtid multiple separated by commas
groupsStringoptionalSpecify scope: Group, gid multiple separated by commas
includeSubgroupsBooleanoptionalUsed with groups configuration, whether to include contents of subgroups
Default is false
allDigestBooleanoptionalSpecify scope: All digest, general and premium digest
When passed, the digestState parameter will be ignored
digestStateNumberoptionalSpecify scope: Digest (leave empty to output all)
digest_state field 1 No 2 general digest 3 premium digest
stickyBooleanoptionalWhether it's sticky (leave empty to output all)
langTagStringoptionalFilter content by lang
contentTypeStringoptionalFilter content by type
createdDaysNumberoptionalPublish days: Content created in the specified number of days
createdDateStringoptionalPublish date: today,yesterday,week,lastWeek,month,lastMonth,year,lastYear
createdDateGtStringoptionalPublish date greater than Y-m-d
createdDateLtStringoptionalPublish date less than Y-m-d
viewCountGtNumberoptionalView count greater than
viewCountLtNumberoptionalView count less than
likeCountGtNumberoptionalLikes count greater than
likeCountLtNumberoptionalLikes count less than
dislikeCountGtNumberoptionalDislikes count greater than
dislikeCountLtNumberoptionalDislikes count less than
followCountGtNumberoptionalFollows count greater than
followCountLtNumberoptionalFollows count less than
blockCountGtNumberoptionalBlock count greater than
blockCountLtNumberoptionalBlock count less than
commentCountGtNumberoptionalTotal number of sub-comments greater than
commentCountLtNumberoptionalTotal number of sub-comments less than
blockUsersStringoptionalFilter users, uidOrUsername multiple separated by commas
blockGroupsStringoptionalFilter groups, gid multiple separated by commas
blockHashtagsStringoptionalFilter hashtags, htid multiple separated by commas
blockGeotagsStringoptionalFilter geotags, gtid multiple separated by commas
blockPostsStringoptionalFilter posts, pid multiple separated by commas
blockCommentsStringoptionalFilter comments, cid multiple separated by commas
sinceCidStringoptionalquery new content after this comment
beforeCidStringoptionalquery old content before this comment
orderTypeStringoptionalSort by type: createdTime,random,view,like,dislike,follow,block,comment
Default createdTime
orderDirectionStringoptionalSort by direction, default desc
asc,desc
mapIdNumberoptionalMap Service Provider
mapLngStringoptionalMap Longitude (For distance calculation)
mapLatStringoptionalMap Latitude (For distance calculation)
filterTypeStringoptionalwhitelist only returns key-value pairs for the given key names
blacklist removes specified key-value pairs from the returned data
filterKeysStringoptionalMultiple separated by English commas, supports "dot notation" for multi-dimensional arrays
filterHashtagTypeStringoptionalwhitelist only returns key-value pairs for the given key names
blacklist removes specified key-value pairs from the returned data
Applies only to the hashtags parameter in the returned result
filterHashtagKeysStringoptionalMultiple separated by English commas, supports "dot notation" for multi-dimensional arrays
filterGeotagTypeStringoptionalwhitelist only returns key-value pairs for the given key names
blacklist removes specified key-value pairs from the returned data
Applies only to the geotag parameter in the returned result
filterGeotagKeysStringoptionalMultiple separated by English commas, supports "dot notation" for multi-dimensional arrays
filterAuthorTypeStringoptionalwhitelist only returns key-value pairs for the given key names
blacklist removes specified key-value pairs from the returned data
Applies only to the author parameter in the returned result
filterAuthorKeysStringoptionalMultiple separated by English commas, supports "dot notation" for multi-dimensional arrays
filterPreviewLikeUserTypeStringoptionalwhitelist only returns key-value pairs for the given key names
blacklist removes specified key-value pairs from the returned data
Applies only to the previewLikeUsers parameter in the returned result
filterPreviewLikeUserKeysStringoptionalMultiple separated by English commas, supports "dot notation" for multi-dimensional arrays
filterPreviewCommentTypeStringoptionalwhitelist only returns key-value pairs for the given key names
blacklist removes specified key-value pairs from the returned data
Applies only to the previewComments parameter in the returned result
filterPreviewCommentKeysStringoptionalMultiple separated by English commas, supports "dot notation" for multi-dimensional arrays
filterReplyToPostTypeStringoptionalwhitelist only returns key-value pairs for the given key names
blacklist removes specified key-value pairs from the returned data
Applies only to the replyToPost parameter in the returned result
filterReplyToPostKeysStringoptionalMultiple separated by English commas, supports "dot notation" for multi-dimensional arrays
filterReplyToCommentTypeStringoptionalwhitelist only returns key-value pairs for the given key names
blacklist removes specified key-value pairs from the returned data
Applies only to the replyToComment parameter in the returned result
filterReplyToCommentKeysStringoptionalMultiple separated by English commas, supports "dot notation" for multi-dimensional arrays
pageSizeNumberoptionalNumber of items per page (default 15 items)
pageNumberoptionalPage number (default 1)

Request Description

  • The uidOrUsername parameter value represents obtaining comments from a specified user, and whether to output is determined by Operations > Interaction > View user content settings.
    • it_comments configuration, whether to output users who liked my comments
  • If uidOrUsername is the logged-in user themselves, the above configuration is invalid, and data is directly output, indicating that the switch is ignored when viewing their own content.
contentType parameter (PascalCase)Description
Output all content
AllOutput all content
TextOutput plain text comments
ImageOutput comments with images
VideoOutput comments with videos
AudioOutput comments with audio
DocumentOutput comments with documents
Output comments with plugin fskey AbcName extended content

Return

json
{
    "code": 0,
    "message": "ok",
    "data": {
        "pagination": {
            "total": "Number / How much data in total",
            "pageSize": "Number / How much data on each page",
            "currentPage": "Number / Current page number",
            "lastPage": "Number / Last page number"
        },
        "list": [
            {
                // Common Data Structure -> Comment Info
            }
        ]
    }
}

Released under the Apache-2.0 License