Core concepts
Pagination
Read offset-based collection responses and follow their pagination metadata.

Catalog list endpoints use limit and offset. A successful collection response normally includes:
| Field | Meaning |
|---|---|
data | Returned records |
meta.total | Number of matching records |
meta.limit | Requested/effective page size |
meta.offset | Number of records skipped |
meta.count | Returned count when supplied |
meta.hasMore | Whether more records exist, when supplied |
meta.links.next | Relative next-page URL or null |
meta.links.prev | Relative previous-page URL or null |
meta.version | API version |
Default page sizes are 20 for mountains/passes, 50 for trails/lifts, 100 for recorded changes and 25 for the status directory. Status validates a maximum limit of 100 and offset of 10000. Catalog/history routes do not all enforce equivalent bounds; always send positive limits and nonnegative offsets. Search caps results at 50 and has no offset pagination.
// Server-side Node.js; retains filters while following relative next links.
let next = '/api/v1/mountains?countryCode=US&published=true&limit=50';
while (next) {
const response = await fetch(new URL(next, 'https://api.icecoast.us'), {
headers: { 'X-API-Key': process.env.ICECOAST_API_KEY },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const body = await response.json();
for (const mountain of body.data) console.log(mountain.id, mountain.name);
next = body.meta?.links?.next;
}
The catalog can change between pages; this is not a snapshot/cursor API. Deduplicate by ID if collecting multiple pages. Pass mountain expansion is unpaginated. Weather history has a limit but no offset.
For grouped changes, pagination applies to flat changes before grouping. Metadata counts flat records; a group may span pages.
