Disclosed CapitolDisclosedCapitol
Home
Plans
Chad AI
API
Sign InGet Pro

Never Miss a Trade

Get weekly trade alerts free.

Explore

  • Politician Trades
  • Politicians
  • Executive Branch
  • Companies
  • All Stocks A–Z
  • Leaderboard
  • Compare Politicians
  • Committee Portfolios
  • Chad AI

Money & Policy

  • Government Contracts
  • Lobbying
  • Legislation
  • Campaign Finance
  • Institutional (13F)
  • Whale Watch (13D)

Markets

  • Markets Overview
  • Top Companies
  • Insider Trends
  • Economic Indicators
  • Live News

Resources

  • API Access
  • Developers
  • Developer Guides
  • Data Export
  • Glossary
  • Methodology
  • Data Sources
  • How It Works

Company

  • About Us
  • Press
  • FAQ
  • Pricing
  • vs. Capitol Trades
  • Contact
  • Watchlist

Legal

  • Editorial Standards
  • Corrections
  • Disclaimers
  • Privacy
  • Terms
© 2026 Disclosed Capitol. All rights reserved.
TermsPrivacyDisclaimer
HomeTrades
Chad
WatchlistAccount

Developers · Guides · Quickstart

API quickstart

Go from no account to congressional stock-trade data in your terminal in a few minutes. Every example works as written once you put in your own key.

Updated October 9, 2026

In this guide

  1. Create an account and add credits
  2. Create an API key
  3. Make your first call
  4. See what it cost
  5. Filter and page through trades
  6. Handle errors

01Create an account and add credits

Every data call spends credits, and new accounts start with none, so calls return 402 until you add some. Two ways in:

  • Core's free trial. 7 days with Core's full 7,500 credits, one per account. A card is required; cancel before the trial ends and you're not charged. After that, Core is $6/month.
  • Credits without a plan. From $10, at 1,000 credits per $1, usable for 12 months.
Create an accountStart the free trial

API plans and limits compares Core, Pro and Max.

02Create an API key

If you sign up from this page, the welcome screen creates your first key. To make more, open Account → API Keys. Keys start with dc_ and are shown once, so copy yours straight away.

Keep the key out of browser code and public repositories. Store it in an environment variable, as the examples below do. If a key leaks, revoke it in Account → API Keys and create a new one.

03Make your first call

Send the key in the DC-API-Key header. This asks for the 3 most recently disclosed trades:

Shell
export DC_API_KEY="dc_your_key_here"   # your key from Account → API Keys

curl -H "DC-API-Key: $DC_API_KEY" \
  "https://api.disclosedcapitol.com/trades?limit=3"
Python
import os

import requests  # pip install requests

API = "https://api.disclosedcapitol.com"
HEADERS = {"DC-API-Key": os.environ["DC_API_KEY"]}

r = requests.get(f"{API}/trades", headers=HEADERS, params={"limit": 3}, timeout=30)
r.raise_for_status()

for t in r.json():
    print(t["disclosure_date"], t["politician_name"], t["trade_type"], t["ticker"])

The response is a JSON array of trades, newest disclosure first:

Response (abridged; real data as of Oct 9, 2026)
[
  {
    "id": 294577,
    "politician_id": 322,
    "politician_name": "Maria Elvira Salazar",
    "party": "R",
    "state": "FL",
    "chamber": "House",
    "ticker": "BIIB",
    "trade_type": "Sell",
    "asset_type": "Stock",
    "asset_description": "Biogen Inc. - Common Stock [UBS IRA Account]",
    "amount_range": "$1,001 - $15,000",
    "amount_low": 1001.0,
    "amount_high": 15000.0,
    "transaction_date": "2026-09-24",
    "disclosure_date": "2026-10-07",
    "days_to_disclose": 13,
    "source": "house.gov",
    "sector": "Healthcare",
    "industry": "Drug Manufacturers - General",
    "price_on_trade_date": 226.36,
    "price_on_disclosure": 227.715
    // ...plus return, alpha and option fields
  }
  // ...2 more trades
]

amount_range is the dollar bracket from the filing; amount_low and amount_high are its bounds as numbers. The Congress trades as JSON guide lists every field.

04See what it cost

A call costs a base charge set by the endpoint, 15 credits for trade data, plus 1 credit for each row it returns. The 3-trade call above cost 15 + 3 = 18 credits. The response carries the charge and your new balance in two headers:

Shell
curl -sS -D - -o /dev/null -H "DC-API-Key: $DC_API_KEY" \
  "https://api.disclosedcapitol.com/trades?limit=3" | grep -i '^x-credits'
Output (on a fresh Core trial)
x-credits-charged: 18
x-credits-remaining: 7482
Python
print(r.headers["X-Credits-Charged"])    # "18": 15 for the call + 1 per row
print(r.headers["X-Credits-Remaining"])  # your balance after this call

Failed requests (any 4xx or 5xx) are not charged. Prices for every endpoint are public at https://api.disclosedcapitol.com/credits/endpoints (no key needed).

05Filter and page through trades

GET /trades returns trades disclosed in the last 30 days unless you say otherwise. These parameters narrow it down:

ParameterExampleWhat it does
tickerNVDA or NVDA,MSFTOne ticker or a comma-separated list.
politician_id58One member's numeric id, or a comma-separated list. The Congress trades as JSON guide shows how to find it.
partyDD, R or I.
chambersenatehouse, senate or executive.
stateCATwo-letter state code.
trade_typebuybuy, sell, exercise or expired: the labels in the Action column of the trades page, whatever wording the filing used. Like asset_type and sector, it leaves out trades whose ticker is "N/A".
asset_typeStockAsset kind, e.g. Stock or Option.
sectorTechnologySector name, or a comma-separated list.
days90How far back to look, by disclosure date. Default 30, maximum 3650.
date_from, date_to2026-01-01An exact disclosure-date range (YYYY-MM-DD). Send both; together they replace days.
limit, offset100, 200Page size (default 25, maximum 1000) and how many rows to skip.
sort_by, sort_dirtransaction_date, ascSort field (default disclosure_date) and direction (default desc).
Shell
# Senate purchases of NVDA or MSFT disclosed in the last 90 days.
# -G sends each -d as a query parameter.
curl -G -H "DC-API-Key: $DC_API_KEY" "https://api.disclosedcapitol.com/trades" \
  -d ticker=NVDA,MSFT -d chamber=senate -d trade_type=buy -d days=90

To collect more than one page, step offset until a page comes back short. Each page costs the 15-credit base plus 1 credit per trade on it.

Python
def all_trades(**filters):
    """Yield every trade matching the filters, 100 per request."""
    seen, offset = set(), 0
    while True:
        r = requests.get(
            f"{API}/trades",
            headers=HEADERS,
            params={**filters, "limit": 100, "offset": offset},
            timeout=30,
        )
        r.raise_for_status()
        page = r.json()
        for t in page:
            # A filing that lands mid-run can shift rows between pages.
            if t["id"] not in seen:
                seen.add(t["id"])
                yield t
        if len(page) < 100:
            break
        offset += 100


# Every NVDA purchase disclosed in the last 90 days
for t in all_trades(ticker="NVDA", trade_type="buy", days=90):
    print(t["disclosure_date"], t["politician_name"], t["amount_range"])

06Handle errors

StatusMeaningWhat to do
402Your balance can't cover the call.Start a plan or buy credits. The response says how many credits the call needed and links to top up.
403No key, a revoked key, or the key sent in the wrong header.Send it as DC-API-Key. An Authorization: Bearer header is not read.
404Unknown politician id or slug, or trade id.Check the id or slug. To find a member, call GET /politicians?search=pelosi.
422A parameter is invalid, for example limit above 1000.The response names the parameter.
429Too many requests a minute for your plan, or the key's daily spend cap (25,000 credits by default) is reached.For the per-minute limit, wait the seconds in the Retry-After header and retry. The daily cap resets at midnight UTC.

Rate limits are per minute: 120 on Core, 240 on Pro and 600 on Max, and 60 for an account without a plan.

Next steps

  • Congress trades as JSON: download every trade one member has disclosed, using Nancy Pelosi as the example.
  • Webhook setup: have new filings pushed to you instead of polling (Pro and Max).
  • API reference: every endpoint, with example responses. The machine-readable spec is at https://api.disclosedcapitol.com/openapi.json.
  • Connecting an AI agent? GET https://api.disclosedcapitol.com/v1/tools returns ready-made tool definitions, no key needed.

The API is licensed for personal use and for news and media use (Terms Section 9.1). For any other use, email admin@disclosedcapitol.com for written permission.

Frequently asked questions

How do I authenticate with the Disclosed Capitol API?
Send your API key in the DC-API-Key header on every request to https://api.disclosedcapitol.com. Create keys in Account → API Keys. A request without a key, or with the key in an Authorization: Bearer header, gets a 403.
How much does an API call cost?
A base charge set by the endpoint (15 credits for trade data) plus 1 credit for each row returned, so GET /trades?limit=3 costs 18 credits. Failed requests are not charged, and the X-Credits-Charged and X-Credits-Remaining response headers show what each call cost and what's left.
Is there a free trial?
Yes. Core's 7-day free trial includes 7,500 credits; a card is required, and if you cancel before the trial ends you're not charged. New accounts don't come with free credits. You can also buy credits from $10 without subscribing.
What does the API return?
JSON. The trade endpoints return an array of trades, each with the member, ticker, transaction type, disclosed amount range, transaction and disclosure dates, share prices and performance fields.