# Pagination and batch

URL: https://docs.healthcare.dev/pagination

## Cursors

List and search endpoints return up to `limit` results (default 25, max 100) and a
`links.next` URL. Follow it until it's `null`:

```sh
curl "https://api.healthcare.dev/v1/codes/hcpcs?q=wheelchair&limit=100" \
  -H "Authorization: Bearer $HDEV_API_KEY"
```

```ts
for await (const code of hdev.codes.iterate("hcpcs", { q: "wheelchair" })) console.log(code.code);
```

Cursors are opaque; don't build them yourself.

## Batch

Look up to 100 codes in one call. Each result says whether it was found:

```sh
curl -X POST https://api.healthcare.dev/v1/codes/icd10cm/batch \
  -H "Authorization: Bearer $HDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"codes": ["E11.9", "I10", "NOPE"]}'
```

Each item in a batch is billed as one call.
