-1

For a project I've been using an API to get information from Instagram. However, I would like to get info from posts using keywords (words included inside the post description). This is a feature available in the app see here, however I have been only able to make search by hashtag, which is not what I want.

I would like to know if any of you know an API/tool able to accomplish this task.

adnlpz
  • 11
  • 1

1 Answers1

0

Here is a way to search instagram posts by words or phrases (not hashtags):

First, you would need to use tools for web scrapping Google search results. Check out this answers for guidance. The url that you will make the request to would be something like: https://www.google.com/search?q=site%3Ahttps%3A%2%2Fwww.instagram.com%2Fp%2F+**put+the+phrase+here**

Once you get the urls from the posts that contain those words, you may want to use an API (e.g. from Rapidapi), build your own code for web scrapping, or use Python packages such as instagramy to get metadata from the instagram posts that you've got.

Usually, the information comes in JSON when using an API, so it is not very difficult to extract the data and put it in as a pandas dataframe if you want to.

My Work
  • 2,143
  • 2
  • 19
  • 47
adnlpz
  • 11
  • 1