Has anyone used the Google Civic Information API

Before I start going down a rabbit hole I was wondering how I would access this API and if anyone had used this API before?

I’m a complete newbie here! I am trying to use Google Civic’s API on a project, but am running into a wall. Did you find any help?

Any success here?

Is not the Civic API is pretty straightforward.

Get the API key from the google console and call the REST API via the API connector.

@roswellfieldcompany let me know if you find any issues.

Thanks for the response.

I don’t think there is much explanation of how to insert the API key - is it a “private key in URL” or “private key in Header”. I have an API key from Google but I get an error code that it’s “missing a valid API key”.

Further, the difference/application of headers and parameters is not clear to me yet.


This is how you need to set up the API, nothing in the header.

@roswellfieldcompany

1 Like

Do I insert the values in the brackets in the get bar or insert the value in the value box on the key line?

https://www.googleapis.com/civicinfo/v2/voterinfo?key[You_API_KEY]&[address_info]&[election ID]

or

https://www.googleapis.com/civicinfo/v2/voterinfo?key[actual api key value]&[actual address info]

What is the authentication method on the top? I assume none since it’s in the get address.

Authentication method = None

In the URL, you are missing the key.

@roswellfieldcompany

1 Like

My goal is to build an address input which then uses the civic API to return certain data. The address is not constant as its the user’s address in my app. It seems, however, that I must insert an address in the API connector or I receive an error message. I’d like the data returned to be based on an address specified by a user in my app. Any ideas or suggestions?