VoterGuideOS

Find districts

Returns paginated districts.

GET
/districts

Query Parameters

$limit?integer

Maximum number of records to return.

Range0 <= value
$skip?integer

Number of records to skip.

Range0 <= value
$sort?

Sort object, for example $sort[createdAt]=-1.

$search?string

Full-text/fuzzy search for districts by name and related public labels.

type?string

District type from the shared districtTypes constants.

Value in"country" | "state" | "congressional" | "state-utilities" | "state-utilities-subdistrict" | "state-legislative" | "state-senate" | "state-house" | "state-school" | "state-school-subdistrict" | "state-school-bond-district" | "county" | "county-district" | "county-super-district" | "county-school-district" | "county-school-super-district" | "state-transportation" | "county-district-court" | "city" | "city-council" | "city-school-board" | "city-super-school-board" | "judicial-circuit" | "judicial-district" | "superior-court" | "prosecutorial" | "supreme-court" | "court-of-appeals" | "us-judicial-district" | "fire-advisory" | "fire-protection" | "magisterial" | "park" | "hospital" | "water" | "soil" | "community" | "reservation" | "community-council" | "soil-conservation" | "precinct" | "county-utilities" | "justice-precinct" | "appellate-sub-division" | "elementary" | "technical-education" | "technical-education-subdistrict" | "community-college" | "community-college-subdistrict" | "township" | "municipal-court-district" | "city-court" | "state-water" | "state-board-of-education" | "healthcare" | "healthcare-subdistrict" | "county-library" | "library" | "borough" | "city-parks" | "village" | "town" | "village-district" | "town-council" | "natural-resource-district" | "natural-resource-subdistrict" | "board-of-regents" | "public-service-commission"
parentId?string

Filters direct children of a parent district.

Match^[a-fA-F0-9]{24}$

Header Parameters

X-Organization-Id*string

The ID of the organization making the request.

Response Body

application/json

Paginated district results.

TypeScript Definitions

Use the response body type in TypeScript.

curl -X GET "https://example.com/districts" \  -H "X-Organization-Id: org_123"
{
  "total": 1,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "5f398f1bb644373788484720",
      "type": "state-house",
      "matchName": "ga-house-77",
      "createdAt": "2020-08-16T19:55:07.253Z",
      "updatedAt": "2022-03-31T03:08:23.864Z",
      "number": 77,
      "parentId": "5f398f1bb64437378848477a",
      "votingType": "voting-district",
      "population": 59511,
      "parentsFlat": [
        "5f398f1bb64437378848477a"
      ],
      "populationType": "divided",
      "intersectingCities": [
        "610dba0152ecf330c08687c2",
        "610d80c3e8dc2c24873be6a6",
        "610db9ec52ecf330c086876a",
        "610db9e952ecf330c086875e"
      ],
      "intersectingCounties": [
        "5f398f1cb6443737884848d4"
      ],
      "name": null,
      "parent": "Georgia",
      "translationAvailable": true,
      "longName": "State House District 77",
      "shortName": "District 77"
    }
  ]
}