LibraryOfCongress / api.congress.gov

congress.gov API
605 stars 38 forks source link

List level results for the `member` endpoint report duplicate items #183

Closed arris-ray closed 4 months ago

arris-ray commented 6 months ago

At the time of this report, when all pages are queried and assembled for the member endpoint [1], an analysis of the results shows 250 items that appear in triplicate within the result set; their IDs are available here [2] for review.

The pagination element in member list-level responses reports 2518 items (see below for an example response) although there are only 2018 unique items in the member list.

{
    "members": [
        {
            "bioguideId": "M001228",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/m001228_200.jpg"
            },
            "district": 2,
            "name": "Maloy, Celeste",
            "partyName": "Republican",
            "state": "Utah",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2023
                    }
                ]
            },
            "updateDate": "2023-12-22T15:39:46Z",
            "url": "https://api.congress.gov/v3/member/M001228?format=json"
        }
    ],
    "pagination": {
        "count": 2518,
        "next": "https://api.congress.gov/v3/member?offset=1&limit=1&format=json"
    },
    "request": {
        "contentType": "application/json",
        "format": "json"
    }
}

[1] https://gist.github.com/arris-ray/b163545d13d0ec80da9c69e4623d926f#file-member-json [2] https://gist.github.com/arris-ray/b163545d13d0ec80da9c69e4623d926f#file-duplicate-ids-csv