Google Civic Information API
Provides polling places, early vote locations, contest data, election officials, and government representatives for U.S. residential addresses.
Developer tools#openapi#analytics#media
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Provides polling places, early vote locations, contest data, election officials, and government representatives for U.S. residential addresses.
Endpoints 4
divisions
- GETLookup OCDIDs and names for divisions related to an address.
/civicinfo/v2/divisionsByAddress?address=stringLookup OCDIDs and names for divisions related to an address. - GETSearches for political divisions by their natural name or OCD ID.
/civicinfo/v2/divisions?query=stringSearches for political divisions by their natural name or OCD ID.
elections
- GETList of available elections to query.
/civicinfo/v2/elections?productionDataOnly=trueList of available elections to query. - GETLooks up information relevant to a voter based on the voter's registered address.
/civicinfo/v2/voterinfo?address=string&electionId=string&officialOnly=true&productionDataOnly=true&returnAllAvailableData=trueLooks up information relevant to a voter based on the voter's registered address.
API details
- Base URL
https://civicinfo.googleapis.com- Authentication
- OAuth 2.0 (authorization code flow)
An API key in the key query parameter - Operations
- 4 operations on 4 pathsGET 4
- Main resources
- divisions 2elections 2
- Response formats
application/json- Description format
- Google API Discovery, API version
v2 - Links
- Documentation · OpenAPI document
- Listed from
- Google API Discovery document (googleapis/discovery-artifact-manager) (Apache-2.0)
How to test the Google Civic Information API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Google Civic Information API collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow). Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Lookup OCDIDs and names for divisions related to an address.” (GET /civicinfo/v2/divisionsByAddress?address=string), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Google Civic Information API?
Provides polling places, early vote locations, contest data, election officials, and government representatives for U.S. residential addresses. It is listed under Developer tools and has 4 endpoints.
Who publishes the Google Civic Information API?
It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Google Civic Information API?
Requests go to https://civicinfo.googleapis.com. Endpoint paths are added to this base URL.
How do I authenticate with the Google Civic Information API?
It accepts 2 methods: OAuth 2.0 (authorization code flow); an API key in the key query parameter.
How many endpoints does the Google Civic Information API have?
4 operations on 4 paths (4 GET). The largest groups are divisions, elections.
Is forking the Google Civic Information API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.