# HealthAPI > HealthAPI syncs a person's Apple Health data from their iPhone to their own private account, then lets the AI apps and tools they choose read it: Claude and ChatGPT through an MCP connector, and anything that can call a REST API with their API key. Read only. The data is the person's own; nothing is shared unless they connect a tool. Use it to answer questions about someone's sleep, steps, heart rate, HRV, workouts, energy, weight, blood oxygen and about 50 other Apple Health metrics, by day, week or trend. ## Connect an AI app (MCP) HealthAPI is a remote MCP server: https://healthapi.app/mcp (Streamable HTTP). - Sign-in: OAuth 2.1 with PKCE. Discovery at https://healthapi.app/.well-known/oauth-protected-resource/mcp and https://healthapi.app/.well-known/oauth-authorization-server. Clients identify with a Client ID Metadata Document or register dynamically (RFC 7591). There is no password: the person approves the connection in the HealthAPI iPhone app (a 6-character code or a QR code on the sign-in page). - Claude (every plan, including Free, which allows one custom connector; web, desktop and mobile): Customize > Connectors > + Add > Add custom connector, name HealthAPI, address https://healthapi.app/mcp, Continue twice, keep Sign in now, Add, then Connect. - ChatGPT (Plus, Pro, Business, Enterprise or Edu, on chatgpt.com in a browser; not Free or Go): https://chatgpt.com/plugins > + > add a custom MCP server with Server URL https://healthapi.app/mcp and Authentication OAuth (other OAuth fields empty), select I understand and want to continue, then Create as a plugin. Install it from your plugins, then type @ in a chat and pick HealthAPI. If the + menu has no custom MCP server option, turn on Developer mode in Settings > Security and login first. - Claude Code: `claude mcp add --transport http healthapi https://healthapi.app/mcp`, then `/mcp` to sign in. - Cursor (~/.cursor/mcp.json) and VS Code (.vscode/mcp.json): an HTTP server with url https://healthapi.app/mcp. - Tools (all read only): get_health_overview (start here: what is synced, date ranges, timezone, requests left), get_daily_summary, get_weekly_summary, get_sleep, get_trend, get_latest, get_workouts, get_samples. - Each tool call counts as one request toward the account's daily limit (see Limits). The person sees each connection in the app under Settings > Connected apps and can disconnect it there; regenerating the API key disconnects every connection. - Guides: https://healthapi.app/connect (both assistants), https://healthapi.app/connect/claude (Claude, step by step), https://healthapi.app/connect/chatgpt (ChatGPT, step by step), https://healthapi.app/apple-health-mcp (the MCP server: clients, tools, sign-in and discovery, limits) - Clients that can't run OAuth may send the person's API key instead: `Authorization: Bearer ` on requests to https://healthapi.app/mcp. ## REST API - Base URL: https://healthapi.app/api/v1 - Auth: `Authorization: Bearer `. The person copies their key from the HealthAPI iPhone app (Connect > Other tools, or Settings > Sync Settings). - OpenAPI 3.1 spec: https://healthapi.app/openapi.json (import it into custom GPT Actions, n8n, Zapier, Make or any OpenAPI client) - Reference with examples: https://healthapi.app/docs - Overview (what Apple offers, how HealthAPI works, first request): https://healthapi.app/apple-health-api - Every metric's API name, unit and daily summary (50 metrics plus workouts): https://healthapi.app/metrics - Start with GET /usage (plan and requests left today), then: - GET /health/daily-summary?date=YYYY-MM-DD: one day's totals, averages, sleep and workouts - GET /health/weekly-summary?week=YYYY-Www: a Monday-to-Sunday week - GET /query/trends?type=&days=<1-365>: one metric day by day - GET /health/samples?type=&start_date=...&end_date=...: individual rows, each with a kind (reading, total, daily_average); only add up kind=total rows - GET /health/workouts and GET /health/latest - GET /gdpr/export: everything in the account as one JSON file (never CSV); doesn't count toward the daily limit. Guide: https://healthapi.app/export-apple-health-data - Dates are in the person's timezone unless you pass tz (IANA, e.g. America/New_York). ## Limits - Health reads (/health/*, /query/*) and MCP tool calls count toward a daily limit that resets at 00:00 UTC; /usage and syncing don't: Pro 100 a day, Developer 1,000 a day, and a short free preview for new accounts. - 401: missing or invalid key. 402: the account's subscription is paused (data is safe; the person resubscribes in the app). 429: today's limit is used up (the body says when it resets). ## About - iPhone app: https://apps.apple.com/app/id6770383795 - Privacy: https://healthapi.app/privacy (read only; data goes to an AI provider only when the person asks it something; connections can be disconnected in the app) - Terms: https://healthapi.app/terms - Contact: https://healthapi.app/contact - HealthAPI is not a medical device and does not give medical advice.