Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Yes—you can move selected Apple Health records to JSON, a file, or your own web API without writing an iPhone app. The practical route is a Shortcut that uses Find Health Samples, filters the records you need, reshapes each sample into consistent fields, and then saves or posts the result. Apple’s built-in Health export is different: it produces a complete XML snapshot of your available data, not a selective JSON endpoint. HealthKit is a real Apple API, but access is restricted to apps with the required entitlements and user permissions. A Shortcut runs inside those same permissions on your device, making it useful for personal exports and scheduled snapshots rather than a permanently running server.

Does Apple Health have a public API for my data?

Not in the sense most people mean by “public API.” HealthKit is Apple’s framework for accessing Health data, but it is entitlement-controlled and intended for apps running on Apple platforms. An arbitrary website or cloud service cannot simply call a URL and read your Health database.

Apple separates read and write permission for each Health data type. An app may be allowed to read steps but not write them, or read workouts while being denied heart-rate data. The user grants those permissions on the device, and the app must also satisfy Apple’s HealthKit rules about how the information is used. Apple describes HealthKit as a central repository on its platforms, not as an unrestricted web service.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Apple’s own export option is deliberately broad. Apple Support says: “You can export all of your health and fitness data from Health in XML format.” That export is useful as a backup or for full-data conversion, but it does not let you request only sleep records for last week or send just today’s steps as JSON.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

What can a Shortcut do that the native export cannot?

A Shortcut can make a repeatable, selective pipeline. Its Find Health Samples action retrieves Health records and applies filters before the results move to later actions. You choose the data type, time window, source, and result limit, then decide whether the output becomes a file, a share-sheet item, or an HTTP request.

Shortcuts passes the output of one action into the next. That content flow lets you loop over samples, extract the fields relevant to your application, build a list or dictionary, and hand that structure to a file action or web request. The exact fields depend on the sample type: a quantity sample such as steps has a numeric value and unit, while sleep categories and workouts carry different properties.

What should I decide before building the export?

Write down a small data contract first. It prevents an accidentally unbounded query and gives your receiving system a predictable format.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the Health type

Pick one type for the first version—steps, sleep analysis, heart rate, or workouts are common examples. Mixing types is possible, but each type has different values and metadata, so separate pipelines are easier to validate.

Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Set the time range and limit

Use a fixed window such as “since yesterday” for an incremental export, or a specific start and end date for a backfill. Add a result limit when the action offers one. A limit protects the phone and endpoint from an unexpectedly large response.

Define fields and units

A practical record usually contains an identifier or type, start date, end date, value, unit, source, and any metadata your application actually needs. Decide whether your API expects the unit Apple reports or a converted unit. Do not silently mix miles and kilometres, or beats per minute and a dimensionless count.

Pick a destination

You can save a local file, share the result to another app, or post it to an endpoint you control. Decide whether the receiver expects one JSON array, one record per request, CSV, or Apple’s original XML. A Shortcut can produce different formats, but Apple’s built-in export remains XML.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Decision Example Why it matters
Health type Step count Determines which fields and units are available
Date window Previous 24 hours Keeps recurring requests bounded
Fields Start, end, value, unit, source Creates a stable schema for your receiver
Destination File or HTTPS endpoint Determines the final Shortcut actions and security controls

How do I build the Apple Health export Shortcut?

The following sequence works as a general pattern. Labels can vary slightly by iOS release, but the core actions are the same.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
  1. Create a new Shortcut. Open Shortcuts, tap the plus button, and give the shortcut a name that identifies the data and interval, such as “Yesterday’s Steps.” Keeping separate shortcuts for unrelated Health types makes permission prompts and failures easier to diagnose.
  2. Add Find Health Samples. In the action search, choose Find Health Samples. Select the Health type, then add filters for date. Where available, add source or other sample filters and set a limit. Apple’s Shortcuts guide lists Find Health Samples among the Find actions that retrieve and filter Health records.
  3. Request access and inspect the result. Run the shortcut once. Approve read access for the selected data type when iOS asks. Add a temporary Quick Look or Show Result action so you can see whether records were returned before you build the rest of the pipeline. An empty result usually means the permission, type, date range, or source filter is wrong.
  4. Loop through the samples. Add a Repeat with Each Item action after the Find action. Inside the loop, use the available sample properties to obtain the start timestamp, end timestamp, value or category, unit, source, and required metadata. Quantity, category, and workout samples do not expose identical properties, so keep only fields that exist for your chosen type.
  5. Build one consistent record. Inside the loop, add a Dictionary action with the same keys for every item—for example, type, start, end, value, unit, and source. Add each dictionary to a list variable. If a field is unavailable for a sample type, omit it or use a documented null convention rather than shifting keys between records.
  6. Serialize the list. Pass the list or dictionary to the next action as structured content when the destination accepts it. If you need text, create a Text action that emits your chosen JSON-shaped representation and test it with a JSON parser on the receiving side. Escaping quotation marks and newline characters matters; a visually plausible string is not necessarily valid JSON. The format is your Shortcut design choice, not Apple’s native Health export format.
  7. Save or send the output. For a local snapshot, use Save File and choose a folder, or use the Share Sheet to transfer it. For an API, add Get Contents of URL, enter your HTTPS endpoint, choose the appropriate method (usually POST), and provide the JSON body or text produced by the previous action. Keep the endpoint under your control and use authentication that is not embedded as a reusable secret in a shared shortcut.
  8. Add a visible success or error result. After the save or request, show the HTTP response or a short confirmation containing the record count and time window. This makes a scheduled run auditable and distinguishes “no samples found” from “the server rejected the request.”

How do I handle permissions and large exports?

Health access is granular. When the Shortcut requests data, iOS may show a permission prompt for the specific type. Review access in the Health app’s data-access settings and in the relevant Shortcuts permission prompts. If you deny access, select the wrong type, or query a period with no records, the Shortcut can complete successfully while returning nothing useful.

For a broad query, Shortcuts may also require the Allow Sharing Large Amounts of Data setting. Apple documents this control under Settings > Shortcuts > Advanced. Turn it on only when you understand the destination and still keep date and result filters sensible. The setting removes one sharing restriction; it does not make an unbounded export safe or fast.

How should I send Health data to my own API?

Use an HTTPS endpoint that you operate or explicitly trust, and define the request contract before adding the web action. A typical request contains an array of normalized records plus a small envelope identifying the Health type, interval, and export time.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep credentials out of shared Shortcuts

A Shortcut can expose its URL, headers, and transformation logic to anyone who receives a copy. Do not paste a long-lived production API key into a shortcut you might share. Prefer a narrowly scoped token, an endpoint that accepts a short-lived credential, or a relay service designed for this purpose. Treat the payload as sensitive health information even when the data appears ordinary.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Make retries safe

Scheduled automations can run again after a network timeout, so include a client-generated export identifier or deterministic time window. Your server can then ignore a duplicate instead of creating two identical records. Return a clear status and have the Shortcut display it.

Validate on the server

Check timestamps, units, required keys, and plausible value types before storing anything. Reject malformed JSON with a useful error. Do not assume every sample has a numeric value: sleep categories and workout records may require a category or a set of nested fields.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Can I automate the export?

Yes. Run the Shortcut manually, from a Shortcuts automation, or through a Home Screen or Action Button trigger where your iPhone model and iOS version support it. A daily or hourly run should use an incremental date window and a sensible limit rather than repeatedly querying the entire history.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This is still an on-device automation, not a hosted API. The phone must be available to run it, permissions must remain valid, and the network and destination must respond. If the device is offline, the request may fail or be delayed; design your receiver and local save step accordingly.

Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Which export method should I use?

Choose the native export for a complete backup, a Shortcut for selective or repeatable transfers, and a HealthKit app when you are building production software that needs deeper integration.

Path Best for Output and control Main trade-off
Health app: Export All Health Data One-off complete backup XML snapshot of all available Health and fitness data Large and not selective
Shortcuts + Find Health Samples Personal, selective, repeatable automation User-defined fields, filters, and destination You must design, test, and maintain the Shortcut
Native HealthKit app Production software and deeper integration Structured queries and app-managed data flow Requires Apple development, entitlements, and user permissions

What commonly goes wrong, and how do I fix it?

The Shortcut returns zero samples

  • Confirm that the selected Health type matches the records you can see in the Health app.
  • Temporarily remove the source and date filters, then narrow the query one filter at a time.
  • Check that read permission for that exact type was granted; write permission does not imply read permission.
  • Verify the date interpretation and timezone when a boundary falls near midnight.

The request is too large or times out

  • Reduce the date range and add a result limit.
  • Use incremental exports instead of sending the full history on every run.
  • Enable Allow Sharing Large Amounts of Data only when necessary, and still keep the query bounded.
  • Save a local copy before posting so a network failure does not destroy the snapshot.

The receiver rejects the body

  • Inspect the raw body and confirm it is valid JSON rather than a description of a Shortcut object.
  • Check that the request method, content type, and authentication headers match the server contract.
  • Validate one record first, then increase the date range or batch size.

A shared Shortcut leaks sensitive information

Remove API keys, personal endpoint paths, and unnecessary metadata before sharing. Health exports and the native XML archive contain sensitive personal information; store them with the same care you would give medical records.

Is a Shortcut suitable for a continuous sync?

It is suitable for user-controlled snapshots and periodic incremental exports, but it is not a continuously running service. Shortcuts depends on the iPhone, its permissions, the automation trigger, and the network. If you need guaranteed ingestion, background processing, multi-user access, or audit controls, a properly entitled HealthKit app and a backend are a more appropriate architecture.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Can I export only sleep data instead of my entire Apple Health history?

Yes. In Find Health Samples, select the sleep-related Health type and constrain the date range before the records enter the rest of the Shortcut. Sleep records are category-style samples, so design the output around their category and interval fields rather than assuming a numeric value.

Does a Shortcut need cellular service to read Health data?

Reading records already stored on the iPhone can work without a network connection. A web request obviously needs connectivity, so include a local Save File step if you need a copy when the phone is offline.

Can another person run my Shortcut against their own Health data?

They can install a shortcut and grant their own permissions, but the shortcut’s filters, destination, and transformation logic come with it. Remove personal endpoints and credentials first, and explain exactly which Health permissions the shortcut requests.

What is the safest way to archive Apple Health data?

Use the Health app’s full XML export for a complete archive, then protect the resulting file as sensitive health information. Use a filtered Shortcut export only when you intentionally need a smaller, structured dataset for a specific workflow.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.