Free, open-source REST API for congressional accountability data — campaign finance, stock trades, voting records, travel disclosures, and legislation.
2. Include it in every authenticated request:
curl -H "X-API-Key: osp_your_key_here" \ https://api.opensourceforall.com/api/v1/members/B000944/trades
Pass your API key via the X-API-Key header. Public endpoints do not require a key. All other endpoints return 401 without a valid key.
// Authenticated request
fetch("/api/v1/members/B000944/trades", {
headers: { "X-API-Key": "osp_your_key_here" }
})| Tier | Limit | Window |
|---|---|---|
| Free | 1,000 requests | Sliding 1-hour window |
Exceeding the limit returns 401 with {"error": "Rate limit exceeded (1000 requests/hour)"}.
All responses are JSON. Lists include pagination metadata:
{
"data": [...],
"meta": { "page": 1, "per_page": 50, "total": 542 }
}Single records:
{
"data": { ... }
}Errors:
{
"error": "Missing X-API-Key header"
}List endpoints accept page (default 1) and per_page (default 50, max 100).
/api/v1/membersPublicList all members of Congress with optional filters.
Query Parameters
| Name | Type | Description |
|---|---|---|
chamber | string | "senate" or "house" |
party | string | "D", "R", or "I" |
state | string | Two-letter state code (e.g. OH, CA) |
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 50, max: 100) |
Example Response
{
"data": [
{
"id": "...",
"bioguide_id": "B000944",
"name": "Sherrod Brown",
"party": "D",
"state": "OH",
"chamber": "senate",
"district": null,
"photo_url": "https://...",
"start_date": "2007-01-04"
}
],
"meta": { "page": 1, "per_page": 50, "total": 542 }
}/api/v1/statsPublicAggregate counts and pipeline health timestamps.
Example Response
{
"data": {
"member_count": 542,
"trade_count": 18430,
"bill_count": 52100,
"last_updated": {
"trades": "2026-04-05T02:00:00Z",
"votes": "2026-04-05T03:00:00Z",
"members": "2026-04-04T12:00:00Z"
}
}
}All member endpoints require authentication.
/api/v1/members/:bioguide_idAuth requiredFull profile for a single member, including aggregate counts.
Example Response
{
"data": {
"id": "...",
"bioguide_id": "B000944",
"name": "Sherrod Brown",
"party": "D",
"state": "OH",
"chamber": "senate",
"district": null,
"photo_url": "https://...",
"start_date": "2007-01-04",
"trade_count": 12,
"travel_count": 5,
"donor_count": 3800,
"vote_count": 4210
}
}/api/v1/members/:bioguide_id/votesAuth requiredVoting record for a member.
Query Parameters
| Name | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 50, max: 100) |
Example Response
{
"data": [
{
"vote_id": "s123-2026",
"date": "2026-03-15",
"bill_id": "hr-1234",
"bill_title": "Infrastructure Investment Act",
"position": "Yes",
"result": "Passed"
}
],
"meta": { "page": 1, "per_page": 50, "total": 4210 }
}/api/v1/members/:bioguide_id/billsAuth requiredLegislation sponsored or cosponsored by a member.
Query Parameters
| Name | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 50, max: 100) |
sponsored_only | boolean | "true" to show only primary-sponsored bills |
Example Response
{
"data": [
{
"bill_id": "hr-1234",
"title": "Infrastructure Investment Act",
"introduced_date": "2026-01-15",
"status": "introduced",
"sponsor_type": "sponsor",
"alec_similarity_score": 0.12,
"cosponsor_count": 34
}
],
"meta": { "page": 1, "per_page": 50, "total": 87 }
}/api/v1/members/:bioguide_id/tradesAuth requiredStock trades disclosed by a member. Sorted by transaction date descending.
Query Parameters
| Name | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 50, max: 100) |
ticker | string | Filter by stock ticker (case-insensitive) |
trade_type | string | "purchase" or "sale" |
Example Response
{
"data": [
{
"transaction_date": "2026-03-01",
"ticker": "NVDA",
"asset_description": "NVIDIA Corp",
"trade_type": "purchase",
"amount_range": "$15,001 - $50,000",
"owner": "spouse",
"source": "periodic_transaction_report"
}
],
"meta": { "page": 1, "per_page": 50, "total": 12 }
}/api/v1/members/:bioguide_id/travelAuth requiredPrivately funded foreign travel disclosures.
Query Parameters
| Name | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 50, max: 100) |
Example Response
{
"data": [
{
"destination_country": "Taiwan",
"departure_date": "2026-01-10",
"return_date": "2026-01-14",
"sponsor": "Heritage Foundation",
"total_cost": 12500.00,
"funding_source": "Heritage Foundation"
}
],
"meta": { "page": 1, "per_page": 50, "total": 5 }
}/api/v1/members/:bioguide_id/donorsAuth requiredCampaign donors for a member. Sorted by amount descending.
Query Parameters
| Name | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 50, max: 100) |
Example Response
{
"data": [
{
"contributor_name": "Jane Smith",
"employer": "Acme Corp",
"occupation": "CEO",
"amount": 5800.00,
"date": "2026-02-14"
}
],
"meta": { "page": 1, "per_page": 50, "total": 3800 }
}/api/v1/members/:bioguide_id/financesAuth requiredFEC campaign finance summary for a member.
Example Response
{
"data": {
"total_raised": 14250000,
"total_spent": 12800000,
"cash_on_hand": 1450000,
"fec_candidate_id": "S4OH00082",
"cycle": "2026",
"top_industries": [
"Lawyers/Law Firms",
"Securities & Investment",
"Health Professionals"
]
}
}/api/v1/members/:bioguide_id/scoreAuth requiredAnomaly and accountability scores for a member. Each score ranges from 0 to 1.
Example Response
{
"data": {
"overall_score": 0.42,
"voting_anomaly_score": 0.35,
"financial_anomaly_score": 0.55,
"trade_timing_score": 0.61,
"donor_concentration_score": 0.28,
"bill_similarity_score": 0.39,
"travel_pattern_score": 0.31
}
}Cross-member queries. Authentication required.
/api/v1/tradesAuth requiredAll stock trades across all members. Sorted by transaction date descending.
Query Parameters
| Name | Type | Description |
|---|---|---|
ticker | string | Filter by stock ticker (case-insensitive) |
chamber | string | "senate" or "house" |
party | string | "D", "R", or "I" |
start_date | string | ISO date lower bound (YYYY-MM-DD) |
end_date | string | ISO date upper bound (YYYY-MM-DD) |
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 50, max: 100) |
Example Response
{
"data": [
{
"bioguide_id": "P000197",
"member_name": "Nancy Pelosi",
"chamber": "house",
"party": "D",
"state": "CA",
"transaction_date": "2026-03-01",
"ticker": "NVDA",
"asset_description": "NVIDIA Corp",
"trade_type": "purchase",
"amount_range": "$1,000,001 - $5,000,000",
"owner": "spouse",
"source": "periodic_transaction_report"
}
],
"meta": { "page": 1, "per_page": 50, "total": 18430 }
}/api/v1/billsAuth requiredAll legislation with optional filters. Supports full-text search on title.
Query Parameters
| Name | Type | Description |
|---|---|---|
congress | string | Congress number (e.g. 119) |
alec_min_score | float | Minimum ALEC similarity score (0-1) |
keyword | string | Full-text search on bill title |
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 50, max: 100) |
Example Response
{
"data": [
{
"bill_id": "hr-1234",
"title": "Infrastructure Investment Act",
"introduced_date": "2026-01-15",
"status": "introduced",
"bioguide_id": "B000944",
"sponsor_type": "sponsor",
"alec_similarity_score": 0.12,
"cosponsor_count": 34,
"congress": "119"
}
],
"meta": { "page": 1, "per_page": 50, "total": 52100 }
}