Instagram API - can I search for user hashtag messages?

Is it possible to search for all posts with a specific hashtag of a specific user?

I'm new to development and I'm trying to use the Instagram API if I can search for a combination like this.

+3


source to share


1 answer


Possibly, but not just one request to the Instagram API. There are two solutions:

  • Search posts with a given hashtag name using a query GET /tags/{tag-name}/media/recent

    and then manually check each post if its user is the user you want.

  • Search posts by a specific user using a query GET /users/{user-id}/media/recent

    and then manually check each post if the tag array contains the specific hashtags you want.



I would recommend choosing a solution where you can expect fewer results (messages) to filter. In most cases, this means the latter, because there are more posts on Instagram with a specific hashtag than the average user resource in its Instagram attribute.

You can test Instagram API requests using the Console API Console: http://instagram.com/developer/api-console/

+2


source







All Articles