GovTrack API
Free GovTrack API with no key: US senators and representatives, their roles, parties, districts and voting records across sessions of Congress. Tested.
Endpoint tested and returned HTTP 200 on 2026-08-20
What is the GovTrack API?
The GovTrack API is a free, key-free API providing data on members of the United States Congress — current and historical senators and representatives, their party, state, district, committee roles and voting records.
GovTrack has tracked US Congress for two decades, and its API exposes the legislator database that underpins it. Every role is a time-bounded record, so you can query who represented a district in any given Congress, not just today.
The role-based model is worth understanding: a person is separate from their roles, so someone who served in the House and later the Senate has multiple role records. Query roles when you want 'who represents X', and people when you want a biography.
Quick facts
- Base URL
https://www.govtrack.us/api/v2- Authentication
- No API key required.
- Rate limit
- No published hard limit; the maintainers ask for reasonable use.
- Pricing
- Free. GovTrack asks for attribution.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the GovTrack API
Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.
1. List current members of Congress
GET https://www.govtrack.us/api/v2/role?current=true&limit=1
curl 'https://www.govtrack.us/api/v2/role?current=true&limit=1'const res = await fetch("https://www.govtrack.us/api/v2/role?current=true&limit=1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://www.govtrack.us/api/v2/role?current=true&limit=1", timeout=20)
res.raise_for_status()
print(res.json()){
"meta": {
"limit": 1,
"offset": 0,
"total_count": 539
},
"objects": [
{
"caucus": null,
"congress_numbers": [
117,
118,
119
],
"current": true,
"description": "Senior Senator for Maine",
"district": null,
"enddate": "2027-01-03",
"extra": {
"address": "413 Dirksen Senate Office Building Washington DC 20510",
"contact_form": "https://www.collins.senate.gov/contact",
"office": "413 Dirksen Senate Office Building",
"rss_url": "http://www.collins.senate.gov/public/?a=rss.feed"
},
"leadership_title": null,
"party": "Republican",
"person": {
"bioguideid": "C001035",
"birthday": "1952-12-07",
"cspanid": 45738,
"fediverse_webfinger": null,
"firstname": "Susan",
"gender": "female",
"gender_label": "Female",
"lastname": "Collins",
"link": "https://www.govtrack.us/congress/members/susan_collins/300025",
"middlename": "M.",
"name": "Sen. Susan Collins [R-ME]",
"namemod": "",
"nickname": "",
"osid": "N00000491",
"pvsid": null,
"sortname": "Collins, Susan (Sen.) [R-ME]",
"twitterid": "SenatorCollins",
"youtubeid": "SenatorSusanCollins"
},
"phone": "202-224-2523",
"role_type": "senator",
"role_type_label": "Senator",
"senator_class": "class2",
"senator_class_label": "Class 2",
"senator_rank": "senior",
"senator_rank_label": "Senior",
"startdate"Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
role | path | Optional | Legislator roles — the main endpoint. role |
current | boolean | Optional | Restrict to currently serving members. true |
state | string | Optional | Two-letter state code. CA |
role_type | string | Optional | senator or representative. senator |
limit / offset | integer | Optional | Pagination controls. 20 |
Response fields
meta.total_countinteger- Total roles matching the query.
objects[].personobject- The legislator — name, birthday, gender and social handles.
objects[].role_type_labelstring- Senator or Representative.
objects[].partystring- Party affiliation during this role.
objects[].state / districtstring|integer- State and, for representatives, district number.
objects[].startdate / enddatestring- Term start and end dates.
objects[].congress_numbersarray- Which Congresses this role spans.
What you can build with the GovTrack API
- Build a 'who represents me' lookup by state and district
- Track the composition of Congress over time
- Analyse party balance historically
- Power civic engagement and accountability tools
Common errors and how to fix them
Person vs role confusion
A legislator can have several role records.
Fix: Query roles for representation questions; a person who moved from House to Senate has multiple roles.
Empty results for a district
District numbers are integers and change after redistricting.
Fix: Combine state and district, and specify the Congress number for historical queries.
Large responses
Historical queries span two centuries.
Fix: Always pass `current=true` unless you specifically want history.
GovTrack API — frequently asked questions
Is the GovTrack API free?
Yes, free with no API key. GovTrack asks for attribution when you use their data.
What is the difference between a person and a role?
A person is the individual; a role is one term of service. Someone who served in the House then the Senate has multiple roles, so query roles when asking who represents a district.
Can I get historical members of Congress?
Yes, omit current=true and filter by congress_numbers. The database covers two centuries, so always constrain the query.
Does it include voting records?
Yes, through the related vote endpoints, which link legislators to individual roll call votes.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
CSV to JSON Converter
Convert CSV to a JSON array of objects online. Header-row detection, comma/semicolon/tab delimiters and pretty-printed output — 100% in your browser.
GovTrack is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.