api.congress.gov
api.congress.gov copied to clipboard
Cannot determine Senator election class
trafficstars
When querying a senator either with the list or detail end point (https://api.congress.gov/v3/member/S001198), it seems to be impossible to determine when the senator's last election was or the senate class (S1, S2, S3). The terms key has data per congress, but its impossible to tell which term was an election during a senator's 6 year cycle. An example for Sen. Dan Sullivan is given below. His next election is in 2026 making him part of class 2. This is important to help assign unique district identifiers to senators much like state and district codes uniquely identify representatives.
{
"chamber": "Senate",
"congress": 116,
"endYear": 2021,
"memberType": "Senator",
"startYear": 2019,
"stateCode": "AK",
"stateName": "Alaska"
},
{
"chamber": "Senate",
"congress": 117,
"endYear": 2023,
"memberType": "Senator",
"startYear": 2021,
"stateCode": "AK",
"stateName": "Alaska"
},
{
"chamber": "Senate",
"congress": 118,
"memberType": "Senator",
"startYear": 2023,
"stateCode": "AK",
"stateName": "Alaska"
}