Skip to content

Instantly share code, notes, and snippets.

@shcallaway
Last active July 11, 2021 16:54
Show Gist options
  • Save shcallaway/fa1990655a568a67245d7e2d61456a9c to your computer and use it in GitHub Desktop.
Save shcallaway/fa1990655a568a67245d7e2d61456a9c to your computer and use it in GitHub Desktop.
List CMS datasets

List names of CMS datasets in Socrata:

curl -s 'http://api.us.socrata.com/api/catalog/v1?domains=data.cms.gov&search_context=data.cms.gov&limit=2000' | jq ".results | .[] | .resource.name"

Put CMS dataset names, ids, descriptions, etc. into CSV:

curl -s 'http://api.us.socrata.com/api/catalog/v1?domains=data.cms.gov&search_context=data.cms.gov&limit=2000' | jq ".results | .[] | .resource | [.name, .id, .description, .createdAt, .updatedAt, .data_updated_at] | @csv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment