LibraryOfCongress / api.congress.gov

congress.gov API
601 stars 38 forks source link

(bill): missing legislation #233

Open ryparker opened 2 months ago

ryparker commented 2 months ago

The bill list API is missing the following 14 legislation from the 118th congress:

hr3
hr4
hr6
hr8
hr9
hr10
hr13
hr18
hr19
s448
s459
s494
s495
s497

The bill details API returns data for all of these, even though they're not present in the list response.

For example you can retrieve S494's details:

curl --location 'https://api.congress.gov/v3/bill/118/s/494?format=json&api_key=<API_KEY>'

Response

{
    "bill": {
        "actions": {
            "count": 1,
            "url": "https://api.congress.gov/v3/bill/118/s/494/actions?format=json"
        },
        "committees": {
            "count": 1,
            "url": "https://api.congress.gov/v3/bill/118/s/494/committees?format=json"
        },
        "congress": 118,
        "cosponsors": {
            "count": 48,
            "countIncludingWithdrawnCosponsors": 48,
            "url": "https://api.congress.gov/v3/bill/118/s/494/cosponsors?format=json"
        },
        "introducedDate": "2023-02-16",
        "number": "494",
        "originChamber": "Senate",
        "originChamberCode": "S",
        "policyArea": {
            "name": "Crime and Law Enforcement"
        },
        "relatedBills": {
            "count": 1,
            "url": "https://api.congress.gov/v3/bill/118/s/494/relatedbills?format=json"
        },
        "sponsors": [
            {
                "bioguideId": "M001169",
                "firstName": "Christopher",
                "fullName": "Sen. Murphy, Christopher [D-CT]",
                "isByRequest": "N",
                "lastName": "Murphy",
                "middleName": "S.",
                "party": "D",
                "state": "CT",
                "url": "https://api.congress.gov/v3/member/M001169?format=json"
            }
        ],
        "subjects": {
            "count": 6,
            "url": "https://api.congress.gov/v3/bill/118/s/494/subjects?format=json"
        },
        "summaries": {
            "count": 1,
            "url": "https://api.congress.gov/v3/bill/118/s/494/summaries?format=json"
        },
        "textVersions": {
            "count": 1,
            "url": "https://api.congress.gov/v3/bill/118/s/494/text?format=json"
        },
        "title": "Background Check Expansion Act",
        "titles": {
            "count": 4,
            "url": "https://api.congress.gov/v3/bill/118/s/494/titles?format=json"
        },
        "type": "S",
        "updateDate": "2024-04-17T23:51:59Z",
        "updateDateIncludingText": "2024-04-17T23:51:59Z"
    },
    "request": {
        "billNumber": "494",
        "billType": "s",
        "congress": "118",
        "contentType": "application/json",
        "format": "json"
    }
}

In addition to the list above, the following 2 legislation are not present in the congress.gov list and details API, and they're also not present in the GovInfo list and details API.

s2
s3

Even if they're reserved it would be nice to have a response for these similar to what is returned from hr3 (a reserved id):

{
    "bill": {
        "actions": {
            "count": 3,
            "url": "https://api.congress.gov/v3/bill/118/hr/3/actions?format=json"
        },
        "congress": 118,
        "introducedDate": "2023-01-03",
        "latestAction": {
            "actionDate": "2023-01-06",
            "text": "Introduced in House"
        },
        "number": "3",
        "originChamber": "House",
        "originChamberCode": "H",
        "sponsors": [
            {
                "bioguideId": "M001165",
                "district": 23,
                "firstName": "Kevin",
                "fullName": "Rep. McCarthy, Kevin [R-CA-23]",
                "isByRequest": "N",
                "lastName": "McCarthy",
                "party": "R",
                "state": "CA",
                "url": "https://api.congress.gov/v3/member/M001165?format=json"
            }
        ],
        "title": "Reserved for the Speaker.",
        "titles": {
            "count": 2,
            "url": "https://api.congress.gov/v3/bill/118/hr/3/titles?format=json"
        },
        "type": "HR",
        "updateDate": "2024-04-17T23:41:24Z",
        "updateDateIncludingText": "2024-04-17T23:41:24Z"
    },
    "request": {
        "billNumber": "3",
        "billType": "hr",
        "congress": "118",
        "contentType": "application/json",
        "format": "json"
    }
}

Similar missing legislation issue on the GovInfo repo: https://github.com/usgpo/api/issues/151

apreiter18 commented 2 months ago

Thanks, @ryparker - I created an investigation ticket for this one.

RE: S2 and S3, we have not received any bill data assigned to S 2 or S 3 in the 118th Congress, which explains why they are not appearing on either the Congress.gov API or Congress.gov webapp.