NHANES Download And Parse
Download and parse NHANES XPT data files from CDC into structured JSON (DataFrame-ready). Bridges dataset discovery to analysis by handling XPT download, parsing, optional variable selection, and age filtering. For standard components (Demographics, Dietary, Examination/BodyMeasures, Questionnaire), the tool auto-resolves the filename from the cycle suffix. For Laboratory data, provide the exact dataset_name (e.g., 'CBC', 'BIOPRO', 'GHB', 'GLU', 'TRIGLY', 'HDL', 'TCHOL'). Returns column metadat…
Overview
Download and parse NHANES XPT data files from CDC into structured JSON (DataFrame-ready). Bridges dataset discovery to analysis by handling XPT download, parsing, optional variable selection, and age filtering. For standard components (Demographics, Dietary, Examination/BodyMeasures, Questionnaire), the tool auto-resolves the filename from the cycle suffix. For Laboratory data, provide the exact dataset_name (e.g., 'CBC', 'BIOPRO', 'GHB', 'GLU', 'TRIGLY', 'HDL', 'TCHOL'). Returns column metadata, summary statistics, and the first 5000 rows as JSON records. Use nhanes_search_datasets first to discover available dataset names if unsure.
Status
The most recent probe succeeded. Safe to call from the agent today.
- Last probed
- 1d ago
- Last success
- 1d ago
- Last latency
- 1127ms
Schema
JSON Schema the agent (or your API call) must match.
{
"properties": {
"age_max": {
"description": "Maximum age filter (inclusive). Filters by RIDAGEYR from Demographics.",
"type": "number"
},
"age_min": {
"description": "Minimum age filter (inclusive). Filters by RIDAGEYR from Demographics. Auto-merges with DEMO file if the requested component is not Demographics.",
"type": "number"
},
"component": {
"description": "NHANES component category. 'Dietary' = Day 1 intake totals (DR1TOT), 'DietaryDay2' = Day 2 (DR2TOT), 'BodyMeasures' = BMX, 'Examination' = general exam. For Laboratory, also provide dataset_name.",
"enum": [
"Demographics",
"Dietary",
"DietaryDay2",
"Examination",
"Laboratory",
"Questionnaire",
"BodyMeasures"
],
"type": "string"
},
"cycle": {
"description": "NHANES survey cycle (e.g., '2017-2018', '2015-2016', '2013-2014', '2011-2012')",
"type": "string"
},
"dataset_name": {
"description": "Exact NHANES dataset filename prefix (without cycle suffix). Required for Laboratory (e.g., 'CBC', 'BIOPRO', 'GHB', 'GLU', 'TRIGLY', 'HDL', 'TCHOL'). Optional for other components to override the default filename.",
"type": "string"
},
"max_rows": {
"default": 5000,
"description": "Maximum number of data rows to return (default: 5000). Set lower for faster responses.",
"type": "integer"
},
"variables": {
"description": "List of variable names to select (e.g., ['SEQN', 'DR1TIRON', 'DR1TKCAL']). SEQN is always included. If omitted, all variables are returned.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"component",
"cycle"
],
"type": "object"
}Examples (1)
Default NHANES Download And Parse call
{
"age_max": 1,
"age_min": 1,
"component": "",
"cycle": "",
"max_rows": 1,
"variables": []
}Anonymous-safe example. Rate-limited; no sign-in required.
Identifiers
- Catalog ID
- tu_NHANES_download_and_parse
- Tool name
- NHANES_download_and_parse
- Added
- 2026-04-30 22:47Z
- Tags
- tooluniverse