问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/25729166/instagram-search-for-a-tag-within-particular-date-range