Skip to main content
Endpoints that return collections use offset-based pagination with page and limit query parameters.

Query Parameters

ParameterTypeDefaultDescription
pagenumber1The page number to retrieve. Starts at 1.
limitnumber50Maximum number of records to return per page. Maximum value: 200.

Response Shape

Every paginated endpoint wraps results in a consistent envelope:
{
  "data": [...],
  "meta": {
    "page": 1,
    "limit": 50,
    "total": 243,
    "totalPages": 5
  }
}
data
array
The array of result objects for this page.
meta.page
number
The current page number.
meta.limit
number
The page size used for this request.
meta.total
number
The total number of records across all pages.
meta.totalPages
number
The total number of pages given the current limit.

Example Request

curl "https://api.nt3.io/api/projects/proj_abc123/keys?page=2&limit=50" \
  -H "X-API-Key: entri_your_token_here"
{
  "data": [
    { "id": "key_051", "key": "nav.home", "description": "Navigation home label" },
    { "id": "key_052", "key": "nav.about", "description": "Navigation about label" }
  ],
  "meta": {
    "page": 2,
    "limit": 50,
    "total": 243,
    "totalPages": 5
  }
}

Fetching All Pages

To retrieve the complete result set, iterate until page >= meta.totalPages:
async function fetchAllKeys(projectId) {
  const keys = [];
  let page = 1;
  let totalPages = 1;

  do {
    const response = await fetch(
      `https://api.nt3.io/api/projects/${projectId}/keys?page=${page}&limit=100`,
      { headers: { "X-API-Key": process.env.ENTRI_API_KEY } }
    );

    const result = await response.json();
    keys.push(...result.data);
    totalPages = result.meta.totalPages;
    page++;
  } while (page <= totalPages);

  return keys;
}

Notes

  • Page numbers start at 1. Requesting page 0 is equivalent to page 1.
  • The limit parameter caps the maximum records per page. The server may return fewer records than requested on the last page.
  • Endpoints that do not return large collections (such as fetching a single project by ID) do not support pagination parameters.