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 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
Show table
| Date | Sleep score |
|---|---|
| Aug 31 | 72 |
| Sep 1 | 71 |
| Sep 2 | 83 |
| Sep 3 | 81 |
| Sep 4 | 86 |
| Sep 5 | 86 |
| Sep 6 | 83 |
| Sep 7 | 81 |
| Sep 8 | 77 |
| Sep 9 | 78 |
| Sep 10 | 83 |
| Sep 11 | 66 |
| Sep 12 | 78 |
| Sep 13 | 71 |
| Sep 14 | 78 |
| Sep 15 | 65 |
| Sep 16 | 72 |
| Sep 17 | 63 |
| Sep 18 | 69 |
| Sep 19 | 83 |
| Sep 20 | 85 |
| Sep 21 | 72 |
| Sep 22 | 82 |
| Sep 23 | 78 |
| Sep 24 | 84 |
| Sep 25 | 78 |
| Sep 26 | 86 |
| Sep 27 | 75 |
| Sep 28 | 72 |
| Sep 29 | 71 |
Show table
| Date | Sleep duration |
|---|---|
| Aug 31 | 6h 24m |
| Sep 1 | 6h 54m |
| Sep 2 | 7h 36m |
| Sep 3 | 7h 18m |
| Sep 4 | 7h 54m |
| Sep 5 | 7h 48m |
| Sep 6 | 7h 54m |
| Sep 7 | 7h 18m |
| Sep 8 | 7h 30m |
| Sep 9 | 7h 18m |
| Sep 10 | 7h 24m |
| Sep 11 | 6h 12m |
| Sep 12 | 7h 06m |
| Sep 13 | 6h 36m |
| Sep 14 | 6h 54m |
| Sep 15 | 6h 18m |
| Sep 16 | 6h 54m |
| Sep 17 | 6h 12m |
| Sep 18 | 6h 42m |
| Sep 19 | 7h 36m |
| Sep 20 | 7h 30m |
| Sep 21 | 6h 54m |
| Sep 22 | 7h 36m |
| Sep 23 | 7h 30m |
| Sep 24 | 8h 06m |
| Sep 25 | 7h 24m |
| Sep 26 | 7h 36m |
| Sep 27 | 7h 18m |
| Sep 28 | 6h 54m |
| Sep 29 | 6h 42m |
await garmin.getActivitiesByDate("2026-08-31", "2026-09-29")→ 37 activities (synthetic)Activities
- Lunch rideRoad biking · Sep 29, 12:3032.37 km1h 15m
- Upper bodyStrength training · Sep 28, 18:2752 min
- Easy runRunning · Sep 27, 07:146.96 km42 min
- Ridge hikeHiking · Sep 26, 10:4511.87 km2h 60m
- Evening walkWalking · Sep 25, 19:193.36 km38 min
- Long trail runTrail running · Sep 25, 08:3311.74 km1h 22m
- Pool swimLap swimming · Sep 24, 07:511.51 km38 min
- Evening walkWalking · Sep 23, 19:523.23 km38 min
- Lunch rideRoad biking · Sep 22, 12:2837.62 km1h 24m
- Upper bodyStrength training · Sep 21, 18:4947 min
- Recovery yogaYoga · Sep 20, 21:5727 min
- Easy runRunning · Sep 20, 07:547.03 km43 min
- Ridge hikeHiking · Sep 19, 10:1812.35 km3h 00m
- Long trail runTrail running · Sep 18, 08:2214.72 km1h 37m
- Pool swimLap swimming · Sep 17, 07:581.48 km35 min
- Evening walkWalking · Sep 16, 19:342.75 km32 min
- Evening walkWalking · Sep 15, 19:223.07 km36 min
- Lunch rideRoad biking · Sep 15, 12:0636.51 km1h 22m
- Upper bodyStrength training · Sep 14, 18:1350 min
- 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
Show table
| Date | Resting heart rate |
|---|---|
| Aug 31 | 49 bpm |
| Sep 1 | 51 bpm |
| Sep 2 | 51 bpm |
| Sep 3 | 50 bpm |
| Sep 4 | 52 bpm |
| Sep 5 | 53 bpm |
| Sep 6 | 51 bpm |
| Sep 7 | 52 bpm |
| Sep 8 | 52 bpm |
| Sep 9 | 53 bpm |
| Sep 10 | 53 bpm |
| Sep 11 | 52 bpm |
| Sep 12 | 52 bpm |
| Sep 13 | 50 bpm |
| Sep 14 | 51 bpm |
| Sep 15 | 52 bpm |
| Sep 16 | 49 bpm |
| Sep 17 | 51 bpm |
| Sep 18 | 50 bpm |
| Sep 19 | 50 bpm |
| Sep 20 | 50 bpm |
| Sep 21 | 49 bpm |
| Sep 22 | 50 bpm |
| Sep 23 | 49 bpm |
| Sep 24 | 48 bpm |
| Sep 25 | 49 bpm |
| Sep 26 | 49 bpm |
| Sep 27 | 48 bpm |
| Sep 28 | 48 bpm |
| Sep 29 | 51 bpm |
Show table
| Date | Overnight HRV |
|---|---|
| Aug 31 | 63 ms |
| Sep 1 | 68 ms |
| Sep 2 | 64 ms |
| Sep 3 | 69 ms |
| Sep 4 | 67 ms |
| Sep 5 | 70 ms |
| Sep 6 | 68 ms |
| Sep 7 | 62 ms |
| Sep 8 | 60 ms |
| Sep 9 | 62 ms |
| Sep 10 | 62 ms |
| Sep 11 | 58 ms |
| Sep 12 | 54 ms |
| Sep 13 | 53 ms |
| Sep 14 | 53 ms |
| Sep 15 | 56 ms |
| Sep 16 | 53 ms |
| Sep 17 | 57 ms |
| Sep 18 | 57 ms |
| Sep 19 | 58 ms |
| Sep 20 | 61 ms |
| Sep 21 | 60 ms |
| Sep 22 | 65 ms |
| Sep 23 | 63 ms |
| Sep 24 | 62 ms |
| Sep 25 | 71 ms |
| Sep 26 | 66 ms |
| Sep 27 | 71 ms |
| Sep 28 | 69 ms |
| Sep 29 | 67 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