keepcalculator

06 Numbers and Powers

Congressional Trading APIs: Access, Freshness & Real Costs

Card No. 06·21116 · Updated · Standard formula, shown below

Estimated API calls 1
Lookback days
90 days
You entered
Max trades to return
100
You entered
You enter
Lookback days, Max trades to return
You get
Estimated API calls
Rounding
0 dp

Congressional trading APIs let you pull the stock and other financial transactions of U.S. lawmakers directly into your own software or spreadsheet. You enter nothing yourself—the API connects to the data source and returns the trades, typically with the politician’s name, the asset, the transaction date, and the amount range. What you get back depends heavily on which API you choose: the free ones lag by weeks, while premium tiers claim near-real-time updates, and the price difference reflects that freshness gap more than anything else.

Formula

The calculator above estimates how many API calls you will need to fetch a given number of trades, assuming each call returns up to 100 records. The formula is simply:

Estimated calls = ⌈(Max trades to return) / 100⌉

Where:

  • Max trades to return (d) – the number of trade records you want, unitless.
  • Estimated calls (est) – the integer number of API requests required, rounded up.

This is pure arithmetic; it does not account for rate limits, pagination overhead, or authentication handshakes, which real APIs add on top.

Worked Example

Using the defaults: you want 100 trades. Divide 100 by 100 = 1. Ceiling of 1 is 1. So you need exactly 1 API call. If you wanted 250 trades, you would need 3 calls (250 / 100 = 2.5, ceiling = 3). The calculator shows the first case: 1 estimated call.

Background: Where the Data Comes From

The raw material for every congressional trading API is the STOCK Act of 2012, which requires members of Congress to publicly disclose most securities trades within 45 days. The disclosures are filed as PDFs or structured data with the Clerk of the House and the Secretary of the Senate. The problem is that those official filings are not designed for machine consumption—they arrive as scanned documents or inconsistent text. That is where API providers step in: they scrape the official sources, parse the filings, and republish them as JSON endpoints.

There are two main official sources:

  • House Financial Disclosures – published on the Office of the Clerk’s website.
  • Senate Financial Disclosures – published via the Secretary of the Senate’s office.

Both are free to access manually, but neither offers an official public API. All congressional trading APIs are third-party products built on top of these filings.

Access: Free vs. Paid Tiers

Access models vary, but most providers follow a freemium pattern. Free tiers typically give you:

  • Daily or weekly batch updates.
  • Historical data going back a few years, not decades.
  • Rate limits of 10–60 requests per minute.
  • No filtering by chamber, party, or asset type.

Paid tiers (ranging from roughly $30 to $200+ per month) add:

  • Real-time or same-day push notifications.
  • Full historical data back to 2012.
  • Higher rate limits and bulk endpoints.
  • Structured fields like trade type (purchase/sale), asset ticker, and dollar amount ranges.
  • Webhook support so your app gets pushed updates instead of polling.

The key distinction is freshness. A free API might show a trade that was filed 20 days ago; a premium API might show it within hours of the filing being accepted. For a hobbyist tracking trends, that lag is irrelevant. For a news site or a researcher correlating trades with legislative votes, it can be decisive.

How the APIs Work Under the Hood

Most congressional trading APIs are RESTful JSON endpoints. A typical request looks like:

GET /api/v1/trades?date_from=2024-01-01&date_to=2024-03-01

The response is an array of objects, each containing fields like:

  • bioguide_id – the lawmaker’s unique identifier.
  • name – full name of the member.
  • ticker – stock symbol (if the asset is a stock).
  • asset_type – stock, bond, ETF, etc.
  • transaction_date – the date the trade was executed.
  • disclosure_date – the date the filing was made public.
  • amount_range – e.g., $1,001–$15,000.

Authentication is usually via an API key passed in a header. Some providers use OAuth2, but that is rare for this niche. The main technical limitation is that the underlying filings are not standardized, so providers must constantly update their parsers. This means occasionally you will see a trade with a missing ticker or a garbled asset name.

Freshness: What the 45-Day Lag Actually Means

The STOCK Act allows up to 45 days between the trade date and the disclosure date. That means even the best API cannot give you a trade on the day it happens—only when the member files it. In practice, many members file within a week, but some wait the full 45 days. So a “real-time” API is really real-time relative to the filing, not the trade execution.

This has a practical consequence: you cannot use these APIs to front-run a lawmaker’s trades in the market. By the time the filing is public, the stock price has usually already adjusted. The value of freshness is more about research accuracy—matching a trade to a legislative event that happened around the same time—than about trading signals.

A common misconception is that the API gives you the exact dollar amount. It does not. The STOCK Act only requires a range (e.g., $1,001–$15,000; $15,001–$50,000; $50,001–$100,000; $100,001–$250,000; $250,001–$500,000; $500,001–$1,000,000; over $1,000,000). No public API can give you the exact figure because the underlying filing does not contain it.

Costs: What You Actually Pay For

Pricing structures vary, but the main cost drivers are:

  • Request volume – per-call pricing or monthly caps.
  • Data history – full history from 2012 costs more than last 12 months.
  • Delivery speed – webhooks and push notifications are premium features.
  • Support – SLAs and dedicated support are only on enterprise plans.

There is also a hidden cost: the time you spend cleaning the data. Even paid APIs return inconsistent tickers, missing fields, and duplicate filings. Budget for a data-cleaning step in your pipeline.

How to Choose an API

Before you pick a provider, answer these questions:

  • Do you need real-time updates, or is daily batch enough?
  • How far back do you need history?
  • What is your request budget? A hobby project can live on a free tier.
  • Do you need filtering by politician, state, or asset class?

A good way to test is to compare two free tiers side by side. Pull the same date range from both and see which one has fewer missing tickers and more consistent date formatting. The one that looks cleaner is probably worth paying for if you need reliability.

Common Problems and Pitfalls

The most frequent issues users hit:

  • Rate limiting – free tiers often return HTTP 429 after a burst. Solution: add exponential backoff to your client.
  • Duplicate records – a trade may appear twice if the member amends a filing. Solution: deduplicate by a composite key of bioguide_id + ticker + transaction_date + amount_range.
  • Missing tickers – some filings only say “ETF” or “mutual fund” without a symbol. You will need to match by asset description manually.
  • Date confusion – always check whether the API returns trade date or disclosure date. Mixing them up will skew any analysis.
  • Time zone issues – timestamps are usually UTC, but not always. Normalize everything to UTC in your pipeline.

Alternatives to Third-Party APIs

If you do not want to pay, there are two free alternatives:

  • Quiver Quantitative – offers a free congressional trading page (not an API) with a searchable table and charts. You can scrape it, but that violates their ToS.
  • efdsearch.senate.gov – the Senate’s official search tool. You can manually download PDFs, but there is no API and no bulk export.

For a one-off analysis, manual download is fine. For ongoing tracking, a paid API is worth the money because the parsing and cleaning is already done.

Frequently Asked Questions

Are congressional trading APIs legal to use?

Yes. The data is public record. You are not doing anything illegal by accessing it via a third-party API, as long as you comply with the provider’s terms of service and do not use it for insider trading (which is impossible anyway, given the 45-day lag).

Can I get real-time trades as they happen?

No. The law allows a 45-day window for disclosure. The fastest API can only push the trade to you as soon as the filing is accepted, which is typically 1–10 days after the trade date, not the same day.

Why do different APIs show different data for the same trade?

Because each provider parses the raw filings independently. One may capture a ticker that another misses, or one may include amended filings while another ignores them. Always cross-reference critical findings with the official PDF.

Do these APIs include cryptocurrency trades?

Some do, but coverage is inconsistent. The STOCK Act requires disclosure of “securities” and crypto is treated as a digital asset, but not all filings include it. Check the provider’s documentation for a crypto filter.

What is the cheapest way to get started?

Use a free tier from a major provider, pull a single month of data, and build your pipeline around that. If you find you need more history or higher rate limits, upgrade to a paid tier only after you have validated your use case.

Related

Formula used
in t | Lookback days | days | 90 | 1 | 3650
in d | Max trades to return | - | 100 | 1 | 1000
out est | Estimated API calls | - | ceil(d / 100) | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →