Openstates

Open States API v3

* [More documentation](https://docs.openstates.org/en/latest/api/v3/index.html) * [Register for an account](https://openstates.org/accounts/signup/) We are…

Data & analytics#openapi#open-data

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

We are currently working to restore experimental support for committees & events.

During this period please note that data is not yet available for all states
and the exact format of the new endpoints may change slightly depending on user feedback.

If you have any issues or questions use our
GitHub Issues to give feedback.

Endpoints 12

bills

  • GETBills Search/bills?jurisdiction=string&session=string&chamber=string&identifier=&classification=string&subject=&updated_since=string&created_since=string&action_since=string&sort=updated_desc&sponsor=string&sponsor_classification=string&q=string&include=&page=1&per_page=10&apikey=stringSearch for bills matching given criteria. Must either specify a jurisdiction or a full text query (q). Additional parameters will futher restrict bills…
  • GETBill Detail By Id/bills/ocd-bill/:openstates_bill_id?include=&apikey=stringObtain bill information by internal ID in the format ocd-bill/*uuid*.
  • GETBill Detail/bills/:jurisdiction/:session/:bill_id?include=&apikey=stringObtain bill information based on (state, session, bill_id).

committees

  • GETCommittee List/committees?jurisdiction=string&classification=committee&parent=string&chamber=legislature&include=&apikey=string&page=1&per_page=20
  • GETCommittee Detail/committees/:committee_id?include=&apikey=stringGet details on a single committee by ID.

events

  • GETEvent List/events?jurisdiction=string&deleted=false&before=string&after=string&require_bills=false&include=&apikey=string&page=1&per_page=20
  • GETEvent Detail/events/:event_id?include=&apikey=stringGet details on a single event by ID.

jurisdictions

  • GETJurisdiction List/jurisdictions?classification=state&include=&page=1&per_page=52&apikey=stringGet list of supported Jurisdictions, a Jurisdiction is a state or municipality.
  • GETJurisdiction Detail/jurisdictions/:jurisdiction_id?include=&apikey=stringGet details on a single Jurisdiction (e.g. state or municipality).

people

  • GETPeople Search/people?jurisdiction=string&name=string&id=&org_classification=legislature&district=string&include=&page=1&per_page=10&apikey=stringGet list of people matching selected criteria. Must provide either jurisdiction, name, or one or more id parameters.
  • GETPeople Geo/people.geo?lat=0.0&lng=0.0&include=&apikey=stringGet list of people currently representing a given location. Note: Currently limited to state legislators and US Congress. Governors & mayors are not included.
  • GETMetrics/metricsEndpoint that serves Prometheus metrics.

API details

Authentication
None declared in the description
Operations
12 operations on 12 pathsGET 12
Main resources
bills 3committees 2events 2jurisdictions 2people 2
Response formats
application/json
Description format
OpenAPI 3.0.2, API version 2021.11.12
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the Open States API v3 in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Open States API v3 collection, without the publisher's secrets.
  3. Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
  4. Send a requestPick an endpoint, for example “Bills Search” (GET /bills?jurisdiction=string&session=string&chamber=string&identifier=&classification=string&subject=&updated_since=string&created_since=string&action_since=string&sort=updated_desc&sponsor=string&sponsor_classification=string&q=string&include=&page=1&per_page=10&apikey=string), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Open States API v3?

* [More documentation](https://docs.openstates.org/en/latest/api/v3/index.html) * [Register for an account](https://openstates.org/accounts/signup/) We are… It is listed under Data & analytics and has 12 endpoints.

Who publishes the Open States API v3?

It is listed from Openstates's public API description (an OpenAPI document), not published by Openstates on Swastik Codes. Anyone who controls openstates.org can claim the profile by adding a DNS TXT record.

How do I authenticate with the Open States API v3?

Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.

How many endpoints does the Open States API v3 have?

12 operations on 12 paths (12 GET). The largest groups are bills, committees, events, jurisdictions.

Is forking the Open States API v3 free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.