Page through lists of resources

You can control the maximum number of resources the server returns in the response to a list request by setting the maxResults field. Furthermore, for some collections (such as events) there is a hard limit on the number of retrieved entries that the server never exceeds. If the total number of events exceeds this maximum, the server returns one page of results.

Remember that maxResults doesn't guarantee the number of results on one page. A non-empty nextPageToken field in the response indicates incomplete results. To retrieve the next page, repeat the previous request and append a pageToken parameter with the value of nextPageToken from the previous page. Each subsequent page provides a new nextPageToken until the response contains all results.

For example, the following query requests the first page:

GET /calendars/primary/events?maxResults=10&singleEvents=true

The response contains a nextPageToken:

{
  "nextPageToken": "CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA"
}

The subsequent query takes the value from nextPageToken and submits it as the value for pageToken:

GET /calendars/primary/events?maxResults=10&singleEvents=true&pageToken=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA