# Jira offset pagination with startAt and maxResults

URL: https://goingstellar.ro/reference/atlassian-rest-api/pagination-startat-maxresults/

Most Jira collection endpoints page by offset. Send startAt (zero based) and maxResults, and read total, isLast and, on newer endpoints, nextPage from the wrapper. The array key changes by resource (values, comments, issues), and not every endpoint returns every paging field, so a loop should stop on an empty page or isLast.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| GET | `/rest/api/3/project/search` | Pages projects in a values array. |
| GET | `/rest/api/3/issue/{issueIdOrKey}/changelog` | Pages change history entries. |
| GET | `/rest/api/3/issue/{issueIdOrKey}/comment` | Pages comments in a comments array. |
| GET | `/rest/api/3/label` | Pages label strings. |

## Examples

### GET /rest/api/3/project/search

Page size 2 over 4 projects: the first page reports isLast false and a ready made nextPage URL.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'maxResults=2' \
  --data-urlencode 'orderBy=key' \
  'https://your-domain.atlassian.net/rest/api/3/project/search'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/project/search',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'maxResults': '2', 'orderBy': 'key'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "self": "https://your-domain.atlassian.net/rest/api/3/project/search?maxResults=2&orderBy=key&startAt=0",
 "nextPage": "https://your-domain.atlassian.net/rest/api/3/project/search?maxResults=2&orderBy=key&startAt=2",
 "maxResults": 2,
 "startAt": 0,
 "total": 4,
 "isLast": false,
 "values": [
  {
   "id": "10099",
   "key": "MOB",
   "name": "Mobile App 3.0"
  },
  {
   "id": "10000",
   "key": "SCRUM",
   "name": "Test 1"
  }
 ]
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/issue/{issueIdOrKey}/changelog

Page size 3 over 7 history entries, with nextPage pointing at startAt=3.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'maxResults=3' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/changelog'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/changelog',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'maxResults': '3'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "self": "https://your-domain.atlassian.net/rest/api/3/issue/WEB-55/changelog?maxResults=3&startAt=0",
 "nextPage": "https://your-domain.atlassian.net/rest/api/3/issue/WEB-55/changelog?maxResults=3&startAt=3",
 "maxResults": 3,
 "startAt": 0,
 "total": 7,
 "isLast": false,
 "values": [
  {
   "id": "10913",
   "created": "2026-11-29T19:29:38.928+0200"
  }
 ]
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/issue/{issueIdOrKey}/comment

Comments use startAt, maxResults and total but no isLast, and the array is called comments.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'maxResults=2' \
  --data-urlencode 'orderBy=-created' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/comment'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/comment',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'maxResults': '2', 'orderBy': '-created'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "startAt": 0,
 "maxResults": 2,
 "total": 2,
 "comments": [
  {
   "id": "11104",
   "created": "2026-11-29T19:29:56.610+0200"
  },
  {
   "id": "11103",
   "created": "2026-11-29T19:29:55.626+0200"
  }
 ]
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/label

The last page of labels: isLast true and the values are plain strings.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'maxResults=5' \
  'https://your-domain.atlassian.net/rest/api/3/label'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/label',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'maxResults': '5'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "maxResults": 5,
 "startAt": 0,
 "total": 4,
 "isLast": true,
 "values": [
  "auth",
  "backend",
  "checkout",
  "demo"
 ]
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/agile/1.0/board

The Jira Software agile endpoints use the same wrapper.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'maxResults=5' \
  'https://your-domain.atlassian.net/rest/agile/1.0/board'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/agile/1.0/board',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'maxResults': '5'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "maxResults": 5,
 "startAt": 0,
 "total": 4,
 "isLast": true,
 "values": [
  {
   "id": 1,
   "name": "SCRUM board",
   "type": "simple"
  }
 ]
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- project/search with maxResults=2 and orderBy=key returned startAt 0, total 4, isLast false and a nextPage URL with startAt=2.
- The changelog endpoint with maxResults=3 returned total 7 and a nextPage URL with startAt=3.
- The comment list returned total 2 with no isLast and no nextPage.
- labels with maxResults=5 returned 4 values, isLast true and maxResults 5 echoed unchanged.

## Pitfalls

- total can change while you page, so do not compute page counts from it. The intro tells clients to assume a page can be empty.
- isLast and total are not returned by every operation. The intro says so, and the comment list is one case.
- Per-endpoint limits apply and may change without notice. The OpenAPI text caps project/search at 100 per page, and comments and changelog default to 100.
- Jira issue search no longer uses this scheme. It pages with a token.

## Questions and answers

### Is startAt zero based?

Yes. startAt is the index of the first item in the page, and the first page in the runs reports startAt 0.

### How do I know I reached the end?

Stop when isLast is true, when the page is empty, or when startAt plus the page length reaches total, depending on what the endpoint returns.

## Related

- [nextPageToken in Jira search](https://goingstellar.ro/reference/atlassian-rest-api/pagination-nextpagetoken/)
- [Cursor pagination in Confluence v2](https://goingstellar.ro/reference/atlassian-rest-api/pagination-cursor-links/)
- [Changelog](https://goingstellar.ro/reference/atlassian-rest-api/issue-changelog/)
- [Projects](https://goingstellar.ro/reference/atlassian-rest-api/projects/)
- [Comments](https://goingstellar.ro/reference/atlassian-rest-api/issue-comments/)

## Sources

- [The Jira Cloud platform REST API v3 (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/)

