# Page through lists

Canonical page: https://docs.ovok.com/python-sdk/guides/paging

Every list method returns a `Page`: `data` holds this page's items, `total` the item count
when the API reports it, and `has_more` whether a later page exists.

## Walk every item [#walk-every-item]

`auto_paging_iter()` yields each item and loads later pages as the loop reaches them:

```python
for patient in ovok.fhir.search("Patient", {"_count": "100"}).auto_paging_iter():
    print(patient["id"])
```

## Load one page at a time [#load-one-page-at-a-time]

```python
page = ovok.slim.patients.list({"count": 20})
while page is not None:
    render(page.data)
    page = page.next_page()
```

`next_page()` returns None after the last page. FHIR searches, page-numbered lists, cursor
lists and CMS lists all follow this shape, so the same loop works for each.
