Pagination

Most top-level API resources have support for bulk fetches via the List API methods. For instance, you can list languages, contributors, or translations.

These List API methods share a common structure and supports two GET parameters:

  • limit (integer) — default value is 100, and the maximum value is 5000 (please note that certain endpoints might have smaller limits).
  • page (integer) — default value is 1.

Each paginated response contains the following headers:

  • X-Pagination-Total-Count — total number of available entries.
  • X-Pagination-Page-Count — total number of available pages.
  • X-Pagination-Limit — entries displayed per page. This value equals to the limit value GET param sent in the request.
  • X-Pagination-Page — current page number. This value equals to the page value GET param sent in the request.

Some API endpoints (listed below) support cursor based pagination, in addition to the default page based method described above. To use cursor based pagination, change the value of the pagination parameter to cursor. Then use the following parameter:

  • cursor (string) — default value is null. Specifies the cursor starting from which results will be returned.

NOTE: the limit parameter is used in both paging methods, but the page parameter is only used with page based pagination.

When using cursor based pagination, each response contains the following headers:

  • X-Pagination-Limit — entries displayed per response. This value equals to the limit value GET param sent in the request.
  • X-Pagination-Next-Cursor — cursor of the next result. Use this value for the cursor parameter in your next request to receive the next batch of results.

Cursor based pagination is currently supported in the following endpoints: