Skip to content

Pagination

For API endpoints that may return a large list of data, Keelvar's API uses cursor-based pagination to manage the number of records that will be returned in a single response. Keelvar's API formats these records into discrete pages of a specific page size.

The default page size is 100 (i.e. 100 records), but can be set to a different value in the range 10-200 using the page_size query parameter per request.

The example below shows how you would make a request to the Awards Export API endpoint while setting the response data to include 200 records per page.

Request
GET /api/feeds/awards?page_size=200

If the the page size cannot contain all the records requested, it will contain linked references to allow you to make a request for the next page of records. These references are in the Link header of the response.

No Link header will be returned if:

  • All the requested data fits within the default or specified page size, or
  • You are on the last page of the response data.

Note: The API does not support requesting a previous page.

Below is an example of the Link header.

Example
Link: <https://my.keelvar.app/api/awards?cursor=cD0y>; rel="next"

Note that any query parameters that are provided will be automatically added to subsequent the Link header response. You should not need to modify the Link in any way while paging through the GET API endpoint response records. The cursor value should also not be modified, as this may lead to invalid paging with missing or duplicate entries in the overall results.