Infomap Python API

Infomap is a network clustering algorithm based on the Map equation. This site documents the Python package: installation, a quick start, usage patterns for NetworkX, igraph and multilayer graphs, and the full API reference.

Quick start

pip install infomap
import networkx as nx
import infomap

graph = nx.karate_club_graph()
communities = infomap.find_communities(graph, seed=123, num_trials=20)

print(communities)

Continue to Installation for optional integrations and shell completion, or jump to Quick start for the smallest Python API examples.

For Jupyter, start with the flagship quickstart notebook. It shows the notebook-native Infomap result summary, dataframe inspection, and a copyable static network partition helper.

Choose a path

Core pages

  • Installation — install the package, optional integrations, and the infomap CLI entry point.

  • Quick start — small Python API examples for first runs and result access.

  • API usage patterns — API patterns for common graph containers and result access.

  • Notebook examples — executed notebooks for practical Infomap workflows and survey companion material.

External resources