garminconnect-js

A zero-dependency TypeScript client for Garmin Connect. This page is its live demo: each panel shows the library call that filled it, with the arguments it sent and what came back.

npm install garminconnect-js

You're looking at synthetic demo data. Sign in with your Garmin account to run these calls against your own data. Your password goes to Garmin only and is never stored; your session stays in your browser.

Sign in with Garmin
await garmin.fullName()→ "Demo athlete" (synthetic)
Sleep score, last night83
Sleep, last night7h 54m
Activities, 7 days9
Active time, 7 days9h 52m
Resting heart rate, latest51 bpm
HRV, last night68 ms
await garmin.getSleepDaily("2026-09-23", "2026-09-29")→ 7 nights (synthetic)

Sleep

Sleep score
Show table
Sleep score
DateSleep score
Sep 2372
Sep 2471
Sep 2583
Sep 2681
Sep 2786
Sep 2886
Sep 2983
Sleep duration
Show table
Sleep duration
DateSleep duration
Sep 236h 24m
Sep 246h 54m
Sep 257h 36m
Sep 267h 18m
Sep 277h 54m
Sep 287h 48m
Sep 297h 54m
await garmin.getActivitiesByDate("2026-09-23", "2026-09-29")→ 9 activities (synthetic)

Activities

  1. Lunch rideRoad biking · Sep 29, 12:0534.35 km1h 16m
  2. Upper bodyStrength training · Sep 28, 18:2343 min
  3. Easy runRunning · Sep 27, 07:116.14 km36 min
  4. Evening walkWalking · Sep 26, 19:142.96 km35 min
  5. Ridge hikeHiking · Sep 26, 10:3513.24 km3h 13m
  6. Evening walkWalking · Sep 25, 19:493.08 km36 min
  7. Long trail runTrail running · Sep 25, 08:0814.65 km1h 41m
  8. Pool swimLap swimming · Sep 24, 07:281.60 km40 min
  9. Evening walkWalking · Sep 23, 19:022.96 km33 min
await garmin.getRhrDaily("2026-09-23", "2026-09-29")→ 7 days (synthetic)
await garmin.getHrvDataRange("2026-09-23", "2026-09-29")→ 7 nights (synthetic)

Heart

Resting heart rate
51
Show table
Resting heart rate
DateResting heart rate
Sep 2349 bpm
Sep 2451 bpm
Sep 2551 bpm
Sep 2650 bpm
Sep 2752 bpm
Sep 2853 bpm
Sep 2951 bpm
Overnight HRV
68
Show table
Overnight HRV
DateOvernight HRV
Sep 2363 ms
Sep 2468 ms
Sep 2564 ms
Sep 2669 ms
Sep 2767 ms
Sep 2870 ms
Sep 2968 ms
await garmin.getPersonalRecord()→ 6 running records (synthetic)
await garmin.getEarnedBadges()→ 10 badges (synthetic)
await garmin.getBadgeDetail(9)→ 5 badges in its series (synthetic)

Personal records

1 km3:48Track intervalsAug 19
1 mile6:12Track intervalsAug 19
5 km21:14ParkrunSep 17
10 km44:49Riverside 10KJun 25
Half marathon1:39:02City halfApr 2
Longest run28.41 kmLong trail runSep 3

Latest badges

  • Parkrun RegularRecord five runs on a Saturday morning. · ParkrunSep 17
  • Weekend Warrior×4Record an activity on both days of a weekend.Sep 10
  • Trail BlazerRun 25 kilometers on trails in a single activity. · Long trail runSep 3
  • Early Bird×6Start an activity before 6 a.m. · Easy runAug 27
  • Century RideRide 100 kilometers in a single activity. · Lunch rideAug 2
  • Pool Party×2Swim 2 kilometers in a single activity. · Pool swimJul 17
  • Step Streak 30Meet your step goal 30 days in a row.Jun 20
  • Summit SeekerClimb 1,000 meters in a single activity. · Ridge hikeMay 12

Showing the latest 8 of 10.

The Half Marathon series

  1. Milestoneearned
  2. 5K Runearned
  3. 10K Runearned
  4. Half Marathonearned
  5. Marathonnot earned yet