For me, I want an open API I can pull my data from. Last I checked, you have to be a business to use Garmin's API.
Apple certainly doesn't let you.
My goal is to have a cron that runs on my homelab that pulls my health data into a DB I own, from various sources, and visualize it in Grafana.
Apple certainly doesn't let you.
There are several apps[0] off the top of my head that pull data from Apple's HealthKit. Apple even has a framework for it: HealthKit. That said, I've never written to that API myself, but it observational evidence indicates that you can pull data from Apple just fine. The app I use to pull data off Apple and ship to Strava says as much.
[0] RunGap and HealthFit
Depending on what data you want, you can try Withings watches. I'm currently reversing the protocol and it mostly works.
you can use https://github.com/cyberjunky/python-garminconnect to pull your data from garmin, I've been using it daily with no issues
Polar has an API where you can get more or less anything out. That bit is fine - sadly you can't put things in (like virtual cycling, or any activities not recorded on the Polar).