Features Integrations AI & API Pricing Blog Docs
Overview WHOOP Oura Withings Apple Health Glucose Hevy REST API AI & Claude MCP Server

Glucose

VitalTrends can show and expose blood glucose data when a CGM or glucose app writes blood_glucose samples into Apple Health and the VitalTrends iOS companion app has permission to sync them.

Current source path: CGM or glucose app → Apple Health → VitalTrends iOS app → VitalTrends. Direct Dexcom, FreeStyle Libre, Levels, or Lingo connections are not required for the current glucose API.

What syncs


Dashboard

The web glucose dashboard appears at /glucose.


API

Use the REST API when you want glucose data in scripts, notebooks, automations, or AI tools.

MethodPathUse
GET/api/v1/glucoseGlucose analytics payload with stats, daily rows, time in range, AGP, and day explorer context
GET/api/v1/glucose/readingsPaginated raw CGM glucose readings
GET/api/v1/apple-health?type=blood_glucoseProcessed Apple Health glucose aggregate rows

Analytics endpoint

curl -s "https://vitaltrends.net/api/v1/glucose?days=30" \
  -H "Authorization: Bearer YOUR_API_KEY" | jq .
ParameterTypeDefaultDescription
rangestringnoneUse 24h for the trailing 24-hour raw window
daysinteger30Rolling window, 1-365 days
startdatenoneCustom range start, interpreted in the user's profile timezone
enddatenowCustom range end, interpreted in the user's profile timezone
selected_datedatelatest raw dateDay explorer date, YYYY-MM-DD

Raw readings endpoint

curl -s "https://vitaltrends.net/api/v1/glucose/readings?start=2026-05-01&end=2026-05-07&per_page=200" \
  -H "Authorization: Bearer YOUR_API_KEY" | jq .
ParameterTypeDefaultDescription
startdate or datetimenoneInclusive lower bound on reading time
enddate or datetimenoneInclusive upper bound on reading time
per_pageinteger50Records per page, max 200
pageinteger1Page number
includecsvnoneAdd metadata or hk_device

Raw readings exclude samples that were deleted from Apple Health or superseded by VitalTrends deduplication.


Field notes

FieldMeaning
valueGlucose value in the returned unit, usually mg/dL
sourceHealthKit source app or device label
sample_countNumber of raw readings represented by a daily aggregate row
value_min and value_maxLowest and highest reading inside a processed aggregate row
recorded_atUTC timestamp for an individual raw glucose reading

Troubleshooting

If the dashboard or API returns empty: true, confirm that your CGM app writes glucose to Apple Health and that VitalTrends has Apple Health permission for blood glucose. Open the iOS companion app and tap Sync now after changing permissions.