There is no cursor value / next page results in this twitter rest api end point https://api.twitter.com/1.1/users/search.json

restapi
search

#1

How can we get next set of results in user search?


#2

Set the page parameter: https://dev.twitter.com/rest/reference/get/users/search

But remember that you only get 1000 results max, so that means you should set count=20 and expect to process a maximum of 50 pages.

Haven’t tried it to see if anything changed - but you sometimes get duplicate results while paging - see: GET users/search Pagination


#3

Even when I set page with count , the same 1st set of results repeating in all the pages.


#4

I think that means that those are the only available results for that query. I haven’t tried recently, but that endpoint has odd pagination behaviour, where you’ll get the same set of results for different page parameter values when you’ve reached the end. The workaround i used is to compare the result set of a page to the previous one, stopping iterating through pages once a duplicate set of results is returned. Hope that helps!


#5

Yes, that is correct. It’s an incredibly poor way of telling you that you’re at the end of your results.