# Pagination

> List endpoints return up to 100 items per request. Page through posts with limit and offset.

**Source:** https://postprism.app/docs/pagination  
**Updated:** 2026-10-10

---

| Endpoint | Parameters | Default | Maximum |
| --- | --- | --- | --- |
| `GET /api/v1/posts` | `limit`, `offset` | 50 | 100 |
| `GET /api/v1/analytics` | `limit` | 50 | 100 |

Posts are returned newest first. Ask for the next page by adding `limit` to `offset`, and stop when a page returns fewer items than `limit`.

**Read every scheduled post (Node.js)**

```
const headers = { Authorization: `Bearer ${process.env.POSTPRISM_API_KEY}` };
const limit = 100;
const posts = [];

for (let offset = 0; ; offset += limit) {
  const res = await fetch(
    `https://studio.postprism.app/api/v1/posts?status=scheduled&limit=${limit}&offset=${offset}`,
    { headers }
  );
  const { data, error } = await res.json();
  if (error) throw new Error(error);
  posts.push(...data);
  if (data.length < limit) break;
}
```

Analytics has no offset: filter by `post_id` or `platform` to narrow the results instead.
