Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the search media by tag on new Instagram Graph API?

On the current Instagram API we have an endpoint to search recent media by tag, but this platform will be deprecated beginning in July 2018.

The problem is that Instagram Graph API reference doesn't include any endpoint to search media by tag.

Does anyone know how to search media by tag using the new Instagram Graph API?

like image 757
Edgar Avatar asked Feb 16 '18 16:02

Edgar


2 Answers

Just announced a few days ago, the new Instagram Graph API: Hashtag Search API is now available. Here is a link to the documentation for the full API: https://developers.facebook.com/docs/instagram-api/hashtag-search.

The edge you wan to hit is {hashtag_id}/recent_media (https://developers.facebook.com/docs/instagram-api/reference/hashtag/recent-media)

There are some limitations to what it used to be, but it is the new replacement.

Limitations

  • This edge only returns public photos and videos.
  • This edge only returns media objects published within 24 hours of query execution.
  • This edge returns a maximum of 50 media objects.
  • You can query a maximum of 30 unique hashtags within a 7 day period.
  • You cannot request the username field on returned media objects.
  • Responses will not include any personally identifiable information.
like image 50
Devon Lind Avatar answered Oct 19 '22 14:10

Devon Lind


For limited tag search you can use public web api:

https://www.instagram.com/explore/tags/{tagName}/?__a=1 for example: https://www.instagram.com/explore/tags/apple/?__a=1

This is just for recent media - I guess, this API does not guarantee all media.

However, this is not official api call. Doesn't need token or auth, so Instagram can change this API without any prior notice.

like image 28
enator Avatar answered Oct 19 '22 15:10

enator