HealthSave Get on App Store

Apple Health Export to JSON: How to Get Clean JSON From Apple Health, HealthSave

To export Apple Health data as JSON, install HealthSave, pick your metrics and date range, choose JSON as the format, and share the file out through the iOS share sheet. The output is a clean, pretty-printed top-level array, one object per sample, with predictable fields. This page is the exact schema, four real examples, and the gotchas to know before you parse it.

The shape, in one screen

Every JSON export is a top-level JSON array. Each element is one HealthKit sample. Five core fields are always present; medication rows add a small set of dose attributes. All dates are ISO 8601. The file is pretty-printed and UTF-8.

[
  {
    "date": "2026-04-09T14:22:11Z",
    "metric": "heart_rate",
    "value": 62,
    "unit": "count/min",
    "source": "Apple Watch"
  }
]
FieldTypeAlways there?What it is
datestring (ISO 8601)YesSample start time. UTC (Z) if you set the export to UTC, otherwise the sample's zone with its offset (sleep keeps the zone it was recorded in).
metricstringYesThe exact identifier, e.g. heart_rate, step_count, heart_rate_variability (HRV, SDNN). Full list at /metrics/.
valuenumberYesThe reading, always numeric: quantities as-is, workout durations in minutes, sleep in hours, medication doses as 1 (taken) or 0 (skipped).
unitstringYesHealthKit unit string. count/min for heart rate, ms for HRV (SDNN), kcal for active energy, m for distance, count for steps, hours for sleep, min for workouts, dose for medications.
sourcestringYesThe device or app that wrote the sample, e.g. Apple Watch, iPhone, Withings, MyFitnessPal. Workout rows append the type: Apple Watch (Running).
medication_name, medication_status, medication_unitstringsMedicationsThe logged name (Metformin), the status (taken, skipped), and the dose unit (mg).
scheduled_date, scheduled_dose_quantity, dose_quantityISO 8601 string, numbersMedicationsWhen the dose was scheduled, the scheduled amount, and the amount actually logged.

Three metric families spread across rows instead of adding fields. Sleep stages are their own metrics — sleep_core, sleep_deep, sleep_rem, sleep_awake, sleep_in_bed, plus one merged sleep_total per night, all in hours. One workout becomes up to three rows: workout_duration in min, workout_calories in kcal, workout_distance in m. Blood pressure is two metrics, blood_pressure_systolic and blood_pressure_diastolic, one sample each in mmHg. If you are tracking runs specifically, the Apple Health for runners page pulls these rows together with HRV and VO2 max for a training-block view. For rides, the Apple Health for cyclists page maps the same workout-expansion rows to distance_cycling, cycling_power, cycling_cadence, and cycling_functional_threshold_power.

Four real examples, one per metric kind

Quantity metric (heart rate from the watch):

{
  "date": "2026-04-09T14:22:11Z",
  "metric": "heart_rate",
  "value": 62,
  "unit": "count/min",
  "source": "Apple Watch"
}

Workout, one row per number, the type riding along in source (a workout with energy and distance also gets workout_calories and workout_distance rows at the same start time):

{
  "date": "2026-04-09T06:30:00Z",
  "metric": "workout_duration",
  "value": 44.4,
  "unit": "min",
  "source": "Apple Watch (Running)"
}

Medication dose (iOS 26+; one metric series per medication, value is 1 taken / 0 skipped):

{
  "date": "2026-04-09T08:00:00Z",
  "metric": "medication_metformin",
  "value": 1,
  "unit": "dose",
  "source": "Health",
  "medication_name": "Metformin",
  "medication_status": "taken",
  "medication_unit": "mg",
  "scheduled_date": "2026-04-09T08:00:00Z",
  "scheduled_dose_quantity": 500,
  "dose_quantity": 500
}

Blood pressure, two samples, one per component, same timestamp:

{
  "date": "2026-04-09T07:45:00Z",
  "metric": "blood_pressure_systolic",
  "value": 118,
  "unit": "mmHg",
  "source": "Omron"
}

Its sibling blood_pressure_diastolic row carries the 76.

How to export the file

  1. Install HealthSave free from the App Store. No account, no sign-up.
  2. Open the Export tab and grant read-only Health access.
  3. Pick the metrics you care about, then a date range (free tier caps at the last 7 days; Pro unlocks your full multi-year history).
  4. Set the timezone policy: Device time (your lived calendar day, recommended for daily totals and sleep) or UTC (recommended for self-hosted pipelines).
  5. Choose JSON as the format, then tap Export.
  6. Share it through the iOS share sheet, to Files, AirDrop, your API, SFTP, a Shortcut, or any app on your phone.

The export is one file. The filename includes the local date and time you tapped Export, e.g. healthsave_export_20260409_142211.json.

Honest limits

Parsing it: a tiny, complete example

Most consumers just want the readings for one metric. Here is the smallest useful script, in Node, that pulls out every heart rate value from an export file:

// node parse.js export.json
const fs = require('fs');
const data = JSON.parse(fs.readFileSync(process.argv[2], 'utf8'));
const hr = data.filter(r => r.metric === 'heart_rate')
               .map(r => ({ when: r.date, bpm: Number(r.value) }));
console.log(`got ${hr.length} heart rate samples`);
console.log(`newest: ${hr.at(-1)?.when}  ${hr.at(-1)?.bpm} bpm`);

Python is the same idea: json.load(open(path)) → list comprehension → [r['value'] for r in rows if r['metric'] == 'heart_rate']. The schema is plain JSON, so any language that can parse JSON can use it.

JSON vs CSV vs the API batch shape

FormatShapeBest for
JSON (this page)Top-level array of sample objectsScripts, AI tools, ad-hoc analysis, anything that can read JSON
CSV (the Apple Health XML to CSV guide)Header row + one sample per lineExcel, Numbers, Google Sheets, pandas, any spreadsheet
API batch (the API contract){"metric": "...", "samples": [...]} envelope per requestBackground sync to your own server, the webhook target

Same fields, three shapes. JSON is the most flexible; CSV is the most universal; the API shape is for sending batches to a server you control.

FAQ

What does the Apple Health JSON export look like?

A top-level array of objects, one per HealthKit sample. Every object has date, metric, value, unit, and source; value is always a number. Medication rows add medication_name, medication_status, medication_unit, scheduled_date, and dose quantities. Pretty-printed, UTF-8.

Is the JSON export free?

Yes. HealthSave exports CSV and JSON for free for the last 7 days. Pro, one-time $24.99 with Family Sharing, unlocks longer date ranges (your full multi-year history), PDF reports, and background sync to your own server.

Can I get JSON for my full history (years of data)?

Yes. Pro unlocks any date range, in JSON or CSV. The Full Archive preset streams your complete history as CSV — memory-safe even on a decade of heart rate samples; for JSON, pick the range you want in a custom export.

What units does the JSON use?

HealthKit units, normalized per metric: count/min for heart rate, ms for HRV (SDNN), kcal for active energy, m for distance, count for steps, mmHg for blood pressure. The full per-metric catalog is at /metrics/.

Is the timestamp UTC or local?

You choose. The export tab exposes a Timezone setting: Device time (your lived calendar day, recommended for daily totals and sleep) or UTC (recommended for self-hosted pipelines). PDF reports always use device time.

Are there hidden fields beyond date, metric, value, unit, source?

Only on medications. Medication rows carry medication_name, medication_status, medication_unit, medication_concept_id, scheduled_date, scheduled_dose_quantity, and dose_quantity. Everything else is the five core fields — sleep stages and workout numbers arrive as their own metrics rather than extra fields. The metric catalog documents each.

Where does the file go?

It lands in a temp file inside HealthSave, then HealthSave hands it to the iOS share sheet. You decide where it goes: Files, AirDrop, an SFTP app, a Shortcut, a request to your own API, or any cloud app on your phone.

Can I script against the JSON like the API contract?

The on-device JSON export is a flat array of samples. The server-sync API contract (POST /api/apple/batch) groups samples by metric in an envelope. Same fields, different shape — see the API page or the webhook guide.

HealthSave is not a medical device. It is for informational purposes only and does not diagnose, treat, cure, or prevent any disease or condition. The accuracy of any health data depends on your wearable device and its sensors.

Related guides

Get HealthSave

Free to download, no account. Get clean JSON in a couple of taps instead of fighting XML.

Download HealthSave on the App Store


HealthSave: Export Health Data, on iPhoneGet on the App Store