LibraryOfCongress / api.congress.gov

congress.gov API
601 stars 38 forks source link

docs(members by congress): what's the difference between this and members list by `fromDateTime`? #236

Closed ryparker closed 2 months ago

ryparker commented 2 months ago

Could we get some more documentation on what the difference is between the members by congress API and the members list API? Including why there are differing results and what the default order is based on.

I've noticed that they return different results and in different order. I had expected it to be a shortcut for requesting the same data as the original members list response.

For example to request 118th congress members using the original /members API you would set fromDateTime to the start date of the 118th congress 1/3/2023:

curl --location 'https://api.congress.gov/v3/member?format=json&offset=0&limit=25&fromDateTime=2023-01-03T00%3A00%3A00Z&api_key=<API_KEY>'

Returns:

{
    "members": [
        {
            "bioguideId": "P000604",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/p000604_200.jpg"
            },
            "district": 10,
            "name": "Payne, Donald M.",
            "partyName": "Democratic",
            "state": "New Jersey",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2024,
                        "startYear": 2012
                    }
                ]
            },
            "updateDate": "2024-04-30T18:48:38Z",
            "url": "https://api.congress.gov/v3/member/P000604?format=json"
        },
        {
            "bioguideId": "M001165",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/m001165_200.jpg"
            },
            "district": 20,
            "name": "McCarthy, Kevin",
            "partyName": "Republican",
            "state": "California",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2023,
                        "startYear": 2007
                    }
                ]
            },
            "updateDate": "2024-04-30T18:48:18Z",
            "url": "https://api.congress.gov/v3/member/M001165?format=json"
        },
        {
            "bioguideId": "J000292",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/j000292_200.jpg"
            },
            "district": 6,
            "name": "Johnson, Bill",
            "partyName": "Republican",
            "state": "Ohio",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2024,
                        "startYear": 2011
                    }
                ]
            },
            "updateDate": "2024-04-30T18:47:57Z",
            "url": "https://api.congress.gov/v3/member/J000292?format=json"
        },
        {
            "bioguideId": "H001038",
            "depiction": {
                "attribution": "Image, Congressional Pictorial Directory, 109th.",
                "imageUrl": "https://www.congress.gov/img/member/h001038_200.jpg"
            },
            "district": 26,
            "name": "Higgins, Brian",
            "partyName": "Democratic",
            "state": "New York",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2024,
                        "startYear": 2005
                    }
                ]
            },
            "updateDate": "2024-04-30T18:47:27Z",
            "url": "https://api.congress.gov/v3/member/H001038?format=json"
        },
        {
            "bioguideId": "G000579",
            "depiction": {
                "attribution": "Congressional Pictorial Directory",
                "imageUrl": "https://www.congress.gov/img/member/115_rp_wi_8_gallagher_mike_200.jpg"
            },
            "district": 8,
            "name": "Gallagher, Mike",
            "partyName": "Republican",
            "state": "Wisconsin",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2024,
                        "startYear": 2017
                    }
                ]
            },
            "updateDate": "2024-04-30T18:47:09Z",
            "url": "https://api.congress.gov/v3/member/G000579?format=json"
        },
        {
            "bioguideId": "B001297",
            "depiction": {
                "attribution": "Congressional Pictorial Directory",
                "imageUrl": "https://www.congress.gov/img/member/115_rp_co_4_buck_ken_200.jpg"
            },
            "district": 4,
            "name": "Buck, Ken",
            "partyName": "Republican",
            "state": "Colorado",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2024,
                        "startYear": 2015
                    }
                ]
            },
            "updateDate": "2024-04-30T18:46:45Z",
            "url": "https://api.congress.gov/v3/member/B001297?format=json"
        },
        {
            "bioguideId": "W000814",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/w000814_200.jpg"
            },
            "district": 14,
            "name": "Weber, Randy K.",
            "partyName": "Republican",
            "state": "Texas",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2013
                    }
                ]
            },
            "updateDate": "2024-04-30T18:08:32Z",
            "url": "https://api.congress.gov/v3/member/W000814?format=json"
        },
        {
            "bioguideId": "H001061",
            "depiction": {
                "attribution": "<a href=\"http://www.senate.gov/artandhistory/history/common/generic/Photo_Collection_of_the_Senate_Historical_Office.htm\">Courtesy U.S. Senate Historical Office</a>",
                "imageUrl": "https://www.congress.gov/img/member/h001061_200.jpg"
            },
            "name": "Hoeven, John",
            "partyName": "Republican",
            "state": "North Dakota",
            "terms": {
                "item": [
                    {
                        "chamber": "Senate",
                        "startYear": 2011
                    }
                ]
            },
            "updateDate": "2024-04-30T12:42:21Z",
            "url": "https://api.congress.gov/v3/member/H001061?format=json"
        },
        {
            "bioguideId": "P000556",
            "depiction": {
                "attribution": "<a href=\"http://www.senate.gov/artandhistory/history/common/generic/Photo_Collection_of_the_Senate_Historical_Office.htm\">Courtesy U.S. Senate Historical Office</a>",
                "imageUrl": "https://www.congress.gov/img/member/p000556_200.jpg"
            },
            "name": "Pryor, David H.",
            "partyName": "Democratic",
            "state": "Arkansas",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 1973,
                        "startYear": 1965
                    },
                    {
                        "chamber": "Senate",
                        "endYear": 1997,
                        "startYear": 1979
                    }
                ]
            },
            "updateDate": "2024-04-24T16:53:00Z",
            "url": "https://api.congress.gov/v3/member/P000556?format=json"
        },
        {
            "bioguideId": "M001088",
            "depiction": {
                "attribution": "Collection of the U.S. House of Representatives",
                "imageUrl": "https://www.congress.gov/img/member/m001088_200.jpg"
            },
            "district": 20,
            "name": "Murphy, Austin J.",
            "partyName": "Democratic",
            "state": "Pennsylvania",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 1995,
                        "startYear": 1977
                    }
                ]
            },
            "updateDate": "2024-04-18T16:34:31Z",
            "url": "https://api.congress.gov/v3/member/M001088?format=json"
        },
        {
            "bioguideId": "G000352",
            "depiction": {
                "attribution": "<a href=\"http://www.senate.gov/artandhistory/history/common/generic/Photo_Collection_of_the_Senate_Historical_Office.htm\">Courtesy U.S. Senate Historical Office</a>",
                "imageUrl": "https://www.congress.gov/img/member/g000352_200.jpg"
            },
            "name": "Graham, Bob",
            "partyName": "Democratic",
            "state": "Florida",
            "terms": {
                "item": [
                    {
                        "chamber": "Senate",
                        "endYear": 2005,
                        "startYear": 1987
                    }
                ]
            },
            "updateDate": "2024-04-17T11:47:24Z",
            "url": "https://api.congress.gov/v3/member/G000352?format=json"
        },
        {
            "bioguideId": "S001176",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/s001176_200.jpg"
            },
            "district": 1,
            "name": "Scalise, Steve",
            "partyName": "Republican",
            "state": "Louisiana",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2008
                    }
                ]
            },
            "updateDate": "2024-04-11T19:56:40Z",
            "url": "https://api.congress.gov/v3/member/S001176?format=json"
        },
        {
            "bioguideId": "G000528",
            "depiction": {
                "attribution": "Collection of the U.S. House of Representatives",
                "imageUrl": "https://www.congress.gov/img/member/g000528_200.jpg"
            },
            "district": 5,
            "name": "Gunter, Bill",
            "partyName": "Democratic",
            "state": "Florida",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 1975,
                        "startYear": 1973
                    }
                ]
            },
            "updateDate": "2024-04-09T17:02:19Z",
            "url": "https://api.congress.gov/v3/member/G000528?format=json"
        },
        {
            "bioguideId": "S001195",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/s001195_200.jpg"
            },
            "district": 8,
            "name": "Smith, Jason",
            "partyName": "Republican",
            "state": "Missouri",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2013
                    }
                ]
            },
            "updateDate": "2024-04-09T13:07:49Z",
            "url": "https://api.congress.gov/v3/member/S001195?format=json"
        },
        {
            "bioguideId": "B000798",
            "depiction": {
                "attribution": "Collection of the U.S. House of Representatives",
                "imageUrl": "https://www.congress.gov/img/member/b000798_200.jpg"
            },
            "district": 1,
            "name": "Brennan, Joseph E.",
            "partyName": "Democratic",
            "state": "Maine",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 1991,
                        "startYear": 1987
                    }
                ]
            },
            "updateDate": "2024-04-08T15:28:35Z",
            "url": "https://api.congress.gov/v3/member/B000798?format=json"
        },
        {
            "bioguideId": "D000210",
            "depiction": {
                "attribution": "Image, Congressional Pictorial Directory, 109th.",
                "imageUrl": "https://www.congress.gov/img/member/d000210_200.jpg"
            },
            "district": 10,
            "name": "Delahunt, Bill",
            "partyName": "Democratic",
            "state": "Massachusetts",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2011,
                        "startYear": 1997
                    }
                ]
            },
            "updateDate": "2024-04-01T15:22:29Z",
            "url": "https://api.congress.gov/v3/member/D000210?format=json"
        },
        {
            "bioguideId": "L000304",
            "depiction": {
                "attribution": "<a href=\"http://www.senate.gov/artandhistory/history/common/generic/Photo_Collection_of_the_Senate_Historical_Office.htm\">Courtesy U.S. Senate Historical Office</a>",
                "imageUrl": "https://www.congress.gov/img/member/l000304_200.jpg"
            },
            "name": "Lieberman, Joseph I.",
            "partyName": "Independent Democrat",
            "state": "Connecticut",
            "terms": {
                "item": [
                    {
                        "chamber": "Senate",
                        "endYear": 2013,
                        "startYear": 1989
                    }
                ]
            },
            "updateDate": "2024-03-28T13:34:21Z",
            "url": "https://api.congress.gov/v3/member/L000304?format=json"
        },
        {
            "bioguideId": "B001287",
            "depiction": {
                "attribution": "GPO Member Guide",
                "imageUrl": "https://www.congress.gov/img/member/b001287_200.jpg"
            },
            "district": 6,
            "name": "Bera, Ami",
            "partyName": "Democratic",
            "state": "California",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2013
                    }
                ]
            },
            "updateDate": "2024-03-27T16:18:53Z",
            "url": "https://api.congress.gov/v3/member/B001287?format=json"
        },
        {
            "bioguideId": "V000129",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/v000129_200.jpg"
            },
            "district": 22,
            "name": "Valadao, David G.",
            "partyName": "Republican",
            "state": "California",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2019,
                        "startYear": 2013
                    },
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2021
                    }
                ]
            },
            "updateDate": "2024-03-26T18:49:49Z",
            "url": "https://api.congress.gov/v3/member/V000129?format=json"
        },
        {
            "bioguideId": "J000307",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/j000307_200.jpg"
            },
            "district": 10,
            "name": "James, John",
            "partyName": "Republican",
            "state": "Michigan",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2023
                    }
                ]
            },
            "updateDate": "2024-03-22T18:36:13Z",
            "url": "https://api.congress.gov/v3/member/J000307?format=json"
        },
        {
            "bioguideId": "K000375",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/k000375_200.jpg"
            },
            "district": 9,
            "name": "Keating, William R.",
            "partyName": "Democratic",
            "state": "Massachusetts",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2011
                    }
                ]
            },
            "updateDate": "2024-03-22T18:36:11Z",
            "url": "https://api.congress.gov/v3/member/K000375?format=json"
        },
        {
            "bioguideId": "J000299",
            "depiction": {
                "attribution": "GPO Member Guide",
                "imageUrl": "https://www.congress.gov/img/member/j000299_200.jpg"
            },
            "district": 4,
            "name": "Johnson, Mike",
            "partyName": "Republican",
            "state": "Louisiana",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2017
                    }
                ]
            },
            "updateDate": "2024-03-20T20:03:36Z",
            "url": "https://api.congress.gov/v3/member/J000299?format=json"
        },
        {
            "bioguideId": "C001090",
            "depiction": {
                "attribution": "GPO Member Guide",
                "imageUrl": "https://www.congress.gov/img/member/117_rp_pa_8_cartwright_matt_200.jpg"
            },
            "district": 8,
            "name": "Cartwright, Matt",
            "partyName": "Democratic",
            "state": "Pennsylvania",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2013
                    }
                ]
            },
            "updateDate": "2024-03-14T19:22:34Z",
            "url": "https://api.congress.gov/v3/member/C001090?format=json"
        },
        {
            "bioguideId": "E000268",
            "depiction": {
                "attribution": "Image, Congressional Pictorial Directory, 109th.",
                "imageUrl": "https://www.congress.gov/img/member/e000268_200.jpg"
            },
            "district": 2,
            "name": "Everett, Terry",
            "partyName": "Republican",
            "state": "Alabama",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2009,
                        "startYear": 1993
                    }
                ]
            },
            "updateDate": "2024-03-13T17:39:51Z",
            "url": "https://api.congress.gov/v3/member/E000268?format=json"
        }
    ],
    "pagination": {
        "count": 690,
        "next": "https://api.congress.gov/v3/member?fromDateTime=2023-01-03T00:00:00Z&offset=25&limit=25&format=json"
    },
    "request": {
        "contentType": "application/json",
        "format": "json"
    }
}

The new "by congress" API when used to request the same data:

curl --location 'https://api.congress.gov/v3/member/congress/118?offset=0&limit=25&format=json&api_key=<API_KEY>'

Returns:

{
    "members": [
        {
            "bioguideId": "P000604",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/p000604_200.jpg"
            },
            "district": 10,
            "name": "Payne, Donald M.",
            "partyName": "Democratic",
            "state": "New Jersey",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2024,
                        "startYear": 2012
                    }
                ]
            },
            "updateDate": "2024-04-30T18:48:38Z",
            "url": "https://api.congress.gov/v3/member/P000604?format=json"
        },
        {
            "bioguideId": "M001165",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/m001165_200.jpg"
            },
            "district": 20,
            "name": "McCarthy, Kevin",
            "partyName": "Republican",
            "state": "California",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2023,
                        "startYear": 2007
                    }
                ]
            },
            "updateDate": "2024-04-30T18:48:18Z",
            "url": "https://api.congress.gov/v3/member/M001165?format=json"
        },
        {
            "bioguideId": "J000292",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/j000292_200.jpg"
            },
            "district": 6,
            "name": "Johnson, Bill",
            "partyName": "Republican",
            "state": "Ohio",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2024,
                        "startYear": 2011
                    }
                ]
            },
            "updateDate": "2024-04-30T18:47:57Z",
            "url": "https://api.congress.gov/v3/member/J000292?format=json"
        },
        {
            "bioguideId": "H001038",
            "depiction": {
                "attribution": "Image, Congressional Pictorial Directory, 109th.",
                "imageUrl": "https://www.congress.gov/img/member/h001038_200.jpg"
            },
            "district": 26,
            "name": "Higgins, Brian",
            "partyName": "Democratic",
            "state": "New York",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2024,
                        "startYear": 2005
                    }
                ]
            },
            "updateDate": "2024-04-30T18:47:27Z",
            "url": "https://api.congress.gov/v3/member/H001038?format=json"
        },
        {
            "bioguideId": "G000579",
            "depiction": {
                "attribution": "Congressional Pictorial Directory",
                "imageUrl": "https://www.congress.gov/img/member/115_rp_wi_8_gallagher_mike_200.jpg"
            },
            "district": 8,
            "name": "Gallagher, Mike",
            "partyName": "Republican",
            "state": "Wisconsin",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2024,
                        "startYear": 2017
                    }
                ]
            },
            "updateDate": "2024-04-30T18:47:09Z",
            "url": "https://api.congress.gov/v3/member/G000579?format=json"
        },
        {
            "bioguideId": "B001297",
            "depiction": {
                "attribution": "Congressional Pictorial Directory",
                "imageUrl": "https://www.congress.gov/img/member/115_rp_co_4_buck_ken_200.jpg"
            },
            "district": 4,
            "name": "Buck, Ken",
            "partyName": "Republican",
            "state": "Colorado",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2024,
                        "startYear": 2015
                    }
                ]
            },
            "updateDate": "2024-04-30T18:46:45Z",
            "url": "https://api.congress.gov/v3/member/B001297?format=json"
        },
        {
            "bioguideId": "W000814",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/w000814_200.jpg"
            },
            "district": 14,
            "name": "Weber, Randy K.",
            "partyName": "Republican",
            "state": "Texas",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2013
                    }
                ]
            },
            "updateDate": "2024-04-30T18:08:32Z",
            "url": "https://api.congress.gov/v3/member/W000814?format=json"
        },
        {
            "bioguideId": "H001061",
            "depiction": {
                "attribution": "<a href=\"http://www.senate.gov/artandhistory/history/common/generic/Photo_Collection_of_the_Senate_Historical_Office.htm\">Courtesy U.S. Senate Historical Office</a>",
                "imageUrl": "https://www.congress.gov/img/member/h001061_200.jpg"
            },
            "name": "Hoeven, John",
            "partyName": "Republican",
            "state": "North Dakota",
            "terms": {
                "item": [
                    {
                        "chamber": "Senate",
                        "startYear": 2011
                    }
                ]
            },
            "updateDate": "2024-04-30T12:42:21Z",
            "url": "https://api.congress.gov/v3/member/H001061?format=json"
        },
        {
            "bioguideId": "S001176",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/s001176_200.jpg"
            },
            "district": 1,
            "name": "Scalise, Steve",
            "partyName": "Republican",
            "state": "Louisiana",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2008
                    }
                ]
            },
            "updateDate": "2024-04-11T19:56:40Z",
            "url": "https://api.congress.gov/v3/member/S001176?format=json"
        },
        {
            "bioguideId": "S001195",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/s001195_200.jpg"
            },
            "district": 8,
            "name": "Smith, Jason",
            "partyName": "Republican",
            "state": "Missouri",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2013
                    }
                ]
            },
            "updateDate": "2024-04-09T13:07:49Z",
            "url": "https://api.congress.gov/v3/member/S001195?format=json"
        },
        {
            "bioguideId": "B001287",
            "depiction": {
                "attribution": "GPO Member Guide",
                "imageUrl": "https://www.congress.gov/img/member/b001287_200.jpg"
            },
            "district": 6,
            "name": "Bera, Ami",
            "partyName": "Democratic",
            "state": "California",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2013
                    }
                ]
            },
            "updateDate": "2024-03-27T16:18:53Z",
            "url": "https://api.congress.gov/v3/member/B001287?format=json"
        },
        {
            "bioguideId": "V000129",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/v000129_200.jpg"
            },
            "district": 22,
            "name": "Valadao, David G.",
            "partyName": "Republican",
            "state": "California",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2019,
                        "startYear": 2013
                    },
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2021
                    }
                ]
            },
            "updateDate": "2024-03-26T18:49:49Z",
            "url": "https://api.congress.gov/v3/member/V000129?format=json"
        },
        {
            "bioguideId": "J000307",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/j000307_200.jpg"
            },
            "district": 10,
            "name": "James, John",
            "partyName": "Republican",
            "state": "Michigan",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2023
                    }
                ]
            },
            "updateDate": "2024-03-22T18:36:13Z",
            "url": "https://api.congress.gov/v3/member/J000307?format=json"
        },
        {
            "bioguideId": "K000375",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/k000375_200.jpg"
            },
            "district": 9,
            "name": "Keating, William R.",
            "partyName": "Democratic",
            "state": "Massachusetts",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2011
                    }
                ]
            },
            "updateDate": "2024-03-22T18:36:11Z",
            "url": "https://api.congress.gov/v3/member/K000375?format=json"
        },
        {
            "bioguideId": "J000299",
            "depiction": {
                "attribution": "GPO Member Guide",
                "imageUrl": "https://www.congress.gov/img/member/j000299_200.jpg"
            },
            "district": 4,
            "name": "Johnson, Mike",
            "partyName": "Republican",
            "state": "Louisiana",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2017
                    }
                ]
            },
            "updateDate": "2024-03-20T20:03:36Z",
            "url": "https://api.congress.gov/v3/member/J000299?format=json"
        },
        {
            "bioguideId": "C001090",
            "depiction": {
                "attribution": "GPO Member Guide",
                "imageUrl": "https://www.congress.gov/img/member/117_rp_pa_8_cartwright_matt_200.jpg"
            },
            "district": 8,
            "name": "Cartwright, Matt",
            "partyName": "Democratic",
            "state": "Pennsylvania",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2013
                    }
                ]
            },
            "updateDate": "2024-03-14T19:22:34Z",
            "url": "https://api.congress.gov/v3/member/C001090?format=json"
        },
        {
            "bioguideId": "M001210",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/m001210_200.jpg"
            },
            "district": 3,
            "name": "Murphy, Gregory F.",
            "partyName": "Republican",
            "state": "North Carolina",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "startYear": 2019
                    }
                ]
            },
            "updateDate": "2024-03-11T15:48:41Z",
            "url": "https://api.congress.gov/v3/member/M001210?format=json"
        },
        {
            "bioguideId": "Y000064",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/y000064_200.jpg"
            },
            "name": "Young, Todd",
            "partyName": "Republican",
            "state": "Indiana",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2017,
                        "startYear": 2011
                    },
                    {
                        "chamber": "Senate",
                        "startYear": 2017
                    }
                ]
            },
            "updateDate": "2024-03-10T12:42:26Z",
            "url": "https://api.congress.gov/v3/member/Y000064?format=json"
        },
        {
            "bioguideId": "W000779",
            "depiction": {
                "attribution": "<a href=\"http://www.senate.gov/artandhistory/history/common/generic/Photo_Collection_of_the_Senate_Historical_Office.htm\">Courtesy U.S. Senate Historical Office</a>",
                "imageUrl": "https://www.congress.gov/img/member/w000779_200.jpg"
            },
            "name": "Wyden, Ron",
            "partyName": "Democratic",
            "state": "Oregon",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 1996,
                        "startYear": 1981
                    },
                    {
                        "chamber": "Senate",
                        "startYear": 1996
                    }
                ]
            },
            "updateDate": "2024-03-10T12:42:26Z",
            "url": "https://api.congress.gov/v3/member/W000779?format=json"
        },
        {
            "bioguideId": "V000137",
            "depiction": {
                "attribution": "Official U.S. Senate Photo",
                "imageUrl": "https://www.congress.gov/img/member/v000137_200.jpg"
            },
            "name": "Vance, J. D.",
            "partyName": "Republican",
            "state": "Ohio",
            "terms": {
                "item": [
                    {
                        "chamber": "Senate",
                        "startYear": 2023
                    }
                ]
            },
            "updateDate": "2024-03-10T12:42:25Z",
            "url": "https://api.congress.gov/v3/member/V000137?format=json"
        },
        {
            "bioguideId": "W000790",
            "depiction": {
                "attribution": "<a href=\"http://www.senate.gov/artandhistory/history/common/generic/Photo_Collection_of_the_Senate_Historical_Office.htm\">Courtesy U.S. Senate Historical Office</a>",
                "imageUrl": "https://www.congress.gov/img/member/w000790_200.jpg"
            },
            "name": "Warnock, Raphael G.",
            "partyName": "Democratic",
            "state": "Georgia",
            "terms": {
                "item": [
                    {
                        "chamber": "Senate",
                        "startYear": 2021
                    }
                ]
            },
            "updateDate": "2024-03-10T12:42:25Z",
            "url": "https://api.congress.gov/v3/member/W000790?format=json"
        },
        {
            "bioguideId": "W000817",
            "depiction": {
                "attribution": "<a href=\"http://www.senate.gov/artandhistory/history/common/generic/Photo_Collection_of_the_Senate_Historical_Office.htm\">Courtesy U.S. Senate Historical Office</a>",
                "imageUrl": "https://www.congress.gov/img/member/w000817_200.jpg"
            },
            "name": "Warren, Elizabeth",
            "partyName": "Democratic",
            "state": "Massachusetts",
            "terms": {
                "item": [
                    {
                        "chamber": "Senate",
                        "startYear": 2013
                    }
                ]
            },
            "updateDate": "2024-03-10T12:42:25Z",
            "url": "https://api.congress.gov/v3/member/W000817?format=json"
        },
        {
            "bioguideId": "W000802",
            "depiction": {
                "attribution": "<a href=\"http://www.senate.gov/artandhistory/history/common/generic/Photo_Collection_of_the_Senate_Historical_Office.htm\">Courtesy U.S. Senate Historical Office</a>",
                "imageUrl": "https://www.congress.gov/img/member/w000802_200.jpg"
            },
            "name": "Whitehouse, Sheldon",
            "partyName": "Democratic",
            "state": "Rhode Island",
            "terms": {
                "item": [
                    {
                        "chamber": "Senate",
                        "startYear": 2007
                    }
                ]
            },
            "updateDate": "2024-03-10T12:42:25Z",
            "url": "https://api.congress.gov/v3/member/W000802?format=json"
        },
        {
            "bioguideId": "W000805",
            "depiction": {
                "attribution": "<a href=\"http://www.senate.gov/artandhistory/history/common/generic/Photo_Collection_of_the_Senate_Historical_Office.htm\">Courtesy U.S. Senate Historical Office</a>",
                "imageUrl": "https://www.congress.gov/img/member/w000805_200.jpg"
            },
            "name": "Warner, Mark R.",
            "partyName": "Democratic",
            "state": "Virginia",
            "terms": {
                "item": [
                    {
                        "chamber": "Senate",
                        "startYear": 2009
                    }
                ]
            },
            "updateDate": "2024-03-10T12:42:25Z",
            "url": "https://api.congress.gov/v3/member/W000805?format=json"
        },
        {
            "bioguideId": "W000800",
            "depiction": {
                "attribution": "Image courtesy of the Member",
                "imageUrl": "https://www.congress.gov/img/member/w000800_200.jpg"
            },
            "name": "Welch, Peter",
            "partyName": "Democratic",
            "state": "Vermont",
            "terms": {
                "item": [
                    {
                        "chamber": "House of Representatives",
                        "endYear": 2023,
                        "startYear": 2007
                    },
                    {
                        "chamber": "Senate",
                        "startYear": 2023
                    }
                ]
            },
            "updateDate": "2024-03-10T12:42:25Z",
            "url": "https://api.congress.gov/v3/member/W000800?format=json"
        }
    ],
    "pagination": {
        "count": 546,
        "next": "https://api.congress.gov/v3/member/congress/118?offset=25&limit=25&format=json"
    },
    "request": {
        "contentType": "application/json",
        "format": "json"
    }
}

Notice how the original API returned 690 results while this new "by congress" API returns 546. Also notice that one of the first miss-matches is David H. Pryor (index 8) who is present in the original API but not the "by congress" API.

apreiter18 commented 2 months ago

Hi @ryparker - the fromDateTime parameter is by entity update date:

image

This would explain why you are seeing Senator Pryor, who departed from the Senate in 1997.

Meanwhile, the 546 members in the "by Congress" endpoint are the total who have served thus far in the 118th Congress. Does this help explain the discrepancy?

ryparker commented 2 months ago

That clears up my confusion. Thanks.