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-jsYou'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 Garminawait garmin.fullName()→ "Demo athlete" (synthetic)Showing Demo athlete
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
Show table
| Date | Sleep score |
|---|---|
| Sep 23 | 72 |
| Sep 24 | 71 |
| Sep 25 | 83 |
| Sep 26 | 81 |
| Sep 27 | 86 |
| Sep 28 | 86 |
| Sep 29 | 83 |
Show table
| Date | Sleep duration |
|---|---|
| Sep 23 | 6h 24m |
| Sep 24 | 6h 54m |
| Sep 25 | 7h 36m |
| Sep 26 | 7h 18m |
| Sep 27 | 7h 54m |
| Sep 28 | 7h 48m |
| Sep 29 | 7h 54m |
await garmin.getActivitiesByDate("2026-09-23", "2026-09-29")→ 9 activities (synthetic)Activities
- Lunch rideRoad biking · Sep 29, 12:0534.35 km1h 16m
- Upper bodyStrength training · Sep 28, 18:2343 min
- Easy runRunning · Sep 27, 07:116.14 km36 min
- Evening walkWalking · Sep 26, 19:142.96 km35 min
- Ridge hikeHiking · Sep 26, 10:3513.24 km3h 13m
- Evening walkWalking · Sep 25, 19:493.08 km36 min
- Long trail runTrail running · Sep 25, 08:0814.65 km1h 41m
- Pool swimLap swimming · Sep 24, 07:281.60 km40 min
- 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
Show table
| Date | Resting heart rate |
|---|---|
| Sep 23 | 49 bpm |
| Sep 24 | 51 bpm |
| Sep 25 | 51 bpm |
| Sep 26 | 50 bpm |
| Sep 27 | 52 bpm |
| Sep 28 | 53 bpm |
| Sep 29 | 51 bpm |
Show table
| Date | Overnight HRV |
|---|---|
| Sep 23 | 63 ms |
| Sep 24 | 68 ms |
| Sep 25 | 64 ms |
| Sep 26 | 69 ms |
| Sep 27 | 67 ms |
| Sep 28 | 70 ms |
| Sep 29 | 68 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 km | 3:48 | Track intervalsAug 19 |
|---|---|---|
| 1 mile | 6:12 | Track intervalsAug 19 |
| 5 km | 21:14 | ParkrunSep 17 |
| 10 km | 44:49 | Riverside 10KJun 25 |
| Half marathon | 1:39:02 | City halfApr 2 |
| Longest run | 28.41 km | Long 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
- Milestoneearned
- 5K Runearned
- 10K Runearned
- Half Marathonearned
- Marathonnot earned yet