Instagram Message Analyzer is a Python toolkit for exploring your archived Instagram conversations. It loads message exports from Meta, processes them into structured data, and runs several analysis strategies to reveal messaging patterns and network relationships. Optional visualizations are produced using Plotly.
- Data loading and preprocessing – Converts Meta JSON exports into a single DataFrame with normalized sender names, timestamps and reactions.
- Activity analysis – Computes time‑series metrics, burst detection, top senders and chat lifecycle statistics.
- Network analysis – Builds a bipartite graph of senders and chats to measure centrality, communities, influence and reactions.
- Visualization – Generates interactive HTML plots for message frequency, active hours, top senders and more.
- Pipeline orchestration – Modular
AnalysisPipelineclass runs multiple strategies and saves results to disk. - Command‑line interface –
insta-analyzeentry point for quick analysis of a folder containing exported messages.
Install from PyPi:
pip install insta-message-analyzerPython 3.12 or 3.13 is required. The project uses Poetry for dependency management.
poetry install --with devTo install from source without the development tools, run poetry install without the --with dev flag. You may also install the package with pip:
pip install .- Export your Instagram data from Meta and extract the archive so that your message JSON files reside under
data/your_instagram_activity/messages. - Run the analysis pipeline:
poetry run insta-analyzeResults are written to the output directory. Logs are stored in output/logs/insta_analyzer.log.
You can also run the main module directly:
python -m insta_message_analyzer.mainThe repository contains a test suite for the network analysis component. Execute it with pytest:
poetry run pytestLinting and type checking are performed via Ruff and MyPy. A pre‑commit configuration is provided and can be enabled with:
pre-commit installContributions are welcome! Please open an issue or pull request on GitHub. Before submitting code, run the pre‑commit hooks and ensure all tests pass.
This project is licensed under the MIT License. See LICENSE for details.