All endpoints expect an HTTP GET request and respond in JSON format. The base URL for API requests is https://elections.api.aclu.org
.
Get an Apple Wallet pkpass based on polling place info.
Arguments:
address
: The polling place addresshours
: The polling place hourslat
: Latitudelng
: Longitude
Old V1 lookup (V2 version is returning an invalid pass as of 04/2020)
Get an election calendar for a given state.
Arguments:
format
: Response format (optional; json or ics).state
: The state to load (e.g., ny).
Example lookup | Example response
Congress election lookup by location.
Arguments:
geometry
: Include GeoJSON geometries with districts (optional; geometry=1)lat
: Latitudelng
: Longitude
Example lookup | Example response
Congressional district lookup by location.
Arguments:
geometry
: Include GeoJSON geometries with districts (optional; geometry=1)lat
: Latitudelng
: Longitude
Example lookup | Example response | Example response with geometry
Index of all congressional legislators.
Arguments:
id
: Numeric part of aclu_id (optional; returns a single match).include
: Fields to include (optional; include=name)session
: Congressional session (optional; defaults to 116)url_slug
: State and name URL slug (optional; returns a single match).
Example lookup | Example response
Index of congressional legislator scores.
Arguments:
session
: Congressional session (optional; defaults to 116)
Example lookup | Example response
County election lookup by location.
Arguments:
geometry
: Include GeoJSON geometries with districts (optional; geometry=1)lat
: Latitudelng
: Longitude
Example lookup | Example response
Get an approximate lat/lng location based on IPv4.
Arguments:
ip
: The IPv4 address to look up (optional; e.g., 38.109.115.130)legislators
: Use the resulting location to do a point-in-polygon congress_legislators lookup. (optional; set to 1 to include)pip
: Use the resulting location to do a point-in-polygon lookup. (optional; set to 1 to include state-level pip results)
Example lookup | Example response
Look up Google Civic Info for an election. Information is only available and returned during an election.
Arguments:
address
: Address search string.ocd_id
: An Open Civic Data ID for the election.
Point in polygon election lookup by location.
Arguments:
geometry
: Include GeoJSON geometries with districts (optional; geometry=1)id
: Hyphen-separated list of numeric IDs (alternative to lat/lng)lat
: Latitudelng
: Longitudestate
: Instead of lat/lng or id, specify a state (e.g., state=ny)
Example lookup | Example response
State election lookup by location.
Arguments:
geometry
: Include GeoJSON geometries with districts (optional; geometry=1)lat
: Latitudelng
: Longitudestate
: Instead of lat/lng or id, specify a state (e.g., state=ny)
Example lookup | Example response
State legislature election lookup by location.
Arguments:
geometry
: Include GeoJSON geometries with districts (optional; geometry=1)lat
: Latitudelng
: Longitude