api.congress.gov
api.congress.gov copied to clipboard
(congress): inaccurate `endYear`
trafficstars
In the congress API, the endYear value is inaccurate for some of the congresses. Here is an incomplete list of congresses i've found errors in:
110
112
113
114
115
116
117
118
For example request the 117th congress:
curl 'https://api.congress.gov/v3/congress/117?format=json&api_key=<API_KEY>'
Response
{
"congress": {
"endYear": "2022",
"name": "117th Congress",
"number": 117,
"sessions": [
{
"chamber": "House of Representatives",
"endDate": "2022-01-03",
"number": 1,
"startDate": "2021-01-03",
"type": "R"
},
{
"chamber": "Senate",
"endDate": "2022-01-03",
"number": 1,
"startDate": "2021-01-03",
"type": "R"
},
{
"chamber": "House of Representatives",
"endDate": "2023-01-03",
"number": 2,
"startDate": "2022-01-03",
"type": "R"
},
{
"chamber": "Senate",
"endDate": "2023-01-03",
"number": 2,
"startDate": "2022-01-03",
"type": "R"
}
],
"startYear": "2021",
"updateDate": "2021-01-12T20:05:52Z",
"url": "https://api.congress.gov/v3/congress/117?format=json"
},
"request": {
"congress": "117",
"contentType": "application/json",
"format": "json"
}
}
Notice how the endYear is set to 2022, but the 2nd sessions end on 2023-01-03. I had expected the endYear to be 2023.