get

statistics

/statistics

Get aggregated statistics

Returns aggregated statistics about government members and roles.

Parameters

nametyperequireddescription
typequeryrole_count | people_countType of statistic to retrieve
roleIdquerystringRole ID for role_count statistics
levelqueryglobal | federal | state | chamber | roledefault globalAggregate level for statistics
jurisdictionquerystringdefault usJurisdiction for statistics

Example

curl
curl "https://civiclens.io/api/v1/statistics?level=global"
200 response
{
  "data": {
    "total": 9097,
    "level": "global",
    "jurisdiction": "us",
    "byLevel": {
      "federal": 571,
      "local": 235,
      "national": 325,
      "state": 7966
    },
    "byChamber": {
      "lower": 5880,
      "unicameral": 277,
      "upper": 2046
    },
    "byState": {
      "ak": 71,
      "al": 162,
      "ar": 152,
      "as": 1,
      "az": 111,
      "ca": 184,
      "co": 121,
      "ct": 205,
      "dc": 14,
      "de": 74,
      "fl": 198,
      "ga": 264,
      "gu": 1,
      "hi": 87,
      "ia": 166,
      "id": 118,
      "il": 207,
      "in": 407,
      "ks": 181,
      "ky": 157,
      "la": 161,
      "ma": 220,
      "md": 209,
      "me": 201,
      "mi": 173,
      "mn": 221,
      "mo": 213,
      "mp": 1,
      "ms": 190,
      "mt": 165,
      "nc": 197,
      "nd": 152,
      "ne": 65,
      "nh": 426,
      "nj": 144,
      "nm": 126,
      "nv": 80,
      "ny": 252,
      "oh": 159,
      "ok": 168,
      "or": 108,
      "pa": 282,
      "pr": 82,
      "ri": 125,
      "sc": 188,
      "sd": 117,
      "tn": 152,
      "tx": 232,
      "ut": 118,
      "va": 163,
      "vi": 1,
      "vt": 192,
      "wa": 172,
      "wi": 153,
      "wv": 147,
      "wy": 104
    },
    "byCountry": {
      "ad": 3,
      "ae": 2,
      "af": 1,
      "ag": 2,
      "al": 2,
      "am": 3,
      "ao": 1,
      "ar": 1,
      "at": 2,
      "au": 2,
      "az": 2,
      "ba": 4,
      "bb": 2,
      "bd": 2,
      "be": 2,
      "bf": 1,
      "bg": 2,
      "bh": 2,
      "bi": 2,
      "bj": 1,
      "bn": 1,
      "bo": 1,
      "br": 1,
      "bs": 2,
      "bt": 2,
      "bw": 1,
      "by": 2,
      "bz": 2,
      "ca": 2,
      "cd": 2,
      "cf": 2,
      "cg": 2,
      "ch": 7,
      "ci": 2,
      "cl": 1,
      "cm": 2,
      "cn": 2,
      "co": 1,
      "cr": 1,
      "cu": 1,
      "cv": 2,
      "cy": 1,
      "cz": 2,
      "de": 2,
      "dj": 2,
  …

A live response, trimmed to the first records. sourceUrl values are shown redacted in documentation; the API returns the full value.

Responses

200Statistics data
400Bad request - invalid parameters
404Resource not found
500Internal server error

Try it

PlaygroundLive responses from the real API
curl
curl "https://civiclens.io/api/v1/statistics?level=global"