Skip to content

Pagination

All API responses use a standard JSON envelope. List endpoints include pagination metadata to help you iterate through large datasets.


Response Envelope

Every response wraps its payload in a data field:

{
"data": { ... }
}

List endpoints also include a pagination object:

{
"data": [ ... ],
"pagination": {
"page": 1,
"limit": 50,
"total": 342,
"has_next": true
}
}

Pagination Fields

FieldTypeDescription
pageintegerCurrent page number (1-indexed)
limitintegerNumber of items per page
totalintegerTotal number of items across all pages
has_nextbooleantrue if more pages are available

Query Parameters

All list endpoints accept these pagination parameters:

ParameterTypeDefaultRangeDescription
pageinteger11+Page number to retrieve
limitinteger501-200Number of items per page

Iterating Through Pages

Use has_next to determine when to stop paginating.

Terminal window
# Fetch page 1
curl "https://be.graph8.com/api/v1/contacts?page=1&limit=100" \
-H "Authorization: Bearer $API_KEY"
# If has_next is true, fetch page 2
curl "https://be.graph8.com/api/v1/contacts?page=2&limit=100" \
-H "Authorization: Bearer $API_KEY"

Best Practices

  • Use the maximum limit (200) when exporting large datasets to minimize requests.
  • Check has_next instead of computing from page * limit < total — this avoids off-by-one errors.
  • Respect rate limits — add a short delay between pages if fetching many pages. See Rate Limits.
  • Don’t assume order — results are returned in the default order for each resource. If you need a specific order, sort client-side.