Find similar nodes

Nodes whose position in the network is most like this one. Cosine similarity of 64-dimension embeddings learned from the whole graph (shared neighbors and neighbors of neighbors), served from Vectorize. Filter by kind for "members most like this member".

GET https://www.chicagopolitics.org/api/v1/graph/nodes/{id}/similar

Authorizations

HeaderValue
AuthorizationBearer <key>. Get a key; see authentication.

Path parameters

NameTypeRequiredDescription
idstringyesNode id

Query parameters

NameTypeRequiredDescription
kindstringOne of: member, committee, matter, donor, employer, lobbyist, client.
limitintegerDefault 10.

Response

200 Similar nodes

Example request

curl "https://www.chicagopolitics.org/api/v1/graph/nodes/{id}/similar" \
  -H "Authorization: Bearer $CHICAGO_POLITICS_KEY"

Errors: 400, 401, 404, 429 (see errors).