Pagination
NutritionSignals uses cursor-based pagination for any endpoint that returns a list (e.g. scans, barcodes, foods, usage logs). By default, list endpoints return up to 10 items. You can request up to 100 items by passing a limit query parameter.
Paginated responses return items in a data array and include a boolean has_more flag. If has_more is true, you can fetch the next page using starting_after. To go backwards, use ending_before.
Example using cursors
In this example, we request the page of scans after the scan with id 00522e520b0e50141c73354cf14a519a618ca0d589495649f73896341ae2fb52. The response contains up to limit items and tells us whether more results are available via has_more.
- Name
starting_after- Type
- string
- Description
Fetch the next page starting after this ID (use the last item’s
idfrom the current page).
- Name
ending_before- Type
- string
- Description
Fetch the previous page ending before this ID (use the first item’s
idfrom the current page).
- Name
limit- Type
- integer
- Description
The maximum number of items to return (default: 10, max: 100).
Manual pagination using cURL
curl -G https://api.nutritionsignals.com/v1/scans \
-H "Authorization: Bearer ${NUTRITIONSIGNALS_API_KEY}" \
-d starting_after="00522e520b0e50141c73354cf14a519a618ca0d589495649f73896341ae2fb52" \
-d limit=10
Paginated response
{
"has_more": true,
"data": [
{
"id": "0b8a8f8d2a3c4f0e9d1b7a6c5e4f3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f6e",
"status": "completed",
"created_at": "2026-01-06T15:01:10.000Z"
},
{
"id": "1c9b0a1d2e3f405162738495a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f",
"status": "completed",
"created_at": "2026-01-06T15:02:30.000Z"
}
]
}