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 night71
Sleep, last night6h 42m
Activities, 30 days37
Active time, 30 days41h 10m
Resting heart rate, latest51 bpm
HRV, last night67 ms
await garmin.getSleepDaily("2026-08-31", "2026-09-29")→ 30 nights (synthetic)

Sleep

Sleep score
Show table
Sleep score
DateSleep score
Aug 3172
Sep 171
Sep 283
Sep 381
Sep 486
Sep 586
Sep 683
Sep 781
Sep 877
Sep 978
Sep 1083
Sep 1166
Sep 1278
Sep 1371
Sep 1478
Sep 1565
Sep 1672
Sep 1763
Sep 1869
Sep 1983
Sep 2085
Sep 2172
Sep 2282
Sep 2378
Sep 2484
Sep 2578
Sep 2686
Sep 2775
Sep 2872
Sep 2971
Sleep duration
Show table
Sleep duration
DateSleep duration
Aug 316h 24m
Sep 16h 54m
Sep 27h 36m
Sep 37h 18m
Sep 47h 54m
Sep 57h 48m
Sep 67h 54m
Sep 77h 18m
Sep 87h 30m
Sep 97h 18m
Sep 107h 24m
Sep 116h 12m
Sep 127h 06m
Sep 136h 36m
Sep 146h 54m
Sep 156h 18m
Sep 166h 54m
Sep 176h 12m
Sep 186h 42m
Sep 197h 36m
Sep 207h 30m
Sep 216h 54m
Sep 227h 36m
Sep 237h 30m
Sep 248h 06m
Sep 257h 24m
Sep 267h 36m
Sep 277h 18m
Sep 286h 54m
Sep 296h 42m
await garmin.getActivitiesByDate("2026-08-31", "2026-09-29")→ 37 activities (synthetic)

Activities

  1. Lunch rideRoad biking · Sep 29, 12:3032.37 km1h 15m
  2. Upper bodyStrength training · Sep 28, 18:2752 min
  3. Easy runRunning · Sep 27, 07:146.96 km42 min
  4. Ridge hikeHiking · Sep 26, 10:4511.87 km2h 60m
  5. Evening walkWalking · Sep 25, 19:193.36 km38 min
  6. Long trail runTrail running · Sep 25, 08:3311.74 km1h 22m
  7. Pool swimLap swimming · Sep 24, 07:511.51 km38 min
  8. Evening walkWalking · Sep 23, 19:523.23 km38 min
  9. Lunch rideRoad biking · Sep 22, 12:2837.62 km1h 24m
  10. Upper bodyStrength training · Sep 21, 18:4947 min
  11. Recovery yogaYoga · Sep 20, 21:5727 min
  12. Easy runRunning · Sep 20, 07:547.03 km43 min
  13. Ridge hikeHiking · Sep 19, 10:1812.35 km3h 00m
  14. Long trail runTrail running · Sep 18, 08:2214.72 km1h 37m
  15. Pool swimLap swimming · Sep 17, 07:581.48 km35 min
  16. Evening walkWalking · Sep 16, 19:342.75 km32 min
  17. Evening walkWalking · Sep 15, 19:223.07 km36 min
  18. Lunch rideRoad biking · Sep 15, 12:0636.51 km1h 22m
  19. Upper bodyStrength training · Sep 14, 18:1350 min
  20. Easy runRunning · Sep 13, 07:598.00 km47 min

Showing the latest 20 of 37.

await garmin.getRhrDaily("2026-08-31", "2026-09-29")→ 30 days (synthetic)
await garmin.getHrvDataRange("2026-08-31", "2026-09-29")→ 30 nights (synthetic)

Heart

Resting heart rate
51
Show table
Resting heart rate
DateResting heart rate
Aug 3149 bpm
Sep 151 bpm
Sep 251 bpm
Sep 350 bpm
Sep 452 bpm
Sep 553 bpm
Sep 651 bpm
Sep 752 bpm
Sep 852 bpm
Sep 953 bpm
Sep 1053 bpm
Sep 1152 bpm
Sep 1252 bpm
Sep 1350 bpm
Sep 1451 bpm
Sep 1552 bpm
Sep 1649 bpm
Sep 1751 bpm
Sep 1850 bpm
Sep 1950 bpm
Sep 2050 bpm
Sep 2149 bpm
Sep 2250 bpm
Sep 2349 bpm
Sep 2448 bpm
Sep 2549 bpm
Sep 2649 bpm
Sep 2748 bpm
Sep 2848 bpm
Sep 2951 bpm
Overnight HRV
67
Show table
Overnight HRV
DateOvernight HRV
Aug 3163 ms
Sep 168 ms
Sep 264 ms
Sep 369 ms
Sep 467 ms
Sep 570 ms
Sep 668 ms
Sep 762 ms
Sep 860 ms
Sep 962 ms
Sep 1062 ms
Sep 1158 ms
Sep 1254 ms
Sep 1353 ms
Sep 1453 ms
Sep 1556 ms
Sep 1653 ms
Sep 1757 ms
Sep 1857 ms
Sep 1958 ms
Sep 2061 ms
Sep 2160 ms
Sep 2265 ms
Sep 2363 ms
Sep 2462 ms
Sep 2571 ms
Sep 2666 ms
Sep 2771 ms
Sep 2869 ms
Sep 2967 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