Endpoints that return collections use offset-based pagination with page and limit query parameters.
Query Parameters
| Parameter | Type | Default | Description |
|---|
page | number | 1 | The page number to retrieve. Starts at 1. |
limit | number | 50 | Maximum 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
}
}
The array of result objects for this page.
The page size used for this request.
The total number of records across all pages.
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;
}
import httpx
def fetch_all_keys(project_id: str) -> list:
keys = []
page = 1
headers = {"X-API-Key": "entri_your_token_here"}
with httpx.Client(base_url="https://api.nt3.io/api") as client:
while True:
response = client.get(
f"/projects/{project_id}/keys",
params={"page": page, "limit": 100},
headers=headers,
)
result = response.json()
keys.extend(result["data"])
if page >= result["meta"]["totalPages"]:
break
page += 1
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.