Get an API key in 20 seconds from https://open.gsa.gov/api/regulationsgov/
export APIKEY=...
curl "https://api.regulations.gov/v4/documents?page%5Bsize%5D=250&filter%5BagencyId%5D=IRS&filter%5BpostedDate%5D%5Bge%5D=2023-01-01&api_key=$APIKEY" >> documents.json
curl "https://api.regulations.gov/v4/documents?page%5Bsize%5D=250&filter%5BagencyId%5D=IRS&filter%5BpostedDate%5D%5Bge%5D=2023-09-01&api_key=$APIKEY" >> documents.json
jq --raw-output '.data[] | select(.attributes.commentEndDate != null) | .attributes.objectId' documents.json > objectIds
jq --raw-output '.data[] | select(.attributes.commentEndDate != null) | .attributes.title' documents.json > titles
for objectId in $(cat objectIds)
do curl "https://api.regulations.gov/v4/comments?filter%5BcommentOnId%5D=$objectId&page%5Bsize%5D=5&api_key=$APIKEY" | jq '.meta.totalElements' >> totalComments
done
paste totalComments title | sort -nru > combined
As of today