Pagination in REST API

A very good explanation of how to implement pagination in REST API in this below blog post:

When I try to implement the same(I am extracting data from survey monkey api), I have noticed that when the “Next URL” is executing it is ignoring the query parameters provided.As shown in below image, when service URL is executing it’s getting right records considering all input query parameters i.e total:3043 but when “Next URL” is hitting it is extracting all records i.e. total : 61896

How to include query parameters in “Next URL” to get required data?

Please share your configuration of the Snap’s settings.

below is configuration of Snap’s settings.
service URL:

In the “Next URL” i have replaced “offset” with “page” api is throwing error as bad request, may be api don’t accept parameter as offset.error below

I can’t see the entire expression for Next URL in your screen capture, but it seems more complicated than it needs to be. Try this: “” + ($entity.per_page) + “&page=” + ($ + 1)

Actually, after looking at the Survey Monkey API docs, I think it’s even easier. Try this:

Has next: ‘next’ in $entity.links
Next URL: $

Thank you ptaylor, for timely responses.
I tried with specified Has next and Next URlL parameters but no luck

As I have stated earlier in the second iteration it’s fetching all the total records ignoring query parameters.

Unfortunately, the Survey Monkey API is omitting all of the other query parameters that are not paging-related from the URLs under ‘links’. So you’ll have to add them to the Next URL:

$ + “&start_created_at=” + + “&end_created_at=” + + “&sort_by=date_modified&sort_order=DESC”

I have tried this option earlier to posting in the community, it works when you specify Next URL with little modification as :
$ + “&start_created_at=” + + “&end_created_at=” +

I suggest you to include this exception in the documentation for REST Snap i.e. Survey Monkey API will not accept “offset” value and it will omit query parameters.

Thank you ptaylor :+1:

@Siva_Venna, a ticket has been created for the Doc team.