There is no cursor value / next page results in this twitter rest api end point



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


Set the page parameter:

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


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


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!


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