Skip to content

Comment List

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

Headers Optional Parameter

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

Query Params

Parameter NameTypeRequiredDescription
mapIdNumberoptionalMap Service Provider
mapLngStringoptionalMap Longitude (For distance calculation)
mapLatStringoptionalMap Latitude (For distance calculation)
uidOrUsernameNumber / StringoptionalSpecify scope: User
pidStringoptionalSpecify scope: Post
cidStringoptionalSpecify scope: Comment (retrieve descendant comments of this comment)
hidStringoptionalSpecify scope: Topic
gidStringoptionalSpecify scope: Group
includeSubgroupsBooleanoptionalUsed with gid configuration, whether to include contents of subgroups
Default is false
stickyBooleanoptionalWhether it's sticky (leave empty to output all)
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
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
orderTypeStringoptionalSort by type: createdTime,random,view,like,dislike,follow,block,comment
Default createdTime
orderDirectionStringoptionalSort by direction, default desc
asc,desc
whitelistKeysStringoptionalWhitelist key names, only returns key-value pairs for the given key names
Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays
blacklistKeysStringoptionalBlacklist key names, removes specified key-value pairs from the returned data
Multiple 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