---
title: "Pagination"
canonical: "https://wiki.patientsknowbest.com/space/api/5232033796/Pagination"
format: markdown
---
## FHIR pagination

1. **Send your initial search request**

The value in the _count parameter should be a max of 10

```
GET [base]/fhir/QuestionnaireResponse?based-on:ServiceRequest.identifier=<questionnaireId>&_count=10
```

2. **Read the response Bundle**

The server returns a `Bundle` containing the first page of results.

3. **Check **`Bundle.link`

Look for a link where:

```
"relation": "next"
```

4. **Use the **`next`** URL exactly as returned**

```
GET [base]<next.url>
```

Do not rebuild or edit the URL manually.

5. **Repeat for each page**

Each response may contain another `next` link.

6. **Stop when there is no **`next`** link**

That means you have reached the last page.

## Key rule

Use the server-provided pagination links, not your own page numbers.