Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/members/congress/:congress Does not return full term information #243

Open
afischer opened this issue May 14, 2024 · 0 comments
Open

/members/congress/:congress Does not return full term information #243

afischer opened this issue May 14, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@afischer
Copy link

When looking at members-by-congress API at an endpoint such as https://api.congress.gov/v3/member/congress/117, members seem to have abbreviated term information. For example, Kevin McCarthy in the 117th congress terms property looks like this:

...
      "district": 20,
      "name": "McCarthy, Kevin",
      "partyName": "Republican",
      "state": "California",
      "terms": {
        "item": [
          {
            "chamber": "House of Representatives",
            "endYear": 2023,
            "startYear": 2007
          }
        ]
      },
...rest of the member object

Additionally the district property at the at the top level is for the most recent term, even if for the queried congress, the member was in a different district. This can lead to incorrect information — in the above example, Kevin McCarthy is listed as representing the 20th district, even though he was a representative to for the 23rd district in the 117th congress (prior to redistricting in 2020).

This information is already available in the /members/:bioguideId API, for example at https://api.congress.gov/v3/member/M001165, Kevin McCarthy has these two items as his last two terms:

"terms": [
   ...other terms
      {
        "chamber": "House of Representatives",
        "congress": 117,
        "district": 23,
        "endYear": 2023,
        "memberType": "Representative",
        "startYear": 2021,
        "stateCode": "CA",
        "stateName": "California"
      },
      {
        "chamber": "House of Representatives",
        "congress": 118,
        "district": 20,
        "endYear": 2023,
        "memberType": "Representative",
        "startYear": 2023,
        "stateCode": "CA",
        "stateName": "California"
      }
]

It would be great if this district information was also correct on the congress list API. As a bonus, having all terms listed out like it is in the member API would be a great addition.

@apreiter18 apreiter18 added bug Something isn't working enhancement New feature or request labels May 14, 2024
@apreiter18 apreiter18 added this to the Near term backlog milestone May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants