OSP · CIVIC DATAAPI v2
00:00:00

API REFERENCE

Free, open REST API for congressional accountability data — campaign finance, stock trades, voting records, travel disclosures, and legislation. Data from CongressWatch, rebuilt daily from public records.

Quick StartAuthenticationRate LimitsResponse FormatData NotesPublicMembersGlobal

QUICK START

curl -H "X-API-Key: YOUR_KEY" \
  https://api.opensourceforall.com/api/v1/members/P000197/trades

Get a free API key →

AUTHENTICATION

Send your key in the X-API-Key header. Two endpoints are public: /v1/members and /v1/stats. Invalid keys return 401; exceeding your rate limit returns 429.

X-API-Key: osp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

RATE LIMITS

TierLimitWho
free1,000 req/hrAnyone
discounted10,000 req/hrEducators, nonprofits, researchers
paid10,000 req/hrCommercial use

RESPONSE FORMAT

Lists are paginated and wrapped with a meta block; single objects return only data. Pagination: page (default 1), per_page (default 50, max 100).

{
  "data": [ ... ],
  "meta": { "page": 1, "per_page": 50, "total": 536 }
}

DATA NOTES

Field names are CongressWatch's native ones, passed through unchanged. A few shapes will surprise you:

FieldTypeNote
cash_on_handstringPreformatted currency, e.g. $1,234,567 — not a number.
amount (trades)string | nullA disclosure bracket, e.g. $15,001 - $50,000. Null on ~231 rows.
districtstringEmpty string for senators. Always a string, never a number.
total_raisednumber | nullNull for 69 of 536 members with no resolved FEC record.
datesstringMostly ISO (YYYY-MM-DD); some legacy trade/travel rows are MM/DD/YYYY.

Coverage is uneven by design — trades exists for 124 members, travel for 307. A member with no trades returns an empty list, not a 404.

PUBLIC ENDPOINTS

LIVE
GET/api/v1/membersPUBLIC

The leaderboard — every sitting member with their anomaly score. No API key required.

QUERY PARAMETERS

NameTypeDescription
chamberstringHouse or Senate
partystringRepublican, Democratic, Independent
statestringFull state name
min_scoreintMinimum anomaly score (0–100)
searchstringCase-insensitive name substring
sortstringfield.direction, e.g. score.desc (score|name|state|total_raised)

EXAMPLE RESPONSE

{
  "data": [{
    "id": "B001288",
    "name": "Cory A. Booker",
    "party": "Democratic",
    "state": "New Jersey",
    "chamber": "Senate",
    "score": 32,
    "total_raised": 5107416.85
  }],
  "meta": { "page": 1, "per_page": 50, "total": 9 }
}
LIVE
GET/api/v1/statsPUBLIC

Corpus-wide totals and the last pipeline run. No API key required.

EXAMPLE RESPONSE

{
  "data": {
    "total_members": 537,
    "members_with_scores": 509,
    "last_updated": "2026-07-13T09:18:39.759170"
  }
}

MEMBER ENDPOINTS

Each takes a bioguide ID (e.g. P000197) and requires an API key.

LIVE
GET/api/v1/members/{bioguide_id}AUTH

The full vault for one member — every data block in a single object.

LIVE
GET/api/v1/members/{bioguide_id}/scoreAUTH

Anomaly score with six weighted components, recomputed from live inputs. Returns stored, total, and drift.

LIVE
GET/api/v1/members/{bioguide_id}/tradesAUTH

Disclosed stock trades (STOCK Act periodic transaction reports), newest first. Filter by ticker, type.

LIVE
GET/api/v1/members/{bioguide_id}/votesAUTH

Recorded floor votes via GovTrack.

LIVE
GET/api/v1/members/{bioguide_id}/billsAUTH

Bills sponsored or cosponsored, with ALEC similarity and donor-interest analysis.

LIVE
GET/api/v1/members/{bioguide_id}/travelAUTH

Privately sponsored foreign travel disclosures.

LIVE
GET/api/v1/members/{bioguide_id}/donorsAUTH

Top individual donors from FEC filings, largest first (native field: top_donors_list).

LIVE
GET/api/v1/members/{bioguide_id}/financesAUTH

Campaign finance summary. cash_on_hand is a preformatted string, not a number.

GLOBAL ENDPOINTS

Cross-member queries. Each row carries the member it belongs to (bioguide_id, member_name, party, state, chamber).

LIVE
GET/api/v1/tradesAUTH

Every disclosed trade across all members (6,800+), newest first. Filter by ticker, type, chamber, party, state, start_date, end_date.

LIVE
GET/api/v1/billsAUTH

Every tracked bill across all members (5,200+), newest first. Filter by congress, keyword, chamber, party, min_alec_similarity (0–1).