Skip to main content
Fetch Collection Entities
Returns a paginated list of entities saved in the specified collection. The collection must belong to the authenticated user.

Path Parameters

string
required
The ID of the collection to fetch entities from.

Query Parameters

number
Page number (1-indexed). Default: 1.
number
Number of entities per page. Default: 20.
"new" | "top" | "hot" | "added"
Sort mode. Default: "new".
  • new — by when the entity was created
  • added — by when the entity was saved to this collection
  • top — by reaction count (use sortByReaction to choose which reaction)
  • hot — by computed engagement score (decays over time)
The whole collection is sorted before it is paginated. Ties in top and hot are broken by newest entity first.
string
default:"upvote"
When sortBy=top, which reaction type to rank by. One of upvote, downvote, like, love, wow, sad, angry, funny. Only accepted with sortBy=top; sending it with any other sort returns 400 collection/invalid-query.
"asc" | "desc"
Sort direction. Default: "desc".
string
Associations to include. Pass it as one comma-separated value (include=user,space) or as repeated params (include=user&include=space). Values:
  • user — the author’s user profile
  • space — the space the entity belongs to
  • topComments — the entity’s best top-level comments, as full Comment objects (see Top comments)
  • files — uploaded file/image attachments
  • grants — the reputation-grant summary for the entity
saved isn’t accepted here (400 collection/invalid-query): every entity returned by this endpoint already has isSaved: true.
number
default:"1"
With include=topComments: how many top comments per entity. A whole number of at least 1 — 0, a negative number or a non-integer value returns 400 collection/invalid-query. Maximum 5 — larger values are treated as 5.
string
default:"upvote"
With include=topComments: the reaction whose raw count ranks the top comments (ties newest first). One of upvote, downvote, like, love, wow, sad, angry, funny.
include values are case-insensitive. An unknown value returns 400 collection/invalid-query, as does sending topCommentsLimit or topCommentsSortByReaction without include=topComments. topComments lists real content only — deleted, removed and block-edged comments are left out — and is [] when nothing qualifies. A collection keeps an entity saved before its author blocked the requesting user; on such an entity topComments is always [].

Response

Entity[]
The page of entity objects. Each entity includes isSaved: true.
object
Pagination metadata.

Error Responses

Returned with code collection/invalid-query for an unknown include value, when topCommentsLimit is below 1 or not a whole number, or when topCommentsLimit / topCommentsSortByReaction is sent without include=topComments.
include=topComment is rejected with a pointer to its replacement.
Returned when a query parameter is invalid, including sortByReaction sent without sortBy=top.