Cdc Get Dataset Schema
cdc_get_dataset_schemaFetch the column schema for a CDC dataset — names, data types, descriptions, row count, and last-updated timestamp. Returns the first 100 columns by default; wide datasets continue via column_offset. Get dataset IDs from cdc_discover_datasets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | CDC Socrata host to fetch the dataset from. "data.cdc.gov" (default) and "chronicdata.cdc.gov" front the same catalog, so a four-by-four ID resolves on either and the default works whichever host the dataset was found on. | data.cdc.gov |
| datasetId | Yes | Four-by-four dataset identifier (e.g., "bi63-dtpu"). Obtain from cdc_discover_datasets. | |
| column_limit | No | Columns to return in this call (default 100, max 500). Every dataset under the default arrives whole; past it the response reports totalCount and a nextOffset to pass back as column_offset. Raise this to pull a wide schema in one call. | |
| column_offset | No | Index of the first column to return, for continuing past a previous call (default 0). Columns keep the order the dataset declares, so column_offset plus column_limit walks the schema without gaps or repeats. An offset at or past the column count returns an empty window rather than an error. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | The column_limit that bounded this response. | |
| name | No | Dataset display name from the catalog (e.g., "Provisional COVID-19 Deaths by Sex and Age"). | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of columns returned in this response. | |
| notice | No | Guidance when the response is a subset of the schema — which columns it covers, how to reach the rest, or that column_offset ran past the end. | |
| columns | No | The requested window of dataset columns, with full types and descriptions. Bounded by column_limit/column_offset; the enrichment fields say how the window sits in the whole schema. | |
| rowCount | No | Total number of rows when reported by upstream; omitted when unknown. | |
| truncated | No | True when the returned columns are a subset of the schema. Absent means every column of the dataset is in this response. | |
| updatedAt | No | Last data update timestamp when provided. | |
| nextOffset | No | Value to pass as column_offset on the next call to continue after the last column returned. Present only when columns remain beyond this window. | |
| totalCount | No | Total columns in the dataset schema, before column_limit/column_offset. | |
| description | No | Dataset description when provided. |