api.congress.gov icon indicating copy to clipboard operation
api.congress.gov copied to clipboard

Cannot determine Senator election class

Open bdempe18 opened this issue 10 months ago • 0 comments
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"
            }

bdempe18 avatar Jan 02 '25 14:01 bdempe18