Health Metrics - JSON Export Format
Documentation for health metrics structure in JSON exports
Last updated: October 31, 2026
On this page
JSON exports store health metrics in the metrics array.
Metric Name Format
All metric names in JSON exports use snake_case format (lowercase with underscores). For example:
- "Step Count" becomes
"step_count" - "Blood Pressure" becomes
"blood_pressure" - "Heart Rate" becomes
"heart_rate" - "Walking + Running Distance" becomes
"walking_running_distance"
Structure
The metrics array contains objects, each representing a specific health metric type. Most health metrics follow a common structure:
{
"name": "step_count",
"units": "count",
"data": [
{
"qty": 8500,
"date": "2024-02-06 14:30:00 -0800",
"source": "Apple Watch"
}
]
}
Common Fields
name(String): The name of the health metric in snake_case format (e.g., "step_count", "heart_rate", "active_energy")units(String): The unit of measurement (e.g., "count", "count/min", "kcal")data(Array): An array of data points, each containing:qty(Number): The quantity valuedate(Date): Timestamp in formatyyyy-MM-dd HH:mm:ss Zsource(String, when available): The app or device that recorded the sample
Special Metric Formats
Some health metrics have unique structures that differ from the common format:
Blood Pressure
Blood pressure readings include both systolic and diastolic values:
{
"name": "blood_pressure",
"units": "mmHg",
"data": [
{
"date": "2024-02-06 14:30:00 -0800",
"start": "2024-02-06 14:30:00 -0800",
"end": "2024-02-06 14:30:00 -0800",
"systolic": 120,
"diastolic": 80,
"source": "Health"
}
]
}
Fields:
systolic(Number): The systolic (upper) blood pressure reading. Summarized exports use the average of the readings in the time group.diastolic(Number): The diastolic (lower) blood pressure reading. Summarized exports use the average of the readings in the time group.
Heart Rate
Heart rate data includes minimum, average, and maximum values:
{
"name": "heart_rate",
"units": "count/min",
"data": [
{
"date": "2024-02-06 14:30:00 -0800",
"Min": 65,
"Avg": 72,
"Max": 85,
"source": "Apple Watch"
}
]
}
Fields:
Min(Number): Minimum heart rate during the measurement periodAvg(Number): Average heart rate during the measurement periodMax(Number): Maximum heart rate during the measurement period
Heart Rate Variability
With Summarize Data off, JSON exports of Heart Rate Variability (SDNN) may include available beat-to-beat readings. These require Heartbeat Series read access in Apple Health.
Summarized exports, CSV exports, and Recovery HRV do not include beat-to-beat readings.
Sleep Analysis
Sleep data structure depends on whether Summarize Data is on or off.
Summarize Data On
With Summarize Data on, sleep data is summarized by day. Durations in the same stage are added. Total sleep is asleep, core, deep, and REM added together. JSON keeps each day. In CSV, a coarser time group shows the latest day in that group:
{
"name": "sleep_analysis",
"units": "hr",
"data": [
{
"date": "2024-02-06 00:00:00 -0800",
"totalSleep": 7.5,
"asleep": 0.5,
"core": 3.5,
"deep": 1.5,
"rem": 2.0,
"sleepStart": "2024-02-05 23:00:00 -0800",
"sleepEnd": "2024-02-06 06:30:00 -0800",
"inBed": 8.0,
"inBedStart": "2024-02-05 22:45:00 -0800",
"inBedEnd": "2024-02-06 06:45:00 -0800",
"awake": 0.0,
"source": "Apple Watch"
}
]
}
Fields:
totalSleep(Number): Total time asleep in hoursasleep(Number): Time asleep without a recorded sleep stage, in hourscore(Number): Core sleep duration in hoursdeep(Number): Deep sleep duration in hoursrem(Number): REM sleep duration in hoursawake(Number): Time awake in hourssleepStart(Date): When sleep actually startedsleepEnd(Date): When sleep actually endedinBed(Number): Total time in bed in hoursinBedStart(Date): When you got into bedinBedEnd(Date): When you got out of bed
Summarize Data Off
With Summarize Data off, individual sleep segments are included:
{
"name": "sleep_analysis",
"units": "hr",
"data": [
{
"date": "2024-02-05 23:00:00 -0800",
"start": "2024-02-05 23:00:00 -0800",
"end": "2024-02-05 23:30:00 -0800",
"startDate": "2024-02-05 23:00:00 -0800",
"endDate": "2024-02-05 23:30:00 -0800",
"qty": 0.5,
"value": "Core",
"source": "Apple Watch"
}
]
}
Fields:
date,start,startDate(Date): Start time of the sleep segmentend,endDate(Date): End time of the sleep segmentsource(String): The app or device that recorded the segmentqty(Number): Duration of the segment in hoursvalue(String): Sleep state - one of:"Awake""Asleep"(uncategorized sleep phase)"In Bed""Core""REM""Deep""Unspecified"
Note: "Asleep" refers to an uncategorized sleep phase (rather than total time asleep). This may occur if the data source does not support sleep phase tracking.
Blood Glucose
Blood glucose readings include meal timing information:
{
"name": "blood_glucose",
"units": "mg/dL",
"data": [
{
"date": "2024-02-06 08:00:00 -0800",
"start": "2024-02-06 08:00:00 -0800",
"end": "2024-02-06 08:00:00 -0800",
"qty": 95,
"mealTime": "Before Meal",
"source": "Health"
}
]
}
Fields:
qty(Number): Blood glucose levelmealTime(String): One of:"Before Meal""After Meal""Unspecified"
Nutrition
When Summarize Data is off, individual nutrition quantity samples (for example Dietary Energy or Carbohydrates) may include food details recorded in Apple Health. For example:
{
"name": "dietary_energy",
"units": "kcal",
"data": [
{
"date": "2024-02-06 08:00:00 -0800",
"start": "2024-02-06 08:00:00 -0800",
"end": "2024-02-06 08:00:00 -0800",
"qty": 240,
"source": "Lose It!",
"foodType": "Boneless, Skinless Grilled Chicken Breast"
}
]
}
Fields:
qty(Number): Nutrient quantity for the samplefoodType(String, optional): Food name recorded by the source app, when available
With Summarize Data on, nutrition totals do not include foodType.
Sexual Activity
Sexual activity entries track protection usage:
{
"name": "sexual_activity",
"units": "count",
"data": [
{
"date": "2024-02-06 00:00:00 -0800",
"Unspecified": 0,
"Protection Used": 1,
"Protection Not Used": 0,
"source": "Health"
}
]
}
Fields:
Unspecified(Number): Count of events that day when protection status is unknownProtection Used(Number): Count of events that day when protection was usedProtection Not Used(Number): Count of events that day when protection was not used
Summarized exports count each calendar day. JSON keeps each day. In CSV, a coarser time group shows the latest day in that group.
Handwashing
Handwashing events track completion status:
{
"name": "handwashing",
"units": "s",
"data": [
{
"date": "2024-02-06 12:00:00 -0800",
"start": "2024-02-06 12:00:00 -0800",
"end": "2024-02-06 12:00:25 -0800",
"qty": 25,
"value": "Completed",
"source": "Apple Watch"
}
]
}
Fields:
qty(Number): Duration in seconds. Summarized exports use the average duration in the time group.value(String):"Completed"when the session lasts more than 20 seconds, otherwise"Incomplete"
Toothbrushing
Toothbrushing events track completion status:
{
"name": "toothbrushing",
"units": "s",
"data": [
{
"date": "2024-02-06 08:00:00 -0800",
"start": "2024-02-06 08:00:00 -0800",
"end": "2024-02-06 08:02:10 -0800",
"qty": 130,
"value": "Completed",
"source": "Health"
}
]
}
Fields:
qty(Number): Duration in seconds. Summarized exports use the average duration in the time group.value(String):"Completed"when the session lasts at least 2 minutes, otherwise"Incomplete"
Insulin Delivery
Insulin delivery entries include the reason for delivery:
{
"name": "insulin_delivery",
"units": "IU",
"data": [
{
"date": "2024-02-06 08:00:00 -0800",
"start": "2024-02-06 08:00:00 -0800",
"end": "2024-02-06 08:00:00 -0800",
"qty": 5,
"reason": "Bolus",
"source": "Health"
}
]
}
Fields:
qty(Number): Amount of insulin delivered. Summarized exports add the amounts in the time group.reason(String): One of:"Bolus"(mealtime insulin)"Basal"(background insulin)