Apple Watch + Apple Health: A Complete Explorer's Guide - ONTO NOTHING
Researcher's Guide

Apple Watch + Apple Health:
a complete guide for the researcher

From native export to Python pipelines - how to work with physiological data at any level of training.

2026-03-25 12 sections ~20 min read
Flipping
Section 1

What is Apple Health and how does it work?

Apple Watch HealthKit Store Your details

Before working with data, it is important to understand the system architecture. Without this understanding, many things will seem strange - for example, why the data is sometimes duplicated, why the heart rate is not recorded every second, or why the export file weighs half a gigabyte.

Apple Health is more than just an app. It is a centralized database of physiological information deployed locally on your iPhone. Technical name - HealthKit. The Health application that you see on the screen is just a user interface to this database.

Key principle: Data is stored on the device, not on Apple servers. This means Apple doesn't have a cloud API through which a researcher can connect remotely and download someone's data.. All access occurs only through the iPhone of a specific user, with his explicit permission. With two-factor authentication enabled, even Apple itself does not have the keys to decrypt the data - it is protected by end-to-end encryption.

How the data gets into the database: Any device or app that has user permission can write data to HealthKit. Apple Watch does this automatically and continuously. Garmin, Oura, Polar and other devices - through their applications. The user can also enter data manually. Each record contains four required fields: data type, numeric value, unit of measure, and source—the device or application that created the record.

Data storage model important for understanding what happens when you have multiple devices. Apple Health doesn't average or mix data from different sources—it stores all records in isolation. When you request a daily total (for example, the number of steps per day), the system applies a hierarchy of priorities and selects the value from the source with the highest priority. By default, Apple Watch is ranked higher than iPhone, iPhone is higher than third-party apps. The user can change this order manually in the settings of the “Data Sources” section.

This has a practical consequence for the researcher: if a participant wears both an Apple Watch and a Garmin, steps will be recorded twice, but only those from the priority source will be included in the summary statistics. In the raw export, however, both records will be visible - and this must be taken into account when cleaning the data.

Section 2

What is actually stored inside - the nature of the data

This is one of the most important sections for a researcher. The difference between what you expect to get and what's actually stored in Apple Health can completely change the design of your study.

Apple Health does not store raw sensor signals.

Apple Watch reads photoplethysmogram (PPG)—the optical signal of green light reflecting off blood vessels—and processes it using built-in machine learning algorithms. The result is already included in the database: the pulse value in beats per minute, and not the wave signal itself. The same thing happens with the accelerometer: instead of the original stream of acceleration values ​​​​along three axes, the number of steps or the fact of training is recorded in HealthKit.

For a researcher, this means the following: you are working with processed indicators, and not with primary physiological signals. This doesn't make the data useless - it's great for trend analysis, correlations, observational studies and working with large samples. But if your task is to analyze the quality of the signal itself or obtain R-R intervals with millisecond accuracy, the standard capabilities of HealthKit will not be enough.

What exactly is stored in HealthKit
Heart rate - HeartRate
BPM values ​​with precise timestamps. Outside of training - once every 5-10 minutes, during training - continuously (~ once every 5 seconds).
Heart rate variability - HeartRateVariabilitySDNN
SDNN value in milliseconds. Gathers mainly at night, during periods of relaxation. Sparse data - 3–5 points per day.
Blood oxygen saturation - OxygenSaturation
SpO2 values ​​in percent. Filmed in the background mainly at night, on Series 6 and newer.
Wrist temperature - AppleSleepingWristTemperature
Available with Series 8 and later, measured during sleep only.
Sleep phases - SleepAnalysis
Categorical data: Core, Deep, REM, Awake. Accuracy ~60–70% compared to polysomnography.
ECG - Electrocardiogram
Single channel recording (Lead I), 30 seconds, manual recording only. The only way to get close to the raw cardiac signal.
Steps, distance, calories - StepCount, DistanceWalkingRunning, ActiveEnergyBurned
Aggregated physical activity data.
VO2 max — VO2Max
Estimated cardio endurance based on training data.
Workout - HKWorkout
Structured training records with GPS tracks, heart rate zones, calories.

Each entry in the database is accompanied by metadata: source (name of device or application), device identifier, time stamps of the beginning and end of measurement. Field sourceName allows you to subsequently filter data for a specific device - this is an important cleaning tool.

Section 3

Compatible devices - who writes what to the database

Here lies one of the key values ​​of Apple Health for the researcher: it is an open aggregator ecosystem. If the device is able to write data to HealthKit, all the methods described in this manual work for it in full.

Apple Watch Full
Pulse HRV Dream SpO2
Garmin good
Heart rate HRV Workout
Coros Full
Pulse Dream SpO2
Oura Ring Full
Dream HRV Temperature
Whoop good
Load HRV Recovery
Polar good
Heart rate Load Dream
Withings Full
ECG SpO2 Pressure
Fitbit Partial
Steps Heart rate
Samsung / Pixel No
Android
💡 How to check data sources

Open the application Health → select any metric (for example, Heart Rate) → scroll down to the section "Data Sources and Access". It lists all devices and applications that write data of this type. For the purity of the experiment, determine the priority source and make sure it is first on the list.

Level 1 No code
Section 4

Native export (XML)

Free · Full archive · Suitable for one-time deep extraction of entire history

The easiest way to get all the data is native export directly from the Health app. No third party tools, no permissions, just a few clicks.

  • 1
    Open the application Health on iPhone.
  • 2
    Click on yours avatar or initials in the upper right corner.
  • 3
    Scroll down to "Export all health data".
  • 4
    Confirm action. Creating an archive will take from a few minutes to half an hour.
  • 5
    Save the file export.zip via AirDrop, iCloud Drive or send by mail.

What's inside the archive: main file - export.xml. Each entry looks like this:

<Record
  type="HKQuantityTypeIdentifierHeartRate"
  sourceName="Apple Watch"
  unit="count/min"
  startDate="2025-03-15 08:14:22 +0300"
  value="72"/>

If the data came from Coros or Garmin - field sourceName will contain its name. The structure is identical.

⚠️ File size: from 100 MB to 1–2 GB over several years. Excel will not open such a file.. Need a converter or code.

Besides export.xml in the archive: GPX files with GPS training tracks and a folder electrocardiograms with ECG data.

What to do with XML without code

Online service applehealthdata.com — the file is processed locally in the browser, the data is not transferred anywhere. The output is a set of CSV files, divided by data type: a separate file for heart rate, steps, sleep, and so on.

.zip export
Level 2 No code
Section 5

Exporter applications

The practical way for most tasks. Works the same for data from any source synced with Apple Health.

HealthExport

Selecting specific metrics and aggregation interval. Data with detail down to the minute. Convenient for selective export without unnecessary noise.

CSV Aggregation Filters
QS Access

Free minimalistic tool. Select indicators → click “Create Table” → get CSV. Zero entry threshold.

CSV For free Just
Health Data Export Tool

Supports Walking Asymmetry, Six-Minute Walk Test and other new metrics. Can create PDF reports for the doctor.

CSV PDF New metrics

Structure of the final table - the same for all applications above:

Column What it contains
StartDate Exact time stamp of start of measurement
EndDate Measurement end time
Value Numerical value of the indicator
Unit Unit of measurement - count/min, ms, %, kcal
Source Data source: Apple Watch, COROS PACE 3, Garmin Connect…
Device Specific device ID

Column Source allows you to instantly filter data by device if there are several sources in the database.

Level 3 Python
Section 6

Python and software processing

Full control over every step. For those who want to parse, clean, build correlations, and apply statistical models.

  • 1
    Get export.xml via native export (Level 1). Unpack the archive.
  • 2
    Install the libraries:
pip install pandas lxml matplotlib seaborn
  • 3
    Parsing XML into DataFrame:
import xml.etree.ElementTree as ET
import pandas as pd

tree = ET.parse('export.xml')
root = tree.getroot()

records = []
for record in root.findall('.//Record'):
    records.append({
        'type':       record.get('type'),
        'value':      record.get('value'),
        'unit':       record.get('unit'),
        'startDate':  record.get('startDate'),
        'endDate':    record.get('endDate'),
        'sourceName': record.get('sourceName'),
        'device':     record.get('device'),
    })

df = pd.DataFrame(records)
  • 4
    Extract a specific metric and filter by device:
hr_df = df[df['type'] == 'HKQuantityTypeIdentifierHeartRate'].copy()
hr_df['value']     = pd.to_numeric(hr_df['value'])
hr_df['startDate'] = pd.to_datetime(hr_df['startDate'])
hr_df = hr_df.sort_values('startDate')

# Filter by specific device:
hr_df = hr_df[hr_df['sourceName'] == 'Apple Watch']
# or:
hr_df = hr_df[hr_df['sourceName'] == 'COROS PACE 3']
  • 5
    Time series visualization:
import matplotlib.pyplot as plt

plt.figure(figsize=(14, 4))
plt.plot(hr_df['startDate'], hr_df['value'], alpha=0.4, linewidth=0.5)
plt.title('Heart Rate Time Series — Apple Watch')
plt.xlabel('Date')
plt.ylabel('BPM')
plt.tight_layout()
plt.show()
Basic data type identifiers in HealthKit
HKQuantityTypeIdentifierHeartRate               # pulse (count/min)
HKQuantityTypeIdentifierHeartRateVariabilitySDNN # HRV (ms)
HKQuantityTypeIdentifierStepCount               # steps
HKQuantityTypeIdentifierVO2Max                  #VO2 max (ml/kg/min)
HKQuantityTypeIdentifierOxygenSaturation        # SpO2 (%)
HKQuantityTypeIdentifierRespiratoryRate         # breathing rate
HKCategoryTypeIdentifierSleepAnalysis           # sleep (categorical)
HKQuantityTypeIdentifierRestingHeartRate        # resting heart rate
HRV analysis
import heartpy as hp

working_data, measures = hp.process(data, sample_rate=1.0)
print('SDNN:',  measures['sdnn'])
print('RMSSD:', measures['rmssd'])
Correlation analysis
combined = pd.merge(hr_daily,  hrv_daily,   on='date')
combined = pd.merge(combined, sleep_daily, on='date')
print(combined.corr())

Ready-made libraries

apple-health-parser
PyPI - ZIP archive extraction, structure validation, graph generation. Minimum code to get started.
apple-health-extractor
Isolated retrieval of specific data types. Convenient if you need one metric without completely parsing the entire file.
qs-ledger
A suite of Jupyter Notebooks for complex health data analysis. Includes ready-made pipelines for Apple Health, Garmin, Oura.
Level 4 Special software
Section 7

Raw sensor data in real time

If the task is an accelerometer, gyroscope, magnetometer with a frequency of 50–100 Hz. HealthKit won't help here.

Apple Watch does not store high-frequency sensor data in a long-term database - for power and memory reasons. There are special applications for such tasks.

Sensor Logger
  • Runs simultaneously on iPhone and Apple Watch
  • Accelerometer, gyroscope, barometer, magnetometer, GPS, heart rate from HealthKit
  • Streaming via HTTP and MQTT in real time over a local network
  • Export: ZIP CSV, JSON, Excel, KML
  • Suitable for biomechanics and kinematics
SensorLog
  • Alternative tool
  • Broadcasts accelerometer data from Apple Watch to computer via HTTP/TCP
  • AccelerometerX/Y/Z columns with time stamps
  • Suitable for movement pattern analysis
Important Limitation

Background recording of high frequency data on Apple Watch is limited by iOS/watchOS. Long sessions (more than 1-2 hours) require the screen to remain active or the application to run in a special Workout mode. Consider this when planning your protocol.

Section 8

Data formats and what to do with them

The same health file can come in different formats - each requires a different approach.

XML
Most complete, least convenient. Contains everything. Excel won't open due to size.
applehealthdata.com · applehealth2csv · Python
CSV
Universal working format. Excel, Google Sheets, pandas, R. Attention: timestamps are strings and require conversion.
Excel · pandas · R · Google Sheets
JSON
For software processing. Each record is an object with explicit fields. Good for pipelines and APIs.
Python · Node.js · REST API
GPX
GPS training tracks. Route with coordinates and timestamps.
Google Maps · Komoot · Runalyze · GoldenCheetah
FIT
Garmin/Coros binary format. Heart rate per second, GPS, pace, power. The detail is higher than in Apple Health.
GoldenCheetah · Runalyze · fitfileviewer.com
Section 9

Data processing using AI models

Apple Health CSV files lend themselves well to language model analysis. It works, and it works well.

CSV export
Upload to AI
Question
Analysis
Insight
What can AI models do?
  • 1
    Analyze correlations — the relationship between HRV and sleep quality, between activity and resting heart rate.
  • 2
    Find patterns and anomalies — pulse jumps, sleep changes after exercise, weekly rhythms.
  • 3
    Generate statistics — averages, medians, standard deviations, trends for the period.
  • 4
    Help with interpretation — explain indicators in the context of physiology.
  • 5
    Write and debug code — create Python scripts if you are not a programmer.
How to prepare data
  • 1
    Don't load XML directly - convert to CSV at first.
  • 2
    Limit the period — 30–90 days are enough for chat analysis.
  • 3
    Choose specific metrics - not the entire archive, only the necessary types of data.
  • 4
    Check your privacy - Remove personal identifiers before downloading third party data.

Tools: Health2AI and AI Health Export convert exports into formats optimized for loading into ChatGPT, Claude, or other language models.

Local work without data transfer to the cloud

Repository apple-health on GitHub supports integration with local models via Ollama. Important for studies where participant data should not leave a secure loop.

Example Workflow
  • 1
    Export via Health Auto Export in CSV for the last 3 months: HeartRate, HRV, SleepAnalysis, StepCount.
  • 2
    Load the CSV into the dialog with Claude or GPT-4.
  • 3
    Ask a specific question: “Show the correlation between overnight HRV and steps from the previous day” or “Find days when your resting heart rate was significantly higher than average.”
  • 4
    Get analysis and interpretation.

⚠️ AI analysis is exploratory analysis, not the final conclusions of the study. The results require statistical confirmation.

Section 10

Data cleaning and preparation

Typical problems and specific solutions for each of them.

Data duplicationTwo trackers → two records with different sources, but close timestamps
Determine the priority source and filter:
df = df[df['sourceName'] == 'Apple Watch']
Temporary gaps in pulseHeart rate is recorded once every 5-10 minutes outside of training - there will be gaps in the daily series
This is fine. If you need a continuous series, use linear interpolation explicitly, marking the filled values ​​with a separate flag.
Time zonesTags are stored at UTC offset; travelers may experience changes
pd.to_datetime(df['startDate'], utc=True).dt.tz_convert('Europe/Moscow')
Outliers and artifactsPulse above 220 or below 30 is almost certainly an artifact (poor contact)
hr_df = hr_df[(hr_df['value'] >= 30) & (hr_df['value'] <= 220)]
HRV sparsityApple Health records SDNN only at night - 3–5 points per day
For trend analysis it is enough. For minute monitoring of the ANS, use the Polar H10 chest sensor.
Data provenanceWithin a few years, the user could change the device - new generation algorithms systematically give different values
Document your device model and watchOS version at the time of research. Consider possible shifts at the shift boundary.
Section 11

Be honest about limitations

What Apple doesn't give away and why it's important to know before starting your research.

  • No access to raw PPG signal. Apple Watch measures the photoplethysmogram, but only gives the final result - the pulse value in bpm.
  • There are no continuous R-R intervals in the background. Partially solved via ECG (30 sec manually) or HRV Logger and Heart Plot apps. For full HRV in the frequency domain - Polar H10.
  • No server API. Data must be pushed from the participant's device manually or through an auto-exporter application.
  • "Black box" of algorithms. Apple does not disclose details of calculation of HRV, sleep phases, VO2 max. Algorithms change with watchOS updates - document the version.

Accuracy of indicators: Resting pulse ±5 bpm in 89% of measurements AF: specificity 0.91 Walking steps: error 2–3% Calories: error up to 30–50% Sleep phases: 60–70% vs polysomnography SpO2: ±3–4%

Fits well
  • Observational studies
  • Trend analysis
  • Population studies
  • Longitudinal monitoring
  • Pilot projects
  • Cardiovascular risk screening
Need additional. tools
  • Clinical diagnosis
  • Pharmacological tests
  • High precision HRV in frequency domain
  • Neurophysiology
  • Sports Science at the Elite Level

About Garmin - for those who value openness. Garmin provides more open access through Garmin Health API and Connect IQ. For research where access to primary data is critical, Garmin is often more convenient. Apple wins in user friendliness, but the data remains in a “closed garden” - this is a conscious position of the platform.

Section 12

Tool comparison table

Task Tool Format Level AI analysis
Quickly get CSV without code Health Auto Export / QS Access CSV Elementary ✓ Yes
Complete historical archive Native export + online converter XML → CSV Elementary ⏱ After conversion
Automatic daily flow Health Auto Export Premium CSV / JSON Average ✓ Yes
Software processing, correlations Native export + Python (pandas) XML → DataFrame Advanced ✓ Full control
HRV analysis in frequency domain Python + heartpy + Polar H10 CSV → processing Research ~ Partially
Raw accelerometer data Sensor Logger / SensorLog CSV / JSON / HTTP Research ⏱ After export
Detailed training data Garmin/Coros + GoldenCheetah FIT files FIT → CSV Average ⏱ After conversion
Section 13

Checklist for starting a study

Done: 0 from 17
Before you start collecting data
Determine what metrics are needed and with what detail (every second, minute, daily)
Select a device and make sure it supports the desired data types
Set Apple Health source priorities when using multiple devices
Check that the right types of data are being recorded: Health → Metrics → Data Sources
Install an exporter application (Health Auto Export recommended)
Carry out a test export and make sure that the data is correct
When working with data
Document the watchOS version and device model at the time of research
Filter data by source if there are several devices in the database
Check time zones and bring them to a single standard
Remove physiologically impossible emissions
Explicitly mark interpolated values ​​when filling time gaps
When analyzed with AI
Convert to CSV before uploading
Limit data period to relevant (30–90 days for most tasks)
Upload only the necessary metrics, not the entire archive
Consider AI analysis as exploratory - confirm with statistical methods
When publishing results
Specify the device model and operating system version
Describe the data cleaning algorithm
If necessary, validate a subsample on clinical equipment

Wearable data is not perfect science by default. It's a rich, dense, but noisy stream of observations from real life - and that's what makes them valuable.. Apple Health offers the researcher a rare combination: unified access to long-term physiological data collected in vivo without laboratory restrictions. The key to working with this material is to understand where the real signal ends and the algorithmic interpretation begins.