2
votes

I want my app to query Instagram posts with a particular hashtag. It looks like this can be done with @mentions, but don't a way to do it with #hashtags. Am I missing something? I'm not sure if I want to get all posts with a hashtag or just authenticated users posts with that hashtag. But when somebody posts with this #hashtag, I need to get the new post. Is there any way to do this with the Instagram API?

I guess my plan B could be to create an instagram user and have people @mention the user instead of using hashtags. Then my app could be authenticated as that user and do regular polling.

1

1 Answers

5
votes

Following is one way to do this:

https://www.instagram.com/explore/tags/<tag>/?__a=1

but this is completely unofficial and instagram can change above api without any notice at any time.

for example; to search posts with #stackoverflow

https://www.instagram.com/explore/tags/stackoverflow/?__a=1

more info about pagination and other detail at the question and answer here: Instagram ?__a=1 url not working anymore & problems with graphql/query to get data

Also under item 10 of Instagram Terms of Use - General Conditions: "We prohibit crawling, scraping, caching or otherwise accessing any content on the Service via automated means, including but not limited to, user profiles and photos."