Instagram Search for a tag within particular date range

我是研究僧i 提交于 2019-12-17 19:55:49

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!