API
Pagination
How pagination works in the API
List endpoints return paginated results. Control pagination with query parameters.
Parameters
| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
page | integer | 1 | — | Page number |
per_page | integer | 25 | 100 | Items per page |
Example
curl "https://api.kit.domains/v1/domains?page=2&per_page=10" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response Meta
Every paginated response includes a meta object:
{
"data": [ ... ],
"meta": {
"total": 42,
"page": 2,
"per_page": 10,
"total_pages": 5
}
}| Field | Description |
|---|---|
total | Total number of items across all pages |
page | Current page number |
per_page | Number of items per page |
total_pages | Total number of pages |
Iterating All Pages
Request successive page numbers until page reaches meta.total_pages. Use per_page=100 (the max) for the fewest round-trips:
# page 1, then 2, 3, ... until page == meta.total_pages
curl "https://api.kit.domains/v1/domains?page=1&per_page=100" \
-H "Authorization: Bearer YOUR_API_TOKEN"