List collection codes with package and granule counts.
GET/collections
- Passive: the target is not contacted
Returns the collections available through the API.
Response fields · 4ShowHide
collectionCode
Collection code
collectionName
Collection name
packageCount
Number of packages
granuleCount
Number of granules, where applicable
curl 'https://api.govinfo.gov/collections?api_key=YOUR_API_KEY'{
"collections": [
{
"collectionCode": "EXAMPLE",
"collectionName": "Example Collection",
"packageCount": 100,
"granuleCount": 500
}
]
}