Pagination
Pagination helps manage large datasets by dividing results into pages. Use the page query parameter to control the size of each page and specify which page to retrieve.
If pagination is not applied, some endpoints may return all records in a single response.
Important
Pagination applies to any endpoint that returns a resource collection as primary data, regardless of the request type.
Page size is 50 by default, unless it is overridden at a particular endpoint.
The maximum page size is 100, unless it is overridden at a particular endpoint.
If
page[number]is not specified, page 1 is returned by default.Some endpoints may disable pagination and return all records in a single response.
Define page size
Use the page[size] parameter to set the maximum number of items returned per page.
In this example, the response will include 10 records (such as cities, countries, or DIDs) per page.
If page[size] is not specified, page size is 50 by default, unless it is overridden at a particular endpoint.
http
GET /cities?page%5Bsize%5D=10 HTTP/1.1
Host: api.didww.com
Accept: application/vnd.api+json
curl
curl -i -X GET 'https://api.didww.com/cities?page%5Bsize%5D=10' -H "Accept: application/vnd.api+json"
Retrieve a specific page
Use the page[number] parameter to request a specific page of results.
For example, if the page[size] is set to 10 and the page[number] is set to 3, entry numbers 21 to 30 will be returned in the data.
http
GET /v3/cities?page%5Bnumber%5D=3&page%5Bsize%5D=10 HTTP/1.1
Host: api.didww.com
Accept: application/vnd.api+json
curl
curl -i -X GET 'https://api.didww.com/v3/cities?page%5Bnumber%5D=3&page%5Bsize%5D=10' -H "Accept: application/vnd.api+json"
Pagination links
Paginated responses include navigation links in the top-level links object:
first– the first page of datalast– the last page of dataprev– the previous page of datanext– the next page of data
These links help you navigate through paginated results without manually calculating page numbers.