pub.chive.graph.getCommunities

lexicons.governance.chive.pub

Documentation

Detect communities in the knowledge graph using graph clustering algorithms

main query

Detect communities in the knowledge graph using graph clustering algorithms

Parameters

algorithm string Optional

Community detection algorithm

limit integer Optional

Maximum communities to return

minSize integer Optional

Minimum community size

Output

Encodingapplication/json
algorithm string Required

Algorithm used

Known values: louvain, label-propagation
communities array Required

Detected communities

generatedAt stringdatetime Required

Timestamp when generated

total integer Required

Total communities found

Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
Parameters
Community detection algorithm
Maximum communities to return
Minimum community size
View raw schema
{
  "description": "Detect communities in the knowledge graph using graph clustering algorithms",
  "output": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "algorithm": {
          "description": "Algorithm used",
          "knownValues": [
            "louvain",
            "label-propagation"
          ],
          "type": "string"
        },
        "communities": {
          "description": "Detected communities",
          "items": {
            "ref": "#communityResult",
            "type": "ref"
          },
          "type": "array"
        },
        "generatedAt": {
          "description": "Timestamp when generated",
          "format": "datetime",
          "type": "string"
        },
        "total": {
          "description": "Total communities found",
          "type": "integer"
        }
      },
      "required": [
        "communities",
        "algorithm",
        "total",
        "generatedAt"
      ],
      "type": "object"
    }
  },
  "parameters": {
    "properties": {
      "algorithm": {
        "default": "louvain",
        "description": "Community detection algorithm",
        "knownValues": [
          "louvain",
          "label-propagation"
        ],
        "type": "string"
      },
      "limit": {
        "default": 20,
        "description": "Maximum communities to return",
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      },
      "minSize": {
        "default": 2,
        "description": "Minimum community size",
        "minimum": 1,
        "type": "integer"
      }
    },
    "type": "params"
  },
  "type": "query"
}
communityResult object

Community detection result

Properties

communityId integer Required

Community identifier

members array of string Required

Member URIs

size integer Required

Number of members

View raw schema
{
  "description": "Community detection result",
  "properties": {
    "communityId": {
      "description": "Community identifier",
      "type": "integer"
    },
    "members": {
      "description": "Member URIs",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "representativeMembers": {
      "description": "Representative members with labels",
      "items": {
        "ref": "#representativeMember",
        "type": "ref"
      },
      "type": "array"
    },
    "size": {
      "description": "Number of members",
      "type": "integer"
    }
  },
  "required": [
    "communityId",
    "members",
    "size"
  ],
  "type": "object"
}
representativeMember object

Representative community member

Properties

label string Required

Member label

uri string Required

Member AT-URI

View raw schema
{
  "description": "Representative community member",
  "properties": {
    "label": {
      "description": "Member label",
      "type": "string"
    },
    "uri": {
      "description": "Member AT-URI",
      "type": "string"
    }
  },
  "required": [
    "uri",
    "label"
  ],
  "type": "object"
}

Lexicon Garden

@