Guide

Export Apple Health data

The Health app exports everything as XML, all at once. HealthAPI syncs Apple Health from your iPhone and lets you download it as one JSON file, or read just the days, weeks and trends you need over a REST API.

  • JSON, never XML
  • iPhone, iOS 15 or later
  • Updated 15 October 2026

The Health app's own export

Your iPhone can export all of your Health data without any other app:

  1. Open the Health app

    Tap Summary, then your picture or initials.
  2. Export All Health Data

    Tap it, then choose how to share your data. The file is in XML format.

It works, and it is free. But it has limits if you want to use the data:

It's XML. A format made for moving data between apps. To read it you need a parser or a conversion tool.

It's everything, every time. Each export holds every reading in Health. With a few years of Apple Watch data, that is a very large file.

It's a snapshot. It is out of date the next morning. To update it, you export again.

It's raw. Readings from your iPhone and your Apple Watch overlap, so adding up steps from the file gives a bigger number than the Health app shows.

Export Apple Health data as JSON with HealthAPI

HealthAPI syncs Apple Health from your iPhone to your own private account and keeps it up to date. You can export all of it as JSON at any time, in two ways.

In the app

Open Settings, then Data & Privacy, and tap Request Data Export, then Create export. When it is ready, share the JSON file wherever you want to keep it.

Over the API

With your API key (in the app: Connect, then Other tools), download the same file from GET /gdpr/export:

Shell
curl "https://healthapi.app/api/v1/gdpr/export" \
  -H "Authorization: Bearer $KEY" \
  -o export.json

Neither counts toward your daily requests, and both still work if your subscription has ended, so your data is never stuck.

What's in the file

One JSON document with everything HealthAPI stores for you:

FieldWhat it holds
health_samplesEvery synced reading (type, value, unit, start and end, source app and device), plus HealthAPI's daily totals and averages.
workoutsType, start and end, duration, distance and energy for each workout.
userYour account: id, email if there is one, device, plan, and when you joined.
api_requests_last_30_daysThe requests made to your account in the last 30 days.
subscriptionsYour plan history from the App Store.
exported_atWhen the file was made.
export.json (shortened)JSON
{
  "user": { "id": 1234, "plan_tier": "pro", "created_at": "2026-08-30T09:12:44Z", … },
  "health_samples": [
    {
      "id": 981245,
      "type": "restingHeartRate",
      "value": 54,
      "unit": "count/min",
      "start_date": "2026-10-12T06:41:00Z",
      "end_date": "2026-10-12T06:41:00Z",
      "source_app": "Alex’s Apple Watch",
      "device": null,
      "synced_at": "2026-10-12T07:05:13Z"
    },
    …
  ],
  "health_samples_count": 412387,
  "workouts": [
    {
      "id": 5512,
      "activity_type": "running",
      "start_date": "2026-10-12T11:02:00Z",
      "end_date": "2026-10-12T11:43:30Z",
      "duration_seconds": 2490,
      "total_distance_meters": 7120,
      "total_energy_kcal": 386.4,
      "source_app": "Alex’s Apple Watch",
      "synced_at": "2026-10-12T12:01:40Z"
    },
    …
  ],
  "workouts_count": 318,
  "api_requests_last_30_days": [ … ],
  "subscriptions": [ … ],
  "exported_at": "2026-10-15T10:20:00.000Z"
}

Times are in UTC. Types are HealthKit names such as stepCount and heartRateVariability; the metric list has all 50 with their units. Units are HealthKit's own, so a percentage like blood oxygen is a fraction (0.98 for 98%).

Besides the readings themselves, health_samples holds HealthAPI's own rows:source_app healthapi:agg rows are totals with the iPhone and Apple Watch overlap removed, and healthapi:dstat rows are daily averages. To add up steps or energy, use only the healthapi:agg rows.

Or export just the numbers you need

A full export is the right tool for a backup. For analysis, the API's summaries are easier: they are already added up per day without double counting, in your timezone, and they match the Health app.

You wantCall
One day, in fullGET /health/daily-summary?date=2026-10-12
One weekGET /health/weekly-summary?week=2026-W41
A metric, day by dayGET /query/trends?type=stepCount&days=90
WorkoutsGET /health/workouts?start_date=2026-09-01
Individual readingsGET /health/samples?type=heartRate&start_date=2026-10-12

Each is described with an example in the API reference, and the Apple Health API page shows how to make your first request.

Into a spreadsheet with n8n, Zapier or Make

To keep a spreadsheet up to date, let an automation fetch the summary each day and add a row. In n8n, Zapier or Make, schedule an HTTP request to /health/daily-summary with the header Authorization: Bearer <key>, then map the fields you want (steps, sleep hours, resting heart rate) into a step that writes to your sheet. HealthAPI returns JSON; the tool turns it into rows.

The Health app's export and HealthAPI, side by side

Health app exportHealthAPI
FormatXMLJSON
What's in itEverything in the Health app50 metrics plus workouts
How currentWhen you made itAs of your iPhone's last sync
Just one day or metricNo, the whole fileYes, over the REST API
Totals match the Health appRaw readings, add them up yourselfYes, in the summaries
CostFreeA HealthAPI plan, after a 2-day free preview and a 7-day free trial

Privacy

  • The file is everything. Keep the export somewhere private; it holds your full synced history.
  • Read only. HealthAPI reads from Apple Health and never writes to it.
  • Leave anytime. Export first, then delete your account in the app. You have 30 days to change your mind, or erase it at once with DELETE /gdpr/account. More in our privacy policy.

Questions

How do I export Apple Health data from my iPhone?

In the Health app, tap Summary, then your picture or initials, then Export All Health Data, and choose how to share it. That gives you everything in Health in XML. For JSON you can keep up to date, sync with HealthAPI and export from the app or the API.

Can I export Apple Health data as CSV?

Not with HealthAPI: its export and its API are JSON. Most spreadsheet and automation tools read JSON, and the daily summaries are easy to turn into rows.

Does exporting use my daily requests?

No. GET /gdpr/export and the in-app export don't count toward your daily limit.

Can I export my data if my subscription has ended?

Yes. When an account has no active subscription, health reads pause, but the export still works, from the app or the API.

Which data is in the export?

What HealthAPI has synced: up to 50 Apple Health metrics and your workouts, plus your account details, your API requests from the last 30 days and your subscriptions. It doesn't include Apple Health data HealthAPI doesn't sync, such as ECG recordings or clinical records.

Is the export the same as Apple's?

No. Apple's export is a snapshot of everything in the Health app, in XML. HealthAPI's is what it has synced, in JSON, and the API lets you read just the days, weeks or metrics you need.

The HealthAPI app icon

Your Health data, as JSON.

Get HealthAPI for iPhone, let it sync, and export or query it whenever you like.