pal4life
pal4life

Reputation: 3378

Instagram Search for a tag within particular date range

I am looking to retrieve results from instagram for a particular tag mytag , I tried using this API call,

https://api.instagram.com/v1/tags/{tag-name}/media/recent

but it only returned 33 results even though there are more results. This question can be considered an extension to this question: How To Search Instagram via API Query?

What is the way to return instagram results for a particular tag within a date range? This may be done through the min_tag_id and max_tag_id which. Not sure how to convert my date time to min_tag_id or max_tag_id?

Upvotes: 1

Views: 17463

Answers (1)

krisrak
krisrak

Reputation: 12952

call the API with max_tag_id and min_tag_id like this:

https://api.instagram.com/v1/tags/{tag-name}/media/recent?client_id={CLIENT_ID}&max_tag_id=1378677250000000&min_tag_id=1375998850000000

max_tag_id and min_tag_id is epoch_time + "000000"

you still only get 20 per API call, use pagination to get all

Update: Instagram changed the tag_id, so date filter cannot be done this way. Login on http://gramfeed.com and search for a hashtag and you can do date/time filter, its a different hack implementation.

Upvotes: 5

Related Questions