APIHub
Back to Explore

Google Civic Information API

The Google Civic Information API provides searchable U.S. political divisions, lists upcoming elections, returns representative and office details for a specific address or OCD division, and supplies voter‑specific information such as polling places and early vote locations. It also supports filtering results by office level, role, and recursive inclusion of sub‑divisions.

Analytics
none
HTTPS
CORS: Unknown
Description enriched
Visit official documentation

Latency

201ms p95

Uptime

100.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
GET

/civicinfo/v2/divisions

Searches for political divisions by their natural name or OCD ID.

  • query (query) — The search query. Queries can cover any parts of a OCD ID or a human readable division name. All words given in the query are treated as required patterns. In addition to that, most query operators of the Apache Lucene library are supported. See http://lucene.apache.org/core/2_9_4/queryparsersyntax.html
GET

/civicinfo/v2/elections

List of available elections to query.

GET

/civicinfo/v2/representatives

Looks up political geography and representative information for a single address.

  • address (query) — The address to look up. May only be specified if the field ocdId is not given in the URL
  • includeOffices (query) — Whether to return information about offices and officials. If false, only the top-level district information will be returned.
  • levels (query) — A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned.
  • roles (query) — A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned.
GET

/civicinfo/v2/representatives/{ocdId}

Looks up representative information for a single geographic division.

  • ocdId (path, required) — The Open Civic Data division identifier of the division to look up.
  • levels (query) — A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned.
  • recursive (query) — If true, information about all divisions contained in the division requested will be included as well. For example, if querying ocd-division/country:us/district:dc, this would also return all DC's wards and ANCs.
  • roles (query) — A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned.
GET

/civicinfo/v2/voterinfo

Looks up information relevant to a voter based on the voter's registered address.

  • address (query, required) — The registered address of the voter to look up.
  • electionId (query) — The unique ID of the election to look up. A list of election IDs can be obtained at https://www.googleapis.com/civicinfo/{version}/elections. If no election ID is specified in the query and there is more than one election with data for the given voter, the additional elections are provided in the otherElections response field.
  • officialOnly (query) — If set to true, only data from official state sources will be returned.
  • returnAllAvailableData (query) — If set to true, the query will return the success code and include any partial information when it is unable to determine a matching address or unable to determine the election for electionId=0 queries.

5 endpoints auto-detected

curl -X GET \
  "https://civicinfo.googleapis.com/civicinfo/v2/divisions"

civicinfo.googleapis.com · HTTPS only