The project can be viewed at
I have a pagination gallery of Instagram images with a specific tag, but it is not loading more than 64 photos right now (was loading approximately 70 previously). If you go to page 5, you can see it just stops abruptly. I have the count parameter in my URL and it's set to something high like 250 just to test, lowing it to something like 100 doesn't make a difference. There are currently 211 photos with the specific tag.
The url I'm using is
=[CLIENTID]&access_token=[ACCESSTOKEN]&count=300
*Obviously with real clientid and access_token*
UPDATE The limit has gotten even shorter again and is capping at 4 pages of photos now. It seems to get progressively lower every day which is extremely odd.
The project can be viewed at http://watchsuburbia.
I have a pagination gallery of Instagram images with a specific tag, but it is not loading more than 64 photos right now (was loading approximately 70 previously). If you go to page 5, you can see it just stops abruptly. I have the count parameter in my URL and it's set to something high like 250 just to test, lowing it to something like 100 doesn't make a difference. There are currently 211 photos with the specific tag.
The url I'm using is
https://api.instagram./v1/tags/watchsuburbia/media/recent?client_id=[CLIENTID]&access_token=[ACCESSTOKEN]&count=300
*Obviously with real clientid and access_token*
UPDATE The limit has gotten even shorter again and is capping at 4 pages of photos now. It seems to get progressively lower every day which is extremely odd.
Share Improve this question edited Aug 17, 2012 at 17:49 himynameismarvin asked Aug 16, 2012 at 21:15 himynameismarvinhimynameismarvin 851 gold badge2 silver badges6 bronze badges4 Answers
Reset to default 11What Instagram does is finds most recent X number of images you asked for (in this case, anything tagged #watchsuburbia) Then it checks if those are private, removes those and returns that subset. So if 3 videos out of that X are private, it'll actually return X-3 images.
What the co-founder suggests is that you look for more than you need as a buffer and filter it yourself.
Side note: everyone in those videos sounds so Canadian.
See generic information on Instagram API endpoints. It mentions the presence of a count
parameter on the API requests... but does not list a specific maximum number. Perhaps Instagram is throttling the number of media in the result set -- hence the variation in result set size -- and they use the supplied count
as a maximum value. Perhaps the actual maximum count depends per endpoint / type of object.
What you should do is use the numbers returned in the pagination
hash in the result, and step through the results. The hash mentions a new value for the next maximum id (e.g., next_max_tag_id
for tags or next_max_id
for images) of the next page. Via that, you can retrieve subsequent result sets until no next results remain.
I dont think that the count parameters works in this endpoint (not yet?). And the difference of media is because the count include private media I guess. You can see that in http://statigr.am/. their is the same difference.
Sorry for surrian link, but I had the same problem and solved it with pagination.