OpenStates Legislation Crawler - 50-State Bill Tracker
OpenStates Legislation Crawler — 50-State Bill Tracker
Track legislation across all 50 US states and territories using the OpenStates API. Returns bill metadata, sponsors, vote summaries, actions, and document versions for any jurisdiction, session, or subject combination. Supports delta mode (updatedSince) for incremental daily polling of changed bills.
What does the OpenStates Legislation Crawler do?
- Queries the OpenStates GraphQL API for state and territorial legislation across all US jurisdictions
- Returns bill ID, title, chamber, session, classification, subjects, sponsors, actions, votes, and source document links
- Supports filtering by jurisdiction, session, subject, keyword query, classification, and last-updated date
- Delta mode: set
updatedSinceto retrieve only bills changed since a given date — ideal for daily scheduled runs - Rate-limited to respect the free API tier (~30 req/min with 2.2s request delay)
Authentication required. A free OpenStates API key is required. Registration takes under 2 minutes at https://openstates.org/accounts/signup/ — no payment needed for the free tier.
What data does it extract?
| Field | Description |
|---|---|
bill_id |
Full bill identifier (e.g. ocd-bill/...) |
jurisdiction |
Jurisdiction name (e.g. California) |
jurisdiction_id |
OpenStates jurisdiction ID |
state_abbr |
Two-letter state abbreviation |
session |
Legislative session identifier |
chamber |
upper (Senate) or lower (House/Assembly) |
bill_number |
Bill number (e.g. SB 123, HB 456) |
title |
Bill title as introduced |
classification |
Bill type: bill, resolution, joint resolution, concurrent resolution, memorial, constitutional amendment |
subjects |
Comma-separated subject tags |
first_action_date |
Date of first legislative action (ISO 8601) |
latest_action_date |
Date of most recent action (ISO 8601) |
latest_action_description |
Description of the most recent action |
latest_passage_date |
Date of passage if applicable |
sponsors |
Array of name:classification strings (e.g. Smith, Jane:primary) |
primary_sponsor |
Name of the primary sponsor |
actions |
Array of date|chamber|description strings (e.g. 2025-03-15|upper|Referred to Committee on Finance) |
votes_summary |
Array of date|chamber|result|yes:N|no:N|absent:N strings |
versions |
Array of note|date|url strings linking to bill text |
source_urls |
Source URLs on the state legislature's website |
openstates_url |
OpenStates page for this bill |
created_at |
Record creation timestamp in OpenStates |
updated_at |
Record last-updated timestamp in OpenStates |
How to use it
Set your apiKey first. Then filter by jurisdiction (California, Texas, ny, etc.), subject keyword, or classification. For recurring monitoring, use updatedSince with a daily schedule.
| Field | Type | Default | Description |
|---|---|---|---|
apiKey |
string | — | OpenStates API key (required). Free at openstates.org/accounts/signup/ |
jurisdiction |
string | — | State or territory name or abbreviation (e.g. California, ny, Texas) |
session |
string | — | Legislative session identifier |
subject |
string | — | Subject tag filter |
query |
string | — | Full-text keyword search across bill titles and text |
classification |
string | — | bill, resolution, concurrent resolution, joint resolution, memorial, constitutional amendment |
updatedSince |
string | — | ISO 8601 date — returns only bills updated after this date (delta mode) |
sortOrder |
string | — | Sort order for results |
includeVotes |
boolean | true |
Include votes_summary array in output |
includeActions |
boolean | true |
Include actions array in output |
includeVersions |
boolean | true |
Include versions document links in output |
maxItems |
integer | 100 |
Maximum bills to return |
Running on a Schedule (Delta Mode)
To monitor bill activity without re-fetching the full corpus daily:
- Set
updatedSinceto yesterday's date (e.g.2025-03-14) - Set your
jurisdictionand any subject filters - Schedule the actor to run daily on Apify
- Each run returns only bills modified since the prior run date
This pattern keeps daily runs small (typically a few hundred records) while maintaining a complete picture of active legislation when combined with your historical baseline dataset.
Use cases
- Legislative monitoring and alerting — Track bills matching specific keywords (
query) or subjects across one or more states; trigger alerts whenlatest_action_descriptionchanges orlatest_passage_dateis populated. - Policy analysis and research — Analyze legislative activity patterns by
classification, session, and sponsor across jurisdictions to identify policy trends and multi-state legislative coordination. - Regulatory compliance tracking — Monitor bills in specific subject areas (healthcare, financial services, privacy) across all states simultaneously using subject filters and delta polling.
- Journalism and transparency — Pull sponsor data and vote summaries for investigative stories; link
source_urlsto the original state legislature records for verification. - Civic technology and advocacy — Power constituent-facing bill tracking tools with structured, normalized data that spans all 50 states without scraping 50 different legislative websites.
FAQ
How do I parse the pipe-delimited action and vote fields?
Actions are returned as strings in the format date|chamber|description, e.g. 2025-03-15|upper|Referred to Committee on Finance. Split on | to get three components. Vote summaries follow date|chamber|result|yes:N|no:N|absent:N — parse the count suffix by splitting on :.
What jurisdictions are available?
OpenStates covers all 50 US states plus DC, Puerto Rico, Guam, the US Virgin Islands, and several other territories. Pass the full jurisdiction name (e.g. California) or a two-letter abbreviation (e.g. ca) in the jurisdiction field.
How many bills can the free API tier return? The free OpenStates API tier allows up to approximately 30 requests per minute. The actor enforces a 2.2-second delay between requests. For large full-corpus pulls (e.g. all California bills), expect multi-hour run times. Delta mode significantly reduces this for ongoing monitoring workflows.
Results are available for export in JSON, CSV, and Excel formats from the Apify dataset tab.