GetNextPage directive to your Lambda to fetch more results. Your response provides additional items to populate the next page.
The following diagram shows this workflow:
Utterances for GetNextPage Directives
Handling GetNextPage Directives
After receiving search results from your Lambda (through yourGetDisplayableItemsMetadataResponse), a user might want to see additional search results, or “the next page” of search results. Users can paginate to the next page of search results with a simple phrase such as “Get next page.”
This prompts Alexa to send a GetNextPage directive. Your Lambda response to this directive should include basic metadata for search results. The response is analogous to GetDisplayableItemsResponse.
After Alexa receives your GetNextPageResponse, Alexa will follow up with a GetDisplayableItemsMetadata directive as more information is needed.
GetNextPage Example
The following is an exampleGetNextPage directive. Note the minResultLimit and maxResultLimit for the items you must send.
Payload Descriptions
The following table describes thepayload for GetNextPage directives.
| Field | Description | Data Type |
|---|---|---|
nextTokenoptional | Token to fetch the next set of results. An opaque string sent by the provider which is passed back in subsequent search requests. | String |
minResultLimitrequired | The minimum number of results to return in this call for which a pageToken is accepted. If you return less than the minResultLimit field along with a pageToken to fetch more results, then Alexa does not consider the pageToken to fetch the new items and only displays whatever Alexa received.For a pageToken to be considered for fetching more results, the number of items have to match at least the value in minResultLimit. However, the number of items can be more than minResultLimit up to a max of maxResultLimit. If the number of items is more than the maxResultLimit, Alexa discards the items after the maxResultLimit.Example: 8 | Integer |
maxResultLimitrequired | A limit to the maximum number of results to return. See description of minResultLimit field for more details.Example: 25 | Integer |
Lambda Response
Your Lambda response should be a list of items to display on the device.Response Example
The following is an example of theGetNextPageResponse that your Lambda should send. This payload follows the same format as GetDisplayableItemsMetadata.
Payload Descriptions
| Field | Description | Data Type |
|---|---|---|
nextTokenoptional | Token to fetch the next set of results. An opaque string sent by the provider which is passed back in subsequent search requests. | String |
mediaItemsrequired | A list of mediaIdentifiers for the videos that are shown as search results on the screen. | List |
mediaIdentifierrequired | Identifier for the mediaItem. See Retrieve Image Size Data from the mediaIdentifier Object. | Object |
idrequired | An identifier for the video item that is used to fetch any display or playback related metadata information on subsequent calls to GetDisplayableItemsMetadata or GetPlayableItemsMetadata. This identifier is opaque to Alexa and is just used as-is when querying for metadata information. | String |

