Skip to content
AF
Health Data

ECG API: Electrocardiogram and Irregular Rhythm Data

Last verified October 18, 2026 · 6 min read

The Google Health API exposes ECG recordings as its electrocardiogram data type, with lead I voltage samples, a sampling frequency, a millivolt scaling factor and Google's result classification, and irregular rhythm notifications as a separate type carrying the analysis windows behind each alert; both are list-only, read with the .ecg.readonly and .irn.readonly scopes, and described by Google as based on a software-as-a-medical-device (SaMD) feature. Apple HealthKit exposes irregularHeartRhythmEvent and an atrialFibrillationBurden percentage, both read-only, and stores Apple Watch ECG recordings as HKElectrocardiogram samples that sit outside the identifier data this site generates. Android Health Connect, Wear OS Health Services and the Bluetooth profiles here define no ECG or rhythm type, so on Android the documented route is the Google Health API. Display these results as the platform labels them, and do not re-derive a classification of your own.

Covered here:HealthKitHealth ConnectFitbit

This is the most clinical data a consumer health API returns, and every platform that has it treats it that way. Google flags both of its types as software-as-a-medical-device output and offers no write operation for either. Apple marks both of its identifiers read-only. Nobody lets a third-party app put an ECG or an arrhythmia alert into the store, which tells you what your app's role is: reading and displaying a result someone else's regulated feature produced.

What each platform exposes#

PlatformECG recordingRhythm alert or AFib measureVerified from
Google Health APIelectrocardiogram: a Session record, list onlyirregular-rhythm-notification: a Session record, list onlyGoogle's data-types page and the v4 discovery document, read 2026-10-17
Apple HealthKitHKElectrocardiogram samples; not an identifier case, so this site has no page for themirregularHeartRhythmEvent: category, read-only, iOS 12.2; atrialFibrillationBurden: percentage, read-only, iOS 16.0Apple's identifier documentation, read 2026-10-02
Android Health Connectnone among the 42 record classesnoneGoogle's data-types page, read 2026-10-03
Wear OS Health Servicesnone among the 65 DataType constantsnoneGoogle's DataType reference, read 2026-10-04
Bluetooth GATTnone among the characteristics this site coversnoneThe Bluetooth SIG's files, read 2026-10-17

The HealthKit ECG row rests on one sentence. Apple documents the metadata key HKMetadataKeyAppleECGAlgorithmVersion with "Apple Watch sets this key on the HKElectrocardiogram samples it creates. The key is read-only." Our HealthKit query predicates page also lists an electrocardiogram(_:) sample-predicate factory method. Nothing in this site's generated identifier data describes the sample's fields, so this page does not.

Google's ECG record#

Google describes electrocardiogram as "an Electrocardiogram (ECG) measurement session." The fields, all from the v4 discovery document:

  • waveformSamples: "An array of voltage values representing lead I ECG values," where "The first value in array corresponds to the start of the reading."
  • samplingFrequencyHertz: the sampling frequency of those samples.
  • millivoltsScalingFactor: the divisor that turns a sample into a voltage, which Google writes as millivolts = waveform_sample / millivolts_scaling_factor.
  • leadNumber: the number of leads used.
  • beatsPerMinuteAvg: the average heart rate during the reading.
  • resultClassification: one of NORMAL_SINUS_RHYTHM, ATRIAL_FIBRILLATION, INCONCLUSIVE, INCONCLUSIVE_HIGH_HEART_RATE, INCONCLUSIVE_LOW_HEART_RATE, UNREADABLE, NOT_ANALYZED or unspecified. Google's text for the two heart-rate results gives its cut-offs as >120bpm and <50bpm.
  • medicalDeviceInfo: output-only metadata that, for ECG, typically populates the firmware version, feature version and device model. Google describes the schema as "Software as Medical Device (SaMD) metadata. Used to construct the Unique Device Identifier (UDI)."

Two notes on time are easy to miss. The interval's start and end are equal, "representing the reading time." And "Historical ECG data lacks timezone offsets," so the offsets "will be missing or default to zero" and the civil time fields "will default to UTC"; Google recommends the physical time fields instead. A reading taken in the evening in Los Angeles can therefore show the next day if you group by civil date.

Google's table lists eight compatible devices for the type, including Fitbit Charge 5 and 6, Fitbit Sense and Sense 2, and Pixel Watch through Pixel Watch 4. Its Fitbit migration table maps the Fitbit Web API's ECG data to it.

Irregular rhythm notifications#

Google describes irregular-rhythm-notification as "an Irregular Rhythm Notification alert, indicating a potential sign of atrial fibrillation (AFib)." Beyond its interval and device metadata it carries alertWindows, "The overlapping analysis windows that were used to evaluate rhythm for potential AFib." Each window has its own start and end with UTC offsets, the heartbeats it contained, and a positive flag, and Google's note on the window schema is worth quoting whole: "The current version of the algorithm will only produce alerts if all windows are positive. So anything returned from the API will always have the positive bit set to true." The flag's own description adds that false "does not guarantee the absence of AFib."

HealthKit's nearest types carry far less. irregularHeartRhythmEvent is "A category sample type for irregular heart rhythm events," whose values come from the generic HKCategoryValue rather than an enum of its own, so a sample tells you that an event happened and when, as our HKCategoryValue reference explains for every type that resolves that way. Apple adds: "The irregular rhythm samples are read-only." atrialFibrillationBurden is a different measurement altogether: "an estimate of the percentage of time a person’s heart shows signs of atrial fibrillation (AFib) while wearing Apple Watch," in percentage units, discrete, read-only, from iOS 16.0. It is a summary percentage, not an alert, so it does not map onto Google's notification type.

Scopes and access#

The Google Health API reads these types under their own scopes: .ecg.readonly, whose consent text is "See your Google Health ECG data.", and .irn.readonly, "See your Google Health Irregular Rhythm Notifications data." Google's Scopes page lists no write scope for either family, the data-types table lists only list for both, and it marks neither with webhook support, so you poll. The scopes reference lists every family, and access and limits covers Google's OAuth app verification and the cap on unverified apps.

On iOS both identifiers are read-only by Apple's statement, so the authorization you request is read access only.

Android has no on-device route#

Health Connect's data-types table has no ECG or rhythm record, and Wear OS Health Services defines no such data type. Pixel Watch models appear in the Google Health API's compatible-device list for electrocardiogram, so on the evidence this site holds, an Android app reaches Pixel Watch ECG data through the Google Health API's cloud endpoints rather than on the device.

Keep the claims where the data puts them#

Google ties both types to a SaMD feature and says changes to them "may require additional review." Apple marks its types read-only. Our recommendation follows from that: show the classification, the alert and the burden percentage as the platform labels them, credit the platform, and do not compute a rhythm classification of your own from the waveform. Our heart rate API guide makes the same point about ordinary heart rate samples, and the FDA fitness app regulation page sets out where interpretation turns an app into a medical device. Nothing here is medical advice.

Before you ship#

Re-read the two Google type pages and the two HealthKit identifier pages before each release, since they regenerate from Google's and Apple's documentation. Use physical time for ECG readings. Treat every returned alert window as positive by Google's own note, and never present a missing alert as a clean result.

ECG and irregular rhythm, by platform

Each type links its reference page on this site. The quote is the platform's own description of the type, copied from the generated reference data, and it is the reason the type is listed: nothing here is paired by name. A platform with nothing listed has no type with a page here whose description names this metric.

Google Health API · read 2026-10-17

  • electrocardiogram — Session record · operations: list · no webhook support in Google's table
    “Represents an Electrocardiogram (ECG) measurement session.” — Google
  • irregular-rhythm-notification — Session record · operations: list · no webhook support in Google's table
    “Represents an Irregular Rhythm Notification alert, indicating a potential sign of atrial fibrillation (AFib).” — Google

Apple HealthKit · read 2026-10-02

  • irregularHeartRhythmEvent — category type · values from HKCategoryValue · iOS 12.2+ · read-only
    “A category sample type for irregular heart rhythm events.” — Apple
  • atrialFibrillationBurden — discrete values · percentage units · iOS 16.0+ · read-only
    “A quantity type that measures an estimate of the percentage of time a person’s heart shows signs of atrial fibrillation (AFib) while wearing Apple Watch.” — Apple

Android Health Connect · read 2026-10-03

Nothing listed.

Wear OS Health Services · read 2026-10-04

Nothing listed.

Bluetooth GATT · read 2026-10-17

Nothing listed.

Frequently asked questions

Can an app read raw ECG waveforms from the Google Health API?
Yes. The electrocardiogram data type carries waveformSamples, an array of lead I voltage values starting at the beginning of the reading, with samplingFrequencyHertz and a millivoltsScalingFactor that Google defines as millivolts = waveform_sample / millivolts_scaling_factor. Google's table lists only the list operation for it, under the .ecg.readonly scope, with no webhook support, so you read recordings rather than writing or subscribing to them.
Does Health Connect have an ECG or irregular rhythm record?
No. None of the 42 record classes on Google's Health Connect data-types page, read on 2026-10-03, is an ECG or rhythm record, and none of the 65 Wear OS Health Services data types is either. Google's compatible-device list for the Google Health API electrocardiogram type includes Pixel Watch models, so on the evidence this site holds, that cloud API is the documented route to those recordings.
What does HealthKit's atrial fibrillation burden measure?
Apple describes atrialFibrillationBurden as an estimate of the percentage of time a person's heart shows signs of atrial fibrillation while wearing Apple Watch. Its samples use percentage units and measure discrete values, it is available from iOS 16.0 and watchOS 9.0, and Apple states the samples are read-only. It is a summary percentage, distinct from the irregularHeartRhythmEvent category type that records individual events.
Why are all Google Health API alert windows marked positive?
Because Google says so in the AlertWindow schema: the current version of the algorithm only produces an alert if all windows are positive, so anything the API returns has the positive bit set to true, although windows can be negative internally. Google adds that a false value would mean AFib was not detected in that window, which does not guarantee its absence, and that inconclusive windows are never saved.
Which time zone is a Google Health API ECG reading in?
Possibly none. Google notes that historical ECG data lacks time zone offsets, so the start and end offsets will be missing or zero and the civil time fields default to UTC, and it recommends using the physical time fields instead. The interval's start and end times are equal and mark the moment of the reading, so group readings by physical time, converted with an offset you know.

All 132 questions in Health Data →

Keep reading

Elsewhere on the site

Pages that share this one’s concepts and sources, from other sections.

Next steps

Was this page useful?

Independent comparison, last reviewed October 18, 2026. Pricing, rate limits, and feature availability change often — confirm current details in each provider’s official documentation before you commit. Product and company names are trademarks of their respective owners; AIFitnessAPI is not affiliated with, endorsed by, or sponsored by any product listed here.

← All health data · by AIFitnessAPI