Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Apple won't give you an API for your Health data. A free Shortcut will (here's the whole pipeline)

Description and use

The user built an automated pipeline that daily pulls Apple Health data via a Shortcut and posts it to a free Cloudflare Worker, storing it in SQLite and exposing it via GET /days.

Problem

Apple Health data cannot be exported via a public API; existing export apps are paid or subscription-based.

Outcome

The pipeline delivers raw health metrics (steps, heart rate, sleep stages) to a private Cloudflare Worker, stores them in a SQLite database, and exposes daily totals via a GET /days endpoint, all for free.

Workflow

  • Create a Cloudflare project and D1 database
  • Configure wrangler.toml with database binding
  • Define SQL schema with a UNIQUE constraint to avoid duplicates
  • Implement Worker handler to authenticate requests and insert samples
  • Set up a Shortcuts automation to read HealthKit data and POST to the Worker
  • Schedule the Shortcut to run twice a day

Evidence

There's no web API. HealthKit only works inside an iOS app.

Source

I built it with what's already on the phone: one free Shortcut + one free Cloudflare Worker.

Source

That UNIQUE line is the most important line in the project.

Source

  • Record date: 2026-10-11T09:56:14.641Z