LegiScan API
The LegiScan API is the data service providing structured JSON information for legislation in all 50 states and Congress that is the heart of the turnkey OneVote / GAITS tracking platform. Giving access to raw bill detail information, status, sponsors, full bill texts, roll call records and more to both public and private entities.
Utilizing the LegiScan API allows other organizations, civic groups or private citizens easy access to the data produced in the multitude pieces of legislation introduced each year. This data can then be used to power product offerings, offer in-depth analysis, drive engagement & outreach programs or in other ways that only you can imagine.
Interaction requires creating an API key associated with any valid LegiSacn account. Registration is free so Signup Now! Once your account is created and authenticated, return to this page to generate your key which will grant you immediate access to the API.
- LegiScan API Manual
- LegiScan API Weekly Datasets
- LegiScan API Client Source Documentation
- LegiScan API Client Source
LegiScan API by LegiScan LLC is licensed under CC BY 4.0
LegiScan API Services
The LegiScan API comes in two interface flavors: pull and push across three service levels: Public, Pull, Push; all service levels have access to the same national legislative database.
- Public API
- Free public service of the pull interface, meaning you are responsible for spending queries on API operations to obtain and update bill data; limited to 30,000 queries per month.
- Pull API
- Introductory subscription service in the same pull interface as the Public service with 100,000-250,000 queries per month.
- Push API
- The enterprise interface used to drive third party applications that fully replicates the national database with updates every 4 hours as standard or optionally every 15 minutes.
LegiScan API Client
This application is provided as a means to quickly get started working with API data with a provided database schema (ERD).
The bulk import utility is a great place to start to immediately onboard data. For experimenting with API try the command line interface or the web interface.
And for a deeper dive into the API internals look into LegiScan_Pull and LegiScan_Process.
Bulk Import
Using the getDataset API hooks automatically, a manually downloaded copy of a weekly Public Datasets, or a custom subscriber bulk-load snapshot, this script will extract the contents of the archive and import/update data as needed.
Pull Update Daemon
This provides a background daemon process that will keep a local database synchronized with the LegiScan Pull API using one of four different methods:
- Monitored
- Synchronize a specific user defined list of individual bills.
- State
- Synchronize the entire master list of bills from one or more states.
- Search (National)
- Pulls the results of full-text searches ran against the national database with relevance cutoffs.
- State Search
- Combines both of the other methods such that the searches are ran against the states list instead of national.
Push Endpoint
Serves as the endpoint listener for LegiScan Push API subscription services which will receive payloads from the LegiScan Push server and process them into the provided SQL database.
Middleware Signaling
Supports signaling a third party application when bill and related data changes so that additional processing can be done. The use case for this would be when the LegiScan API database is used as staging for another custom production system already in place.