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
AnalysisPipeline
class runs multiple strategies and saves results to disk. - Command‑line interface –
insta-analyze
entry point for quick analysis of a folder containing exported messages.
Install from PyPi:
pip install insta-message-analyzer
Python 3.12 or 3.13 is required. The project uses Poetry for dependency management.
poetry install --with dev
To 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-analyze
Results 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.main
The repository contains a test suite for the network analysis component. Execute it with pytest:
poetry run pytest
Linting and type checking are performed via Ruff and MyPy. A pre‑commit configuration is provided and can be enabled with:
pre-commit install
Contributions 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.