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

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

说明与用途

用户构建了一个自动化流程,每天通过 Shortcut 拉取 Apple Health 数据并发送到免费 Cloudflare Worker,存储在 SQLite 并通过 GET /days 暴露。

问题

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

结果

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.

工作流

  • 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

证据

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

来源

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

来源

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

来源

  • 记录日期: 2026-10-11T09:56:14.641Z