Skip to content

Garmin training analysis

Two Python programs fetch my Garmin data and save it locally as JSON: version 1 through an unofficial library (activities only), version 2 through Garmin's official Personal API (activities, sleep, heart rate, HRV, weight). Below: both analyses as charts, using randomly generated sample data.

Data sheet

Identification no.JS-2026-03
Period06/2026 (version 1) · 10/2026 (version 2)
RoleIdea and implementation with AI assistance
ToolsPython · python-garminconnect · Garmin Connect Personal API · requests · JSON · TypeScript · SVG
Key resultVersion 1: analysis of a training year (203 sessions, 633 running km, sample data) · version 2: health and training values via the official Garmin API, data stays local
StatusInteractive analysis · version 2 with the official API
Legal owner
redacted
Identification no.
JS-2026-03
Title
Garmin training analysis
Document type
Test report
Date of issue
30/10/2026
Created by
redacted
Rev. · Sheet
G · 4/8
Language
ENDE
ISO 5456-2

1Result

Zone B

Sample data: half a year of health and training values, randomly generated – not real data.

Period
Avg steps
8,431
Avg sleep
7.2 h
Avg resting HR
54 bpm
Weight
75.8 kg

Steps per day

dashed: daily goal

010,00020,00028/0715/0802/0920/0908/10
Table
DateSteps
25/10/202611,164
24/10/20267,153
23/10/20264,557
22/10/20268,976
21/10/20266,355
20/10/202610,180
19/10/20268,285
18/10/20268,438
17/10/20266,647
16/10/20264,627
15/10/20266,974
14/10/20266,294
13/10/20268,348
12/10/20267,350
11/10/20264,599
10/10/20269,526
09/10/20266,305
08/10/20267,522
07/10/20268,252
06/10/20266,183
05/10/202610,771
04/10/20267,019
03/10/20264,119
02/10/20265,408
01/10/20262,420
30/09/20266,773
29/09/20267,445
28/09/20267,219
27/09/20267,381
26/09/20267,240
25/09/20265,001
24/09/20269,516
23/09/202610,038
22/09/202610,623
21/09/20269,438
20/09/202610,445
19/09/20269,791
18/09/20264,227
17/09/202611,273
16/09/202611,683
15/09/20269,579
14/09/20269,550
13/09/202610,818
12/09/202612,709
11/09/20263,801
10/09/20269,840
09/09/20267,614
08/09/20268,010
07/09/20266,701
06/09/202611,439
05/09/20265,398
04/09/20268,196
03/09/20266,074
02/09/20269,735
01/09/202611,759
31/08/20265,993
30/08/20269,833
29/08/202610,218
28/08/20269,313
27/08/202612,899
26/08/20267,170
25/08/20267,939
24/08/20264,867
23/08/202610,925
22/08/20267,397
21/08/20269,870
20/08/20267,087
19/08/202615,082
18/08/20269,156
17/08/20267,928
16/08/202611,801
15/08/20267,765
14/08/20265,765
13/08/202610,855
12/08/20268,720
11/08/202610,952
10/08/202610,714
09/08/202611,567
08/08/20269,720
07/08/202611,208
06/08/202610,298
05/08/202610,509
04/08/20263,698
03/08/202612,165
02/08/20266,752
01/08/20268,852
31/07/20269,980
30/07/20269,088
29/07/20267,060
28/07/20268,852

Sleep stages (hours)

Deep Light REM Awake

051028/0715/0802/0920/0908/10
Table
DateDeepLightREMAwake
25/10/20261.24.01.80.5
24/10/20261.14.11.50.2
23/10/20261.03.61.20.3
22/10/20261.64.61.80.3
21/10/20261.04.31.40.3
20/10/20261.34.01.70.3
19/10/20261.24.51.50.5
18/10/20261.13.41.60.3
17/10/20261.14.61.50.5
16/10/20261.24.21.70.3
15/10/20261.54.41.50.4
14/10/20261.44.72.00.4
13/10/20261.24.01.80.5
12/10/20261.33.91.50.4
11/10/20261.24.31.50.3
10/10/20261.24.31.60.3
09/10/20261.14.51.60.3
08/10/20261.54.31.50.5
07/10/20261.33.81.40.3
06/10/20261.14.11.30.4
05/10/20261.14.31.60.3
04/10/20261.23.61.30.4
03/10/20261.43.51.70.5
02/10/20261.33.91.60.4
01/10/20261.04.21.60.4
30/09/20261.04.21.40.4
29/09/20261.33.71.60.3
28/09/20261.34.61.50.5
27/09/20261.34.31.30.3
26/09/20260.93.81.30.3
25/09/20261.13.21.20.4
24/09/20261.54.31.40.4
23/09/20261.33.71.50.2
22/09/20261.34.21.50.5
21/09/20261.13.11.10.2
20/09/20261.24.61.40.2
19/09/20261.13.51.50.3
18/09/20261.23.51.60.4
17/09/20261.34.11.50.2
16/09/20261.34.31.60.4
15/09/20261.54.71.50.2
14/09/20261.53.91.80.4
13/09/20261.54.12.00.4
12/09/20261.54.51.50.3
11/09/20261.33.71.70.4
10/09/20261.24.71.40.3
09/09/20261.34.11.60.5
08/09/20261.14.21.30.3
07/09/20261.03.51.20.4
06/09/20261.23.31.30.4
05/09/20260.93.21.50.4
04/09/20261.33.71.30.4
03/09/20261.54.41.80.5
02/09/20261.64.81.60.3
01/09/20260.93.81.20.2
31/08/20261.65.62.10.3
30/08/20261.24.61.70.3
29/08/20261.24.91.60.5
28/08/20261.24.51.40.5
27/08/20261.34.31.70.3
26/08/20261.04.31.30.5
25/08/20261.44.21.70.5
24/08/20261.44.31.80.3
23/08/20261.23.71.40.2
22/08/20261.33.71.50.3
21/08/20261.44.52.00.5
20/08/20261.13.71.50.2
19/08/20261.23.91.60.3
18/08/20261.34.01.40.4
17/08/20261.14.01.50.3
16/08/20261.24.61.70.4
15/08/20261.03.91.30.3
14/08/20261.04.51.40.4
13/08/20261.14.31.70.3
12/08/20261.24.41.80.5
11/08/20261.14.51.40.4
10/08/20261.33.61.70.4
09/08/20261.44.11.30.3
08/08/20261.54.31.50.4
07/08/20261.13.41.20.4
06/08/20261.33.61.60.4
05/08/20261.44.11.50.3
04/08/20261.43.91.50.5
03/08/20261.14.21.90.5
02/08/20261.34.61.50.4
01/08/20261.54.31.70.2
31/07/20261.24.11.50.3
30/07/20261.14.21.40.5
29/07/20261.44.21.80.5
28/07/20261.34.01.30.4

Resting heart rate (bpm)

505528/0715/0802/0920/0908/10
Table
DateResting HR
25/10/202651
24/10/202654
23/10/202654
22/10/202653
21/10/202651
20/10/202655
19/10/202650
18/10/202654
17/10/202654
16/10/202653
15/10/202652
14/10/202651
13/10/202653
12/10/202653
11/10/202653
10/10/202654
09/10/202651
08/10/202654
07/10/202655
06/10/202653
05/10/202655
04/10/202653
03/10/202653
02/10/202653
01/10/202656
30/09/202654
29/09/202654
28/09/202654
27/09/202655
26/09/202652
25/09/202652
24/09/202658
23/09/202652
22/09/202653
21/09/202654
20/09/202655
19/09/202655
18/09/202654
17/09/202656
16/09/202653
15/09/202652
14/09/202655
13/09/202653
12/09/202653
11/09/202654
10/09/202653
09/09/202653
08/09/202655
07/09/202652
06/09/202654
05/09/202652
04/09/202652
03/09/202655
02/09/202647
01/09/202655
31/08/202652
30/08/202653
29/08/202653
28/08/202653
27/08/202655
26/08/202653
25/08/202656
24/08/202652
23/08/202656
22/08/202654
21/08/202652
20/08/202656
19/08/202654
18/08/202656
17/08/202650
16/08/202651
15/08/202658
14/08/202653
13/08/202654
12/08/202652
11/08/202653
10/08/202655
09/08/202654
08/08/202654
07/08/202657
06/08/202654
05/08/202656
04/08/202656
03/08/202653
02/08/202653
01/08/202655
31/07/202652
30/07/202654
29/07/202653
28/07/202653

Overnight HRV (ms)

Last night 7-day average

40608028/0715/0802/0920/0908/10
Table
DateLast night7-day average
25/10/20265957
24/10/20264954
23/10/20265154
22/10/20266258
21/10/20266057
20/10/20266659
19/10/20266559
18/10/20265656
17/10/20265255
16/10/20265154
15/10/20265957
14/10/20265154
13/10/20265054
12/10/20265154
11/10/20264151
10/10/20267060
09/10/20266458
08/10/20266358
07/10/20267160
06/10/20265656
05/10/20266458
04/10/20265455
03/10/20267562
02/10/20265355
01/10/20265857
30/09/20266659
29/09/20266258
28/09/20264854
27/09/20264452
26/09/20266759
25/09/20266458
24/09/20266158
23/09/20266258
22/09/20266057
21/09/20264252
20/09/20265455
19/09/20265957
18/09/20266559
17/09/20265756
16/09/20265255
15/09/20266158
14/09/20266057
13/09/20266158
12/09/20266960
11/09/20266559
10/09/20266358
09/09/20266759
08/09/20265556
07/09/20266358
06/09/20265556
05/09/20265756
04/09/20265054
03/09/20266458
02/09/20265857
01/09/20266559
31/08/20265957
30/08/20266860
29/08/20266458
28/08/20265656
27/08/20267461
26/08/20266158
25/08/20265857
24/08/20265756
23/08/20265455
22/08/20267160
21/08/20265355
20/08/20265656
19/08/20265455
18/08/20265355
17/08/20266458
16/08/20266158
15/08/20264051
14/08/20266759
13/08/20266860
12/08/20265355
11/08/20264954
10/08/20264753
09/08/20266057
08/08/20265054
07/08/20266759
06/08/20265857
05/08/20265756
04/08/20264553
03/08/20264954
02/08/20265857
01/08/20265255
31/07/20265054
30/07/20266258
29/07/20266458
28/07/20265154

Weight (kg)

767728/0715/0802/0920/0908/10
Table
DateWeight
23/10/202675.8
20/10/202676.0
17/10/202676.1
14/10/202676.3
11/10/202676.4
08/10/202676.3
05/10/202676.3
02/10/202676.2
29/09/202676.3
26/09/202676.2
23/09/202676.4
20/09/202676.5
17/09/202676.6
14/09/202676.6
11/09/202676.9
08/09/202677.0
05/09/202677.2
02/09/202677.4
30/08/202677.5
27/08/202677.5
24/08/202677.4
21/08/202677.5
18/08/202677.6
15/08/202677.7
12/08/202677.6
09/08/202677.6
06/08/202677.6
03/08/202677.4
31/07/202677.6
28/07/202677.6

Body Battery, daily peak

05010028/0715/0802/0920/0908/10
Table
DateBody Battery
25/10/202698
24/10/202686
23/10/202677
22/10/202686
21/10/202688
20/10/202697
19/10/202677
18/10/202693
17/10/202691
16/10/202692
15/10/202689
14/10/202692
13/10/202684
12/10/202688
11/10/202685
10/10/202671
09/10/202675
08/10/202676
07/10/202676
06/10/202683
05/10/202690
04/10/202681
03/10/202677
02/10/202687
01/10/202688
30/09/202676
29/09/202686
28/09/202699
27/09/202680
26/09/202689
25/09/202677
24/09/202676
23/09/202687
22/09/202677
21/09/202670
20/09/202671
19/09/202674
18/09/202675
17/09/202682
16/09/202690
15/09/202694
14/09/202673
13/09/202699
12/09/202691
11/09/202686
10/09/202685
09/09/202677
08/09/202684
07/09/202676
06/09/202690
05/09/202688
04/09/202690
03/09/202692
02/09/202690
01/09/202680
31/08/202683
30/08/202681
29/08/202676
28/08/202690
27/08/202670
26/08/202674
25/08/202690
24/08/202689
23/08/202668
22/08/202688
21/08/202677
20/08/202677
19/08/202678
18/08/202682
17/08/202674
16/08/202690
15/08/202691
14/08/202679
13/08/202669
12/08/202672
11/08/202687
10/08/202673
09/08/202683
08/08/202696
07/08/202680
06/08/202684
05/08/202696
04/08/202684
03/08/202674
02/08/202699
01/08/202681
31/07/202673
30/07/202670
29/07/202692
28/07/202698

Training per week (hours)

024627/0717/0807/0928/0919/10
Table
DateHours
19/10/20264.9
12/10/20265.9
05/10/20263.8
28/09/20262.8
21/09/20263.6
14/09/20262.7
07/09/20262.2
31/08/20261.9
24/08/20264.5
17/08/20265.9
10/08/20262.6
03/08/20265.4
27/07/20261.7

Time in heart-rate zones (hours per week)

Zone 1 Zone 2 Zone 3 Zone 4 Zone 5

024627/0717/0807/0928/0919/10
Table
DateZone 1Zone 2Zone 3Zone 4Zone 5
19/10/20261.30.90.61.60.5
12/10/20261.10.71.11.61.4
05/10/20260.30.81.01.60.2
28/09/20260.60.20.60.90.5
21/09/20261.00.30.80.61.0
14/09/20260.20.60.70.50.7
07/09/20260.40.60.40.30.6
31/08/20260.40.30.40.40.4
24/08/20261.10.90.51.20.8
17/08/20262.11.01.40.41.0
10/08/20260.60.60.40.70.2
03/08/20260.52.11.51.00.5
27/07/20260.30.00.60.30.4

2Problem and motivation

Zone C

The Garmin app shows single values, but no overview across weeks and months that can be analysed in a targeted way. Version 1 relies on an unofficial interface that Garmin can change or block at any time. Version 2 replaces it with the official Personal API, which is meant for read access to your own data.

3Set-up

Zone D
  1. 01Access: sign-in (v1) or Personal API key (v2)
  2. 02Fetch: activities, in v2 also daily values
  3. 03Storage: local JSON files
  4. 04Preparation: one file for the analysis
  5. 05Analysis in the browser: weeks, pace, heart rate, sleep

Version 1 uses the Python library python-garminconnect (github.com/cyberjunky/python-garminconnect), an unofficial interface to Garmin Connect. The script asks for e-mail and password and signs in like the Garmin app; with the access token it fetches the activity list in blocks of 20 and six data sets per activity (summary, detailed time series, splits, weather, gear, heart-rate zones), with a one-second pause per request. Each activity is saved as its own JSON file in the folder of its sport. Version 2 needs no password: in Garmin Connect you create a Personal API key with a chosen expiry (30, 90, 180 days or one year), exchange it for an access token that is valid for 24 hours, and use it to call read-only endpoints only. The program requests daily summaries, sleep, HRV, weight and activities in the date spans the Swagger specifies, saves the raw responses per endpoint and writes a unified dashboard.json from them; an endpoint that fails does not abort the run. In both versions the fetch stays a local program on my own computer: credentials should not pass through someone else's server, so this page has no Garmin sign-in. According to Garmin, the Personal API is meant for your own data only, not for applications that serve other users.

4Verification

Zone E

Version 2 was built against Garmin's published API description (Swagger); paths, parameters, units and response shapes come from there. The conversion of the responses into dashboard.json was tested with invented data, and the charts above run on the same kind of sample data – no real health values appear anywhere on this page. Your own data can be opened locally above; it is read in the browser only.

What went wrong

The plan was for visitors to enter their own API key right here on the page and load their data in the browser. A check of Garmin's servers (29 Oct 2026) showed that they answer the request with which a browser asks for permission for other sites (CORS preflight) with 403 and no approval – for every origin tested, including Garmin's own sites. Direct calls from the browser are therefore not possible. Instead of sending the key through an intermediary server of my own, the fetch stays local and this page only reads the finished JSON file. The first run with real data also crashed in the preparation step because an entry without a date arrived; it now skips such entries and reports which endpoint they came from.

5Insight and next iteration

Zone F
  • An official interface is not automatically the easier one: it is more stable and permitted, but more narrowly drawn – own data only, read-only, with an expiry date on the key.
  • Read units and shapes from the specification instead of guessing: my assumption that weight arrives in grams was wrong; per the Swagger it is kilograms.
  • Real responses deviate from the description. Preparation that reports missing fields instead of crashing saves the search afterwards.

Possible next iteration

Test with longer periods how far back the Personal API's history reaches (Garmin states nothing on this) and watch for rate limits, which are also not documented anywhere.