API Key Registration
Legislative Insights uses Google AI Studio and OpenStates APIs. These services require API keys.
The application uses browser storage to save these keys. A setup screen will appear if the browser does not have a value recorded for the OpenStates API key.
The setup screen can also be accessed by clicking on the Settings button at the top of the page
The setup screen has a link for the API registration page and a field for the API key.
Follow the instructions below to register the API keys.
OpenStates API
OpenStates is an open source project which aims to improve civic engagement at the state level by providing data and tools regarding state legislatures.
The project aggregates legislative information from all 50 states, Washington, D.C., and Puerto Rico. This information is then standardized, cleaned, and published to the public via the OpenStates API.
Legislative Insights uses the OpenStates API to populate the form at the top of the page. Follow the instructions below to register an API key.
-
Navigate to https://openstates.org/api/register/ and sign up for an account
-
Select one of the 3rd party identity providers
-
Click on the Continue link after logging in. Note this is easy to miss (see screenshot below) and may not be visible at all (see video above)
-
Request an API key from the Account Profile page and then copy its value
-
Paste the value into the
Open States API Key
field on the Legislative Insights setup screen.
Google AI Studio API
A Google AI Studio API key is required in order to make calls to the LLM. Navigate to https://aistudio.google.com/app/apikey. Press the Get API key
button
Select a Google Cloud project for the API key:
Copy its value:
Site Level API Keys
By default API keys are set and stored in the browser for each individual user. This avoids exposing the keys to the public internet when following the quick start guide
API keys can be set using environment variables on the Legislative Insights VM as part of a production deployment after the environment has been locked down with access restricted to authorized users.
Copyright © Dito LLC, 2022, 2025