Skip to content

Post List

  • Endpoint Path: /api/fresns/v1/post/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
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 to include or exclude sublevel groups.
Default is false
langTagStringoptionalFilter content by lang
contentTypeStringoptionalFilter content by type
allDigestBooleanoptionalSpecify scope: All digest, general and premium digest
When passed, the digestState parameter will be ignored
digestStateNumberoptionalSpecify scope: Digest (Null to output all)
digest_state field 1 No 2 general digest 3 premium digest
stickyStateNumberoptionalSpecify scope: Sticky (Null to output all)
sticky_state field 1 No 2 group sticky 3 global sticky
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
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 comments greater than
commentCountLtNumberoptionalTotal number of 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
sincePidStringoptionalquery new content after this post
beforePidStringoptionalquery old content before this post
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
filterGroupTypeStringoptionalwhitelist only returns key-value pairs for the given key names
blacklist removes specified key-value pairs from the returned data
Applies only to the group parameter in the returned result
filterGroupKeysStringoptionalMultiple 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
filterQuotedPostTypeStringoptionalwhitelist only returns key-value pairs for the given key names
blacklist removes specified key-value pairs from the returned data
Applies only to the quotedPost parameter in the returned result
filterQuotedPostKeysStringoptionalMultiple 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
pageSizeNumberoptionalNumber of items per page (default 15 items)
pageNumberoptionalPage number (default 1)

Request Description

  • If in private mode, when expired at users->expired_at, you need to determine the status after expiration.
    • When the key value of the configuration table site_private_end_after is 1, this interface cannot be requested;
    • When the key value is 2, further judge the posting time. If posts->created_at posting time is greater than the expiration time users->expired_at, it will not be output; if the posting time is less than the expiration time, it means the content was posted before expiration and can be output.
  • The uidOrUsername parameter value represents obtaining posts from a specified user, and whether to output is determined by Operations > Interaction > View user content settings.
    • it_posts configuration, whether to output users who liked my posts
  • 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.
  • If it is a non-public group post and not a member of the group (not following the group), it will not be output.
  • Posts of blocked objects (users, groups, hashtags, posts) will not be output.
contentType parameter (PascalCase)Description
Output all content
AllOutput all content
TextOutput plain text posts
ImageOutput posts with images
VideoOutput posts with videos
AudioOutput posts with audio
DocumentOutput posts with documents
Output posts 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 -> Post Info
            }
        ]
    }
}

Released under the Apache-2.0 License