Skip to main content
GET
/
api
/
communities
Communities
curl --request GET \
  --url https://api.example.com/api/communities
{
  "communities": [
    {}
  ],
  "modularity": 123,
  "iterations": 123,
  "community_count": 123
}
Community detection requires the Normal profile. It is disabled on the Free profile.

Response

communities
CommunityResponse[]
Array of detected communities.
modularity
number
Modularity score.
iterations
integer
Number of algorithm iterations.
community_count
integer
Total number of communities.

CommunityResponse

FieldTypeDescription
community_idu64Community identifier
node_idsu64[]Node IDs in the community
sizeusizeNumber of nodes
{
  "communities": [
    {
      "community_id": 1,
      "node_ids": [1, 5, 12, 34, 56],
      "size": 5
    },
    {
      "community_id": 2,
      "node_ids": [2, 8, 15, 22],
      "size": 4
    }
  ],
  "modularity": 0.68,
  "iterations": 3,
  "community_count": 2
}