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

# Pagination

> Cursor-based pagination for stable, efficient paging through large result sets.

Nordic Financial News API list endpoints use cursor-based pagination for stable results, even as new data is added. All list endpoints (articles, stories, companies, categories, countries, exchanges, indices, sources) support cursor pagination.

## How cursor-based pagination works

Every list response includes a `pagination` object:

```json theme={"dark"}
{
  "articles": [...],
  "pagination": {
    "count": 25,
    "next_cursor": "eyJpZCI6..."
  }
}
```

Pass `next_cursor` as the `cursor` query parameter to fetch the next page. When `next_cursor` is `null`, you've reached the end.

```bash theme={"dark"}
# First page
curl -H "Authorization: Bearer $API_KEY" \
  "https://nordicfinancialnews.com/api/v1/articles?limit=25"

# Next page
curl -H "Authorization: Bearer $API_KEY" \
  "https://nordicfinancialnews.com/api/v1/articles?limit=25&cursor=eyJpZCI6..."
```

## Pagination parameters

All Nordic Financial News API list endpoints accept these pagination parameters:

| Parameter | Type    | Default | Description                            |
| --------- | ------- | ------- | -------------------------------------- |
| `limit`   | integer | 25      | Results per page (1-100)               |
| `cursor`  | string  | —       | Opaque cursor from a previous response |

## Cursor types

Different endpoints use different cursor strategies for optimal ordering:

| Endpoint                          | Cursor based on       | Default order       |
| --------------------------------- | --------------------- | ------------------- |
| Articles, Stories                 | `published_at` + `id` | Newest first        |
| Companies, Countries              | `name` + `public_id`  | Alphabetical        |
| Exchanges, Indices                | `name` + `public_id`  | Alphabetical        |
| Categories, Sources               | `name` + `public_id`  | Alphabetical        |
| Any endpoint with `updated_after` | `updated_at` + `id`   | Oldest change first |

<Warning>
  Cursors are opaque and signed. Do not attempt to construct or modify cursor values. Cursor format may change without notice.
</Warning>

## Paging an updated\_after sync walk

`updated_after` is cursor-paginated too, ordered by `updated_at` ascending rather than `published_at` descending. When continuing an `updated_after` walk, resend the same `updated_after` value alongside the cursor. A cursor sent without it returns `400`, because the two modes are ordered differently and pairing them would silently return a wrong slice. The reverse is rejected for the same reason: a standard cursor sent together with `updated_after` also returns `400`.

```bash theme={"dark"}
# Correct: updated_after travels with the cursor on every page
curl -H "Authorization: Bearer $API_KEY" \
  "https://nordicfinancialnews.com/api/v1/articles?updated_after=2024-01-01T00:00:00Z&cursor=eyJpZCI6..."
```

See [Real-time updates](/guides/real-time-updates) for the full incremental-sync recipe.

## Link header

Every paginated response that has a next page also sets a `Link` header:

```
Link: <https://nordicfinancialnews.com/api/v1/articles?country=SE&cursor=eyJpZCI6...&limit=25>; rel="next"
```

The `rel="next"` URL preserves the full query string, including filters and `updated_after`, so following it directly is the safest way to page.

<Note>
  The `Link` header previously emitted only `cursor` and `limit`, dropping every other filter. It now carries the whole query string. If you worked around this by rebuilding the next-page URL yourself, that workaround is no longer needed.
</Note>

<Note>
  When using the `q` (search) parameter, cursor pagination is replaced by relevance-ranked results. The `cursor` and `q` parameters are mutually exclusive.
</Note>
