---
title: "getEntries"
description: "Read, validate, and shape every entry in a collection."
canonical: "https://www.qino.works/docs/api/collection/get-entries"
---

# getEntries

> Read, validate, and shape every entry in a collection.

Reads every file in the collection, validates each one, and applies the selected view.

```ts title="src/app/posts/page.tsx"
const posts = await postCollection.getEntries();
const detailed = await postCollection.getEntries({ view: "detail" });
```

## Signature

```ts title="@qino/cms"
collection.getEntries(options?: { view?: ViewName }): Promise<Array<Entry>>;
```

## Parameters

| Name           | Type      | Required | Default     | Description                                     |
| -------------- | --------- | -------- | ----------- | ----------------------------------------------- |
| `options.view` | view name | no       | `"default"` | A view declared in `views`. Unknown names throw |

`view` is the only accepted option. Passing `resolveDepth`, `filter`, or `sort` throws. An explicit `undefined` for `view` is treated as omitted.

## Returns

`Promise<Array<Entry>>`, where `Entry` is the schema output, `_meta` (`slug`, `fileName`, `filePath`), relations resolved to the view's depths, and the awaited augment output.

Order is slug order unless the view has `sort`. Entries the view's `filter` rejects are dropped. For long listings, read one page at a time with [getPaginatedEntries](https://www.qino.works/docs/api/collection/get-paginated-entries).

## Pipeline

1. Read and validate every file.
2. Resolve relations to the view's depths.
3. Run `augment`.
4. Apply `filter`.
5. Apply `sort` with `toSorted` semantics, so ties keep their slug order.

## Throws

- `Unknown view "<name>". Available views: <names>.`
- `Getter resolveDepth is not supported. Configure resolveDepth in a view and select that view instead.`
- `Getter filter and sort are not supported. Configure them in a collection view instead.`
- Validation, relation, and augment errors for any entry. See [Errors](https://www.qino.works/docs/api/errors).

## See also

- [getPaginatedEntries](https://www.qino.works/docs/api/collection/get-paginated-entries)
- [getEntry](https://www.qino.works/docs/api/collection/get-entry)
- [Views](https://www.qino.works/docs/concepts/views)
