Skip to main content

GET /polling_places

tip

Check out our GraphQL API for a more flexible approach to incorporate BallotReady data in your projects.

Parameters

  • election_id (required): see /elections API for method to fetch id. Required to deliver polling places only for a specific election since these may change
  • latitude (required)
  • longitude (required)
  • street_number (optional) - Example: 1060
  • pre_directional (optional) - Example: West (W)
  • street_name (optional) - Example: Addison
  • street_suffix (optional) - Example: Street (or St)
  • post_directional (optional) Example: SE in 2400 E Capitol St SE
  • city (optional) - Example: Chicago
  • state (optional) - Example: Illinois (IL)
  • zipcode (optional) - Example: 60613

Request Syntax

To query the polling places endpoint, you can hit the /polling_places endpoint. The below election_id = 355 is for the 2019 Texas Runoff election cycle. You must pass in a latitude+longitude. The address parameters (street_number, pre_directional, street_name, street_suffix, post_directional, city, state, zipcode) are optional but if provided will match the polling place to the voter file, instead of our shapefiles. If you provide any address parameters, you must provide all of them (ie you need to provide null fields for things like post_directional, even if street_name and street_number are not null)

curl -H "x-api-key: APIKEY" "https://api.civicengine.com/polling_places?longitude=-96.5939376&latitude=32.70771&election_id=355&street_number=3729&pre_directional=&street_name=ELM+POINT&city=BALCH+SPRINGS&state=TX&zipcode=75180&street_suffix=DR&post_directional="

Response

{
"timestamp": datetime,
"match_mode": {
"election_day": enum("SHAPEFILE", "VOTERFILE"),
"early_voting": enum("SHAPEFILE", "VOTERFILE")
},
"coords": {
"latitude": float,
"longitude": float
},
"results": {
"election_day": [
{
"name": string,
"mail_in_address": string,
"country": string,
"ballot_drop_off": boolean,
"updated_at": datetime,
"in_person_voting": boolean,
"in_person_absentee": boolean,
"timezone": string,
"precinct": string,
"address_line_1": string,
"address_line_2": string,
"city": string,
"state": string,
"zip": string,
"id": string,
"hours": [
{
"updated_at": datetime,
"polling_place_id": integer,
"early_voting": boolean,
"timezone": string,
"close_at": datetime,
"open_at": datetime
}
]
}
],
"early_voting": [
{
"name": string,
"mail_in_address": string,
"country": string,
"ballot_drop_off": boolean,
"updated_at": datetime,
"in_person_voting": boolean,
"in_person_absentee": boolean,
"timezone": string,
"precinct": string,
"address_line_1": string,
"address_line_2": string,
"city": string,
"state": string,
"zip": string,
"id": string,
"hours": [
{
"updated_at": datetime,
"polling_place_id": integer,
"early_voting": boolean,
"timezone": string,
"close_at": datetime,
"open_at": datetime
}
]
}
]
}
}