Skip to main content

Pagination

List endpoints return paginated results. Use query parameters to control which page and how many items to return.

Parameters

ParameterTypeDefaultMaxDescription
pageinteger1Page number (1-indexed)
limitinteger20100Items per page

Example request

curl "https://api.dronelist.io/v1/equipment?page=2&limit=10" \
  -H "X-API-Key: dl_your_key_here"

Response format

Every paginated response includes a meta.pagination object:
{
  "success": true,
  "data": [ ... ],
  "meta": {
    "pagination": {
      "page": 2,
      "limit": 10,
      "total": 42,
      "hasMore": true
    }
  }
}
FieldTypeDescription
pageintegerCurrent page number
limitintegerItems per page
totalintegerTotal number of items across all pages
hasMorebooleantrue if there are more pages after this one

Paginated endpoints

EndpointNotes
GET /v1/equipmentIn-memory pagination
GET /v1/equipment/:id/flightsNative DB pagination (limit/offset)
GET /v1/projectsIn-memory pagination
Non-paginated endpoints (GET /v1/services) return all results directly without a meta.pagination wrapper.

Iterating through all pages

async function fetchAll(endpoint, apiKey) {
  const items = [];
  let page = 1;
  let hasMore = true;

  while (hasMore) {
    const res = await fetch(
      `https://api.dronelist.io${endpoint}?page=${page}&limit=100`,
      { headers: { 'X-API-Key': apiKey } }
    );
    const json = await res.json();

    items.push(...json.data);
    hasMore = json.meta.pagination.hasMore;
    page++;
  }

  return items;
}
Use limit=100 (the maximum) when iterating to minimize the number of requests.