Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it correct that the Instagram Location/Search endpoint does NOT support pagination?

Tags:

api

instagram

I have read several postings about the fact that the Instagram API returns only 20 results at a time. In many cases, people have suggested that all you need to do is to use the next URL which is returned in the pagination information. I would be fine with that, but the JSON returned by

https://api.instagram.com/v1/locations/search?

does not appear to have any pagination information. I have seen a posting that says that /media/search does not support pagination. I just wanted to confirm that the same is true for /locations/search. Can anyone confirm?

And if this is correct, does anyone have any thoughts about how you can get a list of all Instagram events in a specific area, rather than just the first 20 or so?

like image 918
user2205101 Avatar asked Feb 05 '14 20:02

user2205101


1 Answers

/media/search end point does not have pagination, but you can get next set of 20 pics by using url param max_timestamp, get the created_time of the last photo in api response and apply it as max_timestamp for next url call, it will return the next 20. Thats how I implemented here: http://www.gramfeed.com/instagram/map

for locations/search end point, timestamp does not apply, you can change distance url param and get more results: http://www.gramfeed.com/instagram/places

like image 94
krisrak Avatar answered Sep 20 '22 22:09

krisrak