> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Collection Entities

> Get paginated entities saved in a collection

Returns a paginated list of entities saved in the specified collection. The collection must belong to the authenticated user.

## Path Parameters

<ParamField path="collectionId" type="string" required>
  The ID of the collection to fetch entities from.
</ParamField>

## Query Parameters

<ParamField query="page" type="number" optional>
  Page number (1-indexed). Default: `1`.
</ParamField>

<ParamField query="limit" type="number" optional>
  Number of entities per page. Default: `20`.
</ParamField>

<ParamField query="sortBy" type="&#x22;new&#x22; | &#x22;top&#x22; | &#x22;hot&#x22; | &#x22;added&#x22;" optional>
  Sort mode. Default: `"new"`.

  * `new` — by when the entity was created
  * `added` — by when the entity was saved to this collection
  * `top` — by upvote count
  * `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.
</ParamField>

<ParamField query="sortDir" type="&#x22;asc&#x22; | &#x22;desc&#x22;" optional>
  Sort direction. Default: `"desc"`.
</ParamField>

<ParamField query="include" type="string" optional>
  Comma-separated list of associations to include:

  * `user` — the author's user profile
  * `space` — the space the entity belongs to
  * `topComment` — the highest-voted comment
  * `files` — uploaded file/image attachments
  * `grants` — the [reputation-grant summary](/v7/data-models/reputation-grant#grantsummary) for the entity

  `saved` is not needed here: every entity returned by this endpoint already has `isSaved: true`.
</ParamField>

## Response

<ResponseField name="data" type="Entity[]">
  The page of entity objects. Each entity includes `isSaved: true`.
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination metadata.

  <Expandable>
    <ResponseField name="page" type="number">Current page.</ResponseField>
    <ResponseField name="limit" type="number">Page size.</ResponseField>
    <ResponseField name="totalPages" type="number">Total number of pages.</ResponseField>
    <ResponseField name="totalItems" type="number">Number of saved entities the list can return. Entities deleted, removed by moderation, or turned back into drafts after being saved are not counted.</ResponseField>
    <ResponseField name="hasMore" type="boolean">`true` if more pages exist.</ResponseField>
  </Expandable>
</ResponseField>

## Error Responses

<AccordionGroup>
  <Accordion title="Collection Not Found — 404">
    ```json theme={null}
    { "error": "Collection not found", "code": "collection/not-found" }
    ```
  </Accordion>

  <Accordion title="Server Error — 500">
    ```json theme={null}
    { "error": "Internal server error.", "code": "collection/server-error" }
    ```
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.