I am working on a data analytics project to research the rise of toxic masculinity on Instagram amongst Persian language users. I had a straightforward method to get data from Twitter and was able to get data using both the official API and the unofficial data-scraping Python library called Snscrape.
The method for Twitter included getting certain amounts of data within a specific timeframe like this:
for i,tweet in enumerate(sntwitter.TwitterSearchScraper('Keyword since:2021-07-05 until:2022-07-06').get_items()):
if i>150:
break
attributes_container.append([tweet.date, tweet.likeCount, tweet.sourceLabel, tweet.content])
But for Instagram, the API is too complicated to me, and I don’t even know if I can get data like this. To be clear, I need to get natural language data on a certain keyword, for example, get 1000 comments that include #Alpha_Male in them. Or get 100 posts that have that hashtag. Then I can analyze the data using LDA and sentiment analysis methods.
Do you know if this kind of research is possible at all? If yes, can you please tell me the tools I need to get the data? I do have an API from Facebook developers and I have active apps for Instagram there. But I don't have any idea how to use them in my research. Even if you can help me by introducing a good Python library, I would deeply appreciate it.
In an attempt to gather natural language data from Instagram for my research project on the rise of toxic masculinity within the Persian language user community, I initially explored the possibility of using the Instagram API. Given my successful experience with Twitter data collection using the Official API and Snscrape, I was optimistic about finding a similar approach for Instagram.
My first step involved reviewing the Instagram Graph API documentation and understanding the available endpoints and parameters. With an active API key from Facebook developers and registered Instagram applications, but I find it too complicated and I am not sure that getting such data is available using this method.