LegiScan API Guide: Bills, Votes, Datasets, and Joining Them to Enacted Law

Title card for the Vaquill AI guide: LegiScan API Guide: Bills, Votes, Datasets, and Joining Them to Enacted Law

Short answer: the LegiScan API is a JSON service for legislation as it moves: bills, status, sponsors, bill text, roll call votes and legislators, for the 50 states and Congress. A free key gives you 30,000 queries a month. Paid pull and push levels add volume and near real-time delivery. It does not hold the codified statute book, so a bill marked passed tells you what the legislature did. The code says what the law is today. To get that, join the bill to the code sections it changed. The cleanest key is the bill number printed in each section's history line.

TL;DR

  • LegiScan offers three levels over one national database: a free Public key (30,000 queries a month), a Pull subscription (100,000 to 250,000 a month) and an enterprise Push feed that replicates the database.
  • You get bill detail, full bill text, roll calls, sponsors and subjects, plus weekly bulk datasets you can load before you start polling.
  • The data is about bills, votes and people. A passed bill and a current statute section are different objects with different identifiers.
  • Joining the two is a per-state parsing job. The reliable bridge is the history line in the code, which names the session, chapter and bill.
  • Use LegiScan for bill movement, votes and sponsors. Add a codified-law source when users also need current section text and effective dates.
Judgment call
Question 1 of 4

Your alerting app watches 3,000 bills through a bill-tracking API with a monthly query cap. It fetches the full record for every bill each hour and burns the allowance in days. What is the best fix?

Part of our MCP and developer guide series.

The free alternative for state legislature data is covered in our Open States API guide. For the code side of the join, see the US statutes API guide and Legal API in 2026.

What the LegiScan API gives you

Everything below about limits, service levels and operations comes from LegiScan's own API page, datasets page and API manual (API manual revision 20250317, v1.91), read in October 2026. Check those pages for current limits. LegiScan runs a legislative tracking service and sells the data behind it as an API. You register a free account, generate a key on the LegiScan API page, and every request is a GET with the key and an op parameter. Responses are JSON.

The operations that matter most:

  • getSessionList and getMasterList list legislative sessions and every bill in one.
  • getBill returns the full record: sponsors, committee referrals, history, subjects, bill texts, amendments, supplements such as fiscal notes, roll calls and hearing calendar entries.
  • getBillText returns one version of the bill (introduced, amended, enrolled, chaptered and so on). The document comes back base64 encoded, because many states publish PDFs.
  • getRollCall returns each legislator's vote on one roll call, keyed by people_id.
  • getPerson and getSessionPeople return legislators with party, role, district and IDs for Ballotpedia, VoteSmart, OpenSecrets and Follow the Money.
  • getSearch runs a full-text search across the national database and returns 50 results a page. getSearchRaw returns up to 2,000.
  • getDatasetList and getDataset download the weekly bulk files.

Each record carries a change_hash. That one field shapes the whole update workflow, so it is worth understanding before you write a loop.

A short history, and what it has been used for

LegiScan calls itself "the nation's first impartial real-time legislative tracking service" on its about page, and says the API behind it has "nearly 20 years of development maturity." That is the company's own description, so read it as a claim and not a ranking. What an outside reader can check is how people have used it.

In 2019 two librarians at Willamette University, Joni Roberts and Carol Drost, reviewed LegiScan for College & Research Libraries News. They noted that the free part of the site lets you monitor a single state and Congress, and that paid subscriptions cover multiple states. They also said the site covered 2010 to the present at that point. Their praise was specific: "the ability to see at a glance the status, summary, and last activity of a bill." They said it may be a free or lower-cost option, most useful to policy analysts and researchers, with some use for students (Roberts and Drost, College & Research Libraries News, November 2019).

The biggest public example is a 2019 investigation by USA TODAY, The Arizona Republic and the Center for Public Integrity into copycat bills. The reporter's methodology note says: "Using data provided by LegiScan, which tracks every proposed law introduced in the U.S., we pulled in digital copies of nearly 1 million pieces of legislation introduced between 2010 and Oct. 15, 2018." The team compared those bills against more than 2,100 model bills written by special-interest groups, and the headline finding was 10,000 times that lawmakers introduced copycat bills (Rob O'Dell, Center for Public Integrity, April 2019).

Notice what the reporters needed: a uniform record for every bill in every state, with full text, in bulk. That is the job the weekly datasets described below are for. The same note says the data included only "a limited number of bills from 2008 and 2009," which is a fair reminder to check how far back any bill source goes before you promise a history.

Pull, push, and the weekly datasets

All service levels read from the same national database. What changes is who does the asking and how many questions you may ask.

LevelInterfaceVolumeFreshness
PublicPull, free key30,000 queries a monthYou poll
PullPull, subscription100,000 to 250,000 queries a monthYou poll
PushLegiScan sends payloads to your endpointReplicates the national databaseEvery 4 hours as standard, or every 15 minutes on request

Subscription fees are annual and set by the number of states you cover, with Congress counting as one. LegiScan publishes its price list as a PDF on its site, so use LegiScan's current price list for fees. Datasets are separate: LegiScan builds weekly snapshots of bills, votes and legislators on Sunday mornings, as CSV or as the same JSON the API returns. You need a free account to download them. For near real-time replication, other licensing terms or the full bill-text corpus, LegiScan asks you to inquire directly.

One detail saves queries. The manual gives a refresh guideline for each operation, for example one hour for getMasterList and three hours for getBill. Ask sooner and LegiScan serves the cached copy but still counts the query. The manual also says most use cases are fine with daily updates.

Your first calls

Start with the sessions for a state, then pull its master list.

curl "https://api.legiscan.com/?key=$LEGISCAN_API_KEY&op=getSessionList&state=TX"

Take a session_id from the response, then ask for the cheap version of the master list:

curl "https://api.legiscan.com/?key=$LEGISCAN_API_KEY&op=getMasterListRaw&id=SESSION_ID"

The manual documents the response as a list of bills with only the fields you need to detect change:

{
  "status": "OK",
  "masterlist": {
    "0": { "bill_id": 1132030, "number": "AB1", "change_hash": "d72444d8f2026219e38cb2179dcc67a0" },
    "1": { "bill_id": 1131894, "number": "AB2", "change_hash": "d733e82d03a815e568f92e66f6fd87dc" }
  }
}

Every response carries a status. A good one is "OK". A failure comes back as "status": "ERROR" with an alert.message that explains it, so check status before you parse the rest. Log a bad or exhausted key as an error and never skip the bill silently.

The manual's recommended loop is short. Bulk load the weekly dataset once. Then call getMasterListRaw on a schedule, compare each bill's change_hash with the one you stored, and call getBill only for bills whose hash moved. LegiScan also ships an open API client with a SQL schema, a pull daemon and a push listener, if you would rather start from working code.

Loading diagram...

When LegiScan is exactly the right tool

LegiScan fits a clear set of jobs, and it does them well.

Government affairs and advocacy tools. Alerts when a bill matching a topic is introduced, amended or voted on. The full-text search, the per-bill history and the roll call data cover this directly.

Vote and sponsor analysis. Roll calls are keyed to legislators by people_id, and the person records link to campaign finance and ballot sites. If you want to chart how members voted across sessions, the model is already there.

Multi-state dashboards. One schema across states is the product. Legislature websites differ in every state, and the uniform bill record is the reason to pay for a service instead of writing fifty scrapers.

Research datasets. The weekly JSON and CSV files let you build a history without spending queries.

If your product stops at bill tracking, the integration work is polling and deduplicating LegiScan data. If users also ask what the law is now, the next sections cover the bill-to-code join.

Bills and enacted law are different objects

A bill is a proposal with a life cycle. It is introduced, amended, passed by one chamber, passed by the other, signed or vetoed, and chaptered. It exists in several text versions, and each version is a document describing a change. LegiScan models that life cycle faithfully: status values such as Introduced, Engrossed, Enrolled, Passed and Vetoed, plus text types including Enrolled and Chaptered.

A statute is the body of law after those changes are applied. It lives in a code, organized by title, chapter and section, and each section has one current text. The state publishes it on its own schedule, usually after the session ends.

Bill (LegiScan)Statute section (code)
Identifierbill_id, SB181Tex. Business & Commerce Code § 541.051
VersionsIntroduced, amended, enrolled, chapteredOne current text, plus history
ChangesStatus and votes move oftenChanges when a published act takes effect
Question it answersWhat is the legislature doing?What does the law say now?

Three consequences follow.

Identifiers do not match. A LegiScan record is bill_id 1167968 or SB181. A code section is Tex. Business & Commerce Code § 541.051. Neither contains the other.

One bill touches many sections, and a section can be touched by many bills. A privacy act might add forty new sections and amend six existing ones. A single section may be amended in four different sessions.

Passed does not mean in force. The Texas Act in the example below was passed in 2023, and its sections carry an effective date of July 1, 2024. LegiScan's status_date and the section's effective date are different facts, and a product that treats them as one will tell users a rule applies months early.

A chaptered bill often reads as instructions ("Section 541.051 is added to the Business & Commerce Code"), so it will not show you the finished wording.

How to join a bill to the sections it changed

Most state codes print a history line under each section. In Texas, the text of Business & Commerce Code § 541.051 ends like this:

Added by Acts 2023, 88th Leg., R.S., Ch. 995 (H.B. 4), Sec. 2, eff. July 1, 2024.

That one line carries the year, the legislature, the session chapter, the bill number and the effective date. It is the bridge. LegiScan gives you HB4 for Texas in 2023, and the code gives you every section whose history line names H.B. 4 in that session.

A getBill response, trimmed to the fields this join reads, has this shape in the manual:

{
  "status": "OK",
  "bill": {
    "bill_id": 1167968,
    "state": "MD",
    "bill_number": "SB181",
    "title": "Education - Child Care Subsidies - Mandatory Funding Level",
    "status": 4,
    "status_date": "2019-05-25",
    "session": { "year_start": 2019, "year_end": 2019 },
    "history": [
      { "date": "2019-05-25", "action": "Enacted under Article II, Section 17(c) of the Maryland Constitution - Chapter 596" }
    ]
  }
}

The join has three steps:

  1. From LegiScan, read state, bill_number, the title and the session year.
  2. Search the state code for sections amended since that year, scoped to the state.
  3. Keep the sections whose history line names your bill, and read their current status and effective date.

Here is the second half in Python, using the Vaquill AI statutes API as the code source. The search is scoped with corpusType and state, trimmed with fields, and filtered with yearFrom. Request fields and responses are documented in the API docs. We ran it against the live endpoint with the Texas bill above.

import os
import re
import requests

URL = "https://api.vaquill.ai/api/v1/us/statutes/search"
HEADERS = {"Authorization": f"Bearer {os.environ['VAQUILL_API_KEY']}"}

# From a LegiScan getBill response: state, bill_number, title, session year.
bill = {"state": "TX", "bill_number": "HB4",
        "title": "Texas Data Privacy and Security Act", "year": 2023}

# LegiScan says "HB4". A Texas history line prints "H.B. 4".
letters, digits = re.match(r"([A-Z]+)(\d+)$", bill["bill_number"]).groups()
printed = ".".join(letters) + ". " + digits
pattern = re.compile(rf"Acts {bill['year']}, .*?\({re.escape(printed)}\)")

resp = requests.post(URL, headers=HEADERS, json={
    "query": bill["title"],
    "corpusType": "STATE",
    "state": bill["state"].lower(),
    "yearFrom": bill["year"],
    "limit": 25,
    "fields": ["history", "historyEffectiveDate", "actStatus"],
})
resp.raise_for_status()

results = resp.json()["results"]
if not results:
    raise SystemExit("No sections found: widen yearFrom or check the title")

for row in results:
    # history can be null on sources that print no credit line
    if pattern.search(row.get("history") or ""):
        print(row["actId"], row["actStatus"], row["historyEffectiveDate"])

A row from the live response looks like this. actId and citation always come back, and the other fields are the ones you asked for:

{
  "actId": "STATE_TX_Cbc_C541_S541.051",
  "citation": "Tex. Business & Commerce Code § 541.051",
  "actStatus": "in_force",
  "historyEffectiveDate": "2024-07-01",
  "history": "Added by Acts 2023, 88th Leg., R.S., Ch. 995 (H.B. 4), Sec. 2, eff. July 1, 2024."
}

The search endpoint rejects an unknown field name or state with a 422 and returns a 429 with a Retry-After header when you pass your plan's rate limit, so raise_for_status() plus a back-off covers the common failures. The request shapes follow OpenAPI document version 1.0.0.

The script prints one line per matching section, ten of them for this bill in our run, among them STATE_TX_Cbc_C541_S541.101 in_force 2024-07-01. The regex anchors on the year and the closing parenthesis, so H.B. 4 does not match H.B. 459. The actStatus field tells you whether the section is in force, repealed or renumbered, and historyEffectiveDate is read from the publisher's own credit line.

To fetch the current text of a hit, call /api/v1/us/statutes/section/{actId}/body with the actId from the response. To go the other way, from a citation to a section, GET /api/v1/us/statutes/resolve?cite=... returns the exact section. For polling instead of searching, the search endpoint accepts changedSince, and the law change alerts API can push you a webhook when a source refreshes.

Gotchas that bite in production

History lines differ by state. Texas prints (H.B. 4). Other states print a chapter number, a public act number or a session law citation, and some print only the year. Treat the join as a small parser per state, tested against a handful of known bills before you trust it.

The text is not the section. getBillText returns bill versions. Do not present one to a user as the law. Show it as the text of the bill, and link the current section separately.

Uncodified material exists. Some parts of an enacted bill never enter the code: effective-date clauses, appropriations, study requirements. A bill can pass and produce few or no matching sections.

Timing runs in two directions. The legislature acts, the governor signs, the effective date arrives, and the code publisher updates, usually in that order and often weeks apart. When a section's history line has not caught up with a signed bill, the join returns nothing. That is a lag to expect and surface to users. It does not mean the bill failed.

Session years are fuzzy. LegiScan stores year_start and year_end for two-year sessions. A history line may carry either year. Search a window, not one year.

Federal bills have their own bridge. A bill that becomes a Public Law is codified into the US Code later, on the editors' schedule. See the US statutes API guide for the lag, and the Statutes at Large guide for the session law layer between the two.

Which source for which question?

Use LegiScan when the question is about the legislative process: what was introduced, who sponsored it, how each member voted, whether a hearing is scheduled. Pick the level by volume and how fast you need changes. Use the weekly datasets for history.

Use a statute source when the question is "what does the law say right now": the legislature's own site for a handful of lookups, or an API when you need many states under one schema, with status and effective-date fields. The Vaquill AI statutes API is one such source, covering the 50 states, DC and Puerto Rico by citation.

Most teams that need both end up with the two-step shape above. LegiScan watches the bills. The code layer confirms what actually changed.

Sources

LegiScan facts in this post come from the LegiScan API page (legiscan.com/legiscan), the weekly datasets page (legiscan.com/datasets), the price list page (legiscan.com/pricing) and the LegiScan API User Manual, revision 20250317 (API v1.91), all read in October 2026. The request and response shapes in the Python example come from the published OpenAPI document of the statutes API and a live call run in October 2026.

This guide is part of US Law Data: The Complete Guide, a map of where US law comes from and how to use it.

FAQ

Is the LegiScan API free? There is a free Public level. You register a free account, generate a key, and get 30,000 queries a month. Paid Pull and Push subscriptions raise the volume and add near real-time delivery, with annual fees based on how many states you cover.

What does the LegiScan API cover? LegiScan's API page says all 50 states and Congress. Its datasets page also lists the District of Columbia. Records include bill detail, history, sponsors, subjects, bill text, amendments, supplements, roll call votes and legislator profiles.

What is the difference between LegiScan pull and push? In pull, your code makes each request and spends queries to find updates. In push, LegiScan sends payloads to an endpoint you run, every 4 hours as standard or every 15 minutes if you ask. Both return the same data.

Does LegiScan give me the current text of a statute? LegiScan returns bills and their versions. A bill that passed is a different object from a code section with current text, so the statute book comes from a separate source, joined to the bill.

How do I find which statute sections a bill changed? Search the state code for sections amended since the bill's session year, then keep the ones whose history line names your bill number. The line usually also gives the session and chapter. The format varies by state, so test against known bills.

Can I download LegiScan data in bulk? Yes. Weekly snapshots are built on Sunday mornings for each state session, as CSV or as API-format JSON. A free account is required. You can also reach them through the getDatasetList and getDataset operations.

What licence does LegiScan data use? The LegiScan API and datasets pages carry Creative Commons notices, CC BY 4.0 and a CC BY-SA 4.0 line next to it. Confirm your commercial redistribution rights with LegiScan in writing, and read its terms, linked from its site footer, before you resell or republish the data.

Do I need Vaquill AI if I already use LegiScan? Use them together when a product needs both legislative movement and current-law text. LegiScan supplies bill and vote records. Vaquill AI supplies codified primary law by citation, and the two connect through the history line of each section.

Connect our US primary law database.
Every US statute, regulation, constitution, and executive order via REST, MCP or SQL. 5M+ sections, section-level citations, and links to the official source. Plus a free open dataset.
Updated October 5, 202620 min read

New legal AI guides, weekly.

Priyansh Khodiyar

Priyansh Khodiyar

Co-Founder & CTO

Priyansh leads engineering and AI at Vaquill AI: the pipelines that pull statutes, regulations and court rules from every US jurisdiction's official publisher, and the REST API, MCP server and open dataset that serve them.