AcademyFor developers23 Nov 2026 9 min read

Congress.gov API: How to Pull a Bill's Status and Cosponsor Count

How to call the Congress.gov v3 bill endpoint, what it returns, and the cosponsor and status gaps to plan for, with a live response for H.R. 1 of the 119th Congress.

By Bill100 Team

Congress.gov publishes bill data through a documented JSON API at api.congress.gov, version 3. One request to the bill endpoint returns the title, sponsor, latest action and, once a bill is enacted, its public law number. The cosponsor count does not come back in that first response for every bill, so a careful client makes a second call. This guide shows the requests that bill100's own integration makes, the fields they return, and the response we received for H.R. 1 of the 119th Congress on 23 November 2026.

The bill endpoint and what it returns

The route takes three parts in the path: the Congress number, the bill type in lower case (hr, s, hres and so on) and the bill number. Every request also carries an api_key parameter and format=json. For H.R. 1 of the 119th Congress the path is api.congress.gov/v3/bill/119/hr/1. Bill100 builds that URL in one place and sets both parameters itself, so a missing key fails visibly rather than returning a quietly partial page.

FieldWhat it holdsHow bill100 uses it
titleThe official title. For H.R. 1 it reads: An act to provide for reconciliation pursuant to title II of H. Con. Res. 14.Shown as the bill's title on its page; a record without a title is refused as incomplete
latestActionThe most recent action, with its date and textSets the status date and the latest-action line
lawsPublic law numbers, present only once the bill is enactedSets the enacted flag and the Enacted label
sponsorsThe primary sponsor's bioguide ID, name, party and stateLinks the sponsor to their member record
policyAreaA single subject area, for example Economics and Public FinanceShown as the policy area
cosponsors.countThe number of cosponsors. Missing from the bill record for some billsRead from the cosponsors subresource when the bill record omits it

Fields in the bill endpoint response and how bill100 uses them

Getting a key, and what the demo key is for

Keys are free from api.data.gov. The Library of Congress's repository for the API states a limit of 5,000 requests an hour for a registered key, but check the current figure there before you build a load plan around it. The shared DEMO_KEY is for trying things out. api.data.gov limits it per IP address, and the limit is far too low for bulk work. The api.data.gov developer manual describes the limits and the 429 response a client receives when it has used them up.

Bill100's integration reads a CONGRESS_API_KEY environment variable and falls back to DEMO_KEY when it is unset. The ingest script goes further: it switches Congress.gov enrichment off entirely on DEMO_KEY, because the shared limit would break a bulk load. Plan for a registered key as soon as a job needs more than a handful of calls.

Worked example: H.R. 1 of the 119th Congress

On 23 November 2026 we requested the bill record and its cosponsors subresource for H.R. 1 with the demo key. Both calls returned HTTP 200. These are the values that matter for a tracker:

  • Title: An act to provide for reconciliation pursuant to title II of H. Con. Res. 14.
  • Introduced: 20 May 2025, with the House as the originating chamber.
  • Latest action: 4 July 2025, recorded as 'Became Public Law No: 119-21.'
  • Laws: one entry, Public Law 119-21, which sets the bill's enacted status.
  • Sponsor: Rep. Jodey C. Arrington, Republican, Texas 19th district, bioguide ID A000375.
  • Policy area: Economics and Public Finance.
  • Cosponsors: the bill record carried no cosponsor count, and the cosponsors subresource returned a count of zero.

The enactment date matches the dated walk-through in How long does it take for a bill to become law. The introduction date of 20 May 2025 differs from the way that guide starts its count, which is at House passage on 22 May 2025, because the sources disagree on the introduction date. The official record for the bill is on Congress.gov.

Why a zero count needs its own call

The bill record leaves the cosponsors field out for some bills, including bills with no cosponsors at all. The client's own comment puts it plainly: absence alone is not zero. So bill100 asks the cosponsors subresource for one row with limit set to 1, and reads the pagination count from that response. The count is the answer even when it is zero. If the subresource does not supply a count either, the client raises an error instead of reporting zero. A missing number and a zero are different facts, and a tracker that treats them as the same misstates how much support a bill has.

Status is a separate problem

The bill endpoint gives the latest action and the enactment record. It does not give the lifecycle stage that GovTrack exposes. Bill100 therefore marks a bill as enacted only when the laws field is populated. Otherwise it shows 'Stage not supplied' rather than inferring a stage from the wording of the latest action. Inferring from prose is how a tracker tells people a bill has passed when it has only been reported. Understanding bill status explains the stages those labels stand in for.

Timeouts, retries and caching

A production client needs more than a URL. Bill100's wrapper gives each request 15 seconds. It retries once, and only when the request aborts on timeout, because Congress.gov has brief slow spells that clear on a second try. It maps the upstream responses to plain errors: 404 becomes not found, 429 becomes rate limited, and 403 or 502 become temporary failures. Successful responses are cached for 24 hours through the framework's data cache, since a bill's metadata, summaries and subjects change rarely within a day. The single retry is deliberate. A retry loop against a shared public service turns one slow response into a flood of requests.

What the endpoint will not do

Keyword search is the largest gap. In bill100's adapter, any browse request that carries a keyword, a chamber filter or a relevance sort is refused with an explicit message, because the official API does not expose full-text or chamber filters on that route. A search feature built on it has to say so, or draw on a second source. Legislative data for AI agents explains why an answer about a bill should cite the record it came from rather than guess.

The request sequence, step by step

  • Call the bill endpoint with the Congress number, the bill type in lower case, the bill number, api_key and format=json.
  • If the record carries a cosponsor count, use it.
  • If it does not, call the cosponsors subresource with limit set to 1 and read the pagination count. Stop with an error if that count is missing too.
  • Mark the bill enacted only when the laws field is populated, and take the latest action and its date as the status date.
  • Cache the response for a day, and retry once only on a timeout.

Two rules prevent most bugs in a Congress.gov client: treat a missing field as unknown until a second source confirms it, and never turn a latest action into a status by reading its wording.

Is the Congress.gov API free?

Yes. You request a free key from api.data.gov. The shared DEMO_KEY works for a quick test, but it is limited per IP address and is too low for bulk use.

Does the Congress.gov API show whether a bill has become law?

Yes. Once a bill is enacted, its laws field carries the public law number, such as Public Law 119-21 for H.R. 1 of the 119th Congress. A record without that field has not been enacted according to the API, but the API does not say which stage a bill has reached.

Why is the cosponsor count sometimes missing?

The bill record omits the cosponsors pointer for some bills, including bills with no cosponsors. Ask the cosponsors subresource for its count instead. A zero from that call is a real zero.

Can I search bills by keyword with the Congress.gov API?

Not on the bill browse route. The official API does not expose full-text or chamber filters there, so keyword search needs a second source or a local index built from the records.

Search federal bills and see the dated action history for each one.

Search bills

Bill100 mirrors the public U.S. legislative record from Congress.gov and GovTrack and adds plain-English AI summaries. It is an information tool, not legal, compliance or lobbying advice, and it is not affiliated with the U.S. Congress or any government agency. AI summaries can simplify or omit detail — every bill links to the official source; verify there before you rely on it. To look up a real bill, search Bill100’s bill index, or see how the same data works from your own code or an AI agent.

More guides

Track a bill, then build on it

Track a bill free, then get an API key for your software or your AI agent — no card to start.

Track a bill