MaxResults and Pagination

Our listable collections support pagination, even if results are typically small

You have the ability to manage the upper limit of items the API returns for a list request by adjusting the maxResults field. However, note that for some collections, such as Anomalies, there's a hard limit the API will always adhere to when retrieving entries.

Bear in mind that maxResults does not guarantee a specific number of results per page. You can identify incomplete results by a non-empty nextPageToken field in the response. To fetch the next page, execute the same request as before, adding a pageToken field populated with the value of pageToken from the prior page. A fresh PageToken will be offered on each subsequent page until all results have been fetched.

For instance, invoking /analytics/v1/attributions/?maxResults=5 will fetch the initial five results. Alongside the results, you will also receive a pageToken for retrieving the subsequent page of results:

{
    "pageToken": "bUJ2bVVjVUlpaG5PTXEwTURKeXQ",
    "rowCount": 5,
    "attributions": [...]
}

To retrieve the following five results, the pageToken query parameter should be incorporated, which allows the cursor to skip the initial 5 elements, indicating where to commence from.

/analytics/v1/attributions/?maxResults=5&pageToken=bUJ2bVVjVUlpaG5PTXEwTURKeXQ