Instagram Hashtag Analysis This GitHub repository contains code for analyzing Instagram hashtags and extracting data such as likes, comments, user information, and more. It utilizes the instagrapi library, which is an unofficial Instagram Private API client written in Python.
Retrieve top media posts for specified hashtags. Extract relevant information from the media posts, including username, likes, comments, location, and caption. Calculate the total likes and comments for each hashtag. Identify the user with the most followers among the most used hashtag. Plot bar graphs to visualize the comparison of likes and comments for different hashtags. Option to filter media data based on a specific time range (e.g., last month). Getting Started To use this code:
Install the required dependencies, including streamlit, pandas, matplotlib, and instagrapi. Obtain Instagram API credentials (client ID, client secret, username, and password). Replace the placeholders in the code with your Instagram API credentials. Run the code using Streamlit by executing streamlit run app.py in the terminal.
Once the code is running, you can interact with the Streamlit app to perform Instagram hashtag analysis. The app will display the user with the most followers among the most used hashtag and show bar graphs comparing likes and comments for different hashtags. You can also filter the data for a specific time range, such as the last month.
Contributions to this repository are welcome. Feel free to open issues for bug reports or submit pull requests for improvements.