Open ryparker opened 4 months ago
Good afternoon,
The BILLSTATUS xml will only return textVersion format information if the xml is included. In the example you cited above, there is no xml available. We do not currently provide links to the pdf or html within the BILLSTATUS xml on the bulkdata repository.
That being said, you may be interested in using our related service to find the related bills and download any relevant information. For example,
https://api.govinfo.gov/related/BILLSTATUS-118hr3496?api_key=DEMO_KEY returns a list of relationships - in this case, Congressional Bills (BILLS), History of Bills (HOB), and Congressional Reports (CRPT)
{
"relationships": [
{
"relationshipLink": "https://api.govinfo.gov/related/BILLSTATUS-118hr3496/BILLS",
"collection": "BILLS",
"relationship": "Bill versions"
},
{
"relationshipLink": "https://api.govinfo.gov/related/BILLSTATUS-118hr3496/HOB",
"collection": "HOB",
"relationship": "Bill History"
},
{
"relationshipLink": "https://api.govinfo.gov/related/BILLSTATUS-118hr3496/CRPT",
"collection": "CRPT",
"relationship": "Congressional Reports"
}
],
"relatedId": "BILLSTATUS-118hr3496"
}
if you follow the BILLS relationship, you will see a list of different bill versions related to this BILLSTATUS:
{
"results": [
{
"dateIssued": "2023-05-18",
"billVersion": "ih",
"packageId": "BILLS-118hr3496ih",
"packageLink": "https://api.govinfo.gov/packages/BILLS-118hr3496ih/summary",
"billVersionLabel": "Introduced in House",
"lastModified": "2023-08-07T13:09:13Z"
},
{
"dateIssued": "2023-09-29",
"billVersion": "rh",
"packageId": "BILLS-118hr3496rh",
"packageLink": "https://api.govinfo.gov/packages/BILLS-118hr3496rh/summary",
"billVersionLabel": "Reported in House",
"lastModified": "2023-11-14T05:54:43Z"
},
{
"dateIssued": "2023-11-13",
"billVersion": "eh",
"packageId": "BILLS-118hr3496eh",
"packageLink": "https://api.govinfo.gov/packages/BILLS-118hr3496eh/summary",
"billVersionLabel": "Engrossed in House",
"lastModified": "2023-11-15T04:33:15Z"
},
{
"dateIssued": "2023-11-14",
"billVersion": "rfs",
"packageId": "BILLS-118hr3496rfs",
"packageLink": "https://api.govinfo.gov/packages/BILLS-118hr3496rfs/summary",
"billVersionLabel": "Referred in Senate",
"lastModified": "2023-11-16T01:54:49Z"
}
],
"relatedId": "BILLSTATUS-118hr3496"
}
Following any of these will return a summary of information about this content, including download links, like BILLS-118hr3496rfs
{
"originChamber": "HOUSE",
"references": [**COLLAPSED FOR READABILITY**],
"congress": "118",
"session": "1",
"detailsLink": "https://www.govinfo.gov/app/details/BILLS-118hr3496rfs",
"isPrivate": "false",
"title": "An act h.R. 3496 (RFS) - Referred in Senate",
"branch": "legislative",
"isAppropriation": "false",
"collectionName": "Congressional Bills",
"download": {
"premisLink": "https://api.govinfo.gov/packages/BILLS-118hr3496rfs/premis",
"txtLink": "https://api.govinfo.gov/packages/BILLS-118hr3496rfs/htm",
"zipLink": "https://api.govinfo.gov/packages/BILLS-118hr3496rfs/zip",
"modsLink": "https://api.govinfo.gov/packages/BILLS-118hr3496rfs/mods",
"pdfLink": "https://api.govinfo.gov/packages/BILLS-118hr3496rfs/pdf"
},
"pages": "37",
"related": {"billStatusLink": "https://www.govinfo.gov/bulkdata/BILLSTATUS/118/hr/BILLSTATUS-118hr3496.xml"},
"relatedLink": "https://api.govinfo.gov/related/BILLS-118hr3496rfs",
"suDocClassNumber": "Y 1.6:, Y 1.4/6:",
"dateIssued": "2023-11-14",
"currentChamber": "SENATE",
"billVersion": "rfs",
"billType": "hr",
"packageId": "BILLS-118hr3496rfs",
"committees": [{
"authorityId": "ssju00",
"chamber": "S",
"committeeName": "Committee on the Judiciary",
"type": "S"
}],
"collectionCode": "BILLS",
"governmentAuthor2": "Senate",
"governmentAuthor1": "Congress",
"publisher": "U.S. Government Publishing Office",
"docClass": "hr",
"lastModified": "2023-11-16T01:54:49Z",
"category": "Bills and Statutes",
"billNumber": "3496",
"otherIdentifier": {
"migrated-doc-id": "f:h3496rfs.txt",
"parent-ils-system-id": "000501532",
"child-ils-title": "House bills",
"parent-ils-title": "Congressional bills",
"child-ils-system-id": "000325573",
"stock-number": "021-610-00252-9"
}
}
Thanks for the workaround Jon.
Does it make sense to keep this open as a feature request? It would be nice have the non-xml format URLs included in the BILLSTATUS response.
Some bill-status return
<textVersion>
items that have empty<formats>
tags, however this data is available on the congress.gov API and the actual format files (pdfs,xml,html) are available from GPO.Example request:
Response:
Notice how
<textVersions>
has empty<formats/>
tags:However if you check congress.gov's API you'll see the formats are available:
Request:
Response:
And by assuming the GPO url you'll notice that the formats are available:
I'll provide a list of the affected legislation here:
118th congress