Angelos Orfanakos

Download your activities from Garmin Connect

I recently wanted to download all my activities from Garmin Connect as GPX files. There were over 200 of them, so doing it manually by visiting every activity was out of the question.

After fiddling around with JavaScript in my web browser’s console for a bit, I managed to make it work automatically.

Here’s how:

Step 1: Log in to Garmin Connect

Log in to Garmin Connect, if you haven’t already, and go to your activities page.

Step 2: Load all activities in the window

Scroll down repeatedly until all activities you want to download are visible (this may be a bit tedious if you have many).

Step 3: Configure your web browser

Open your web browser settings and configure it so that files are automatically downloaded to a directory of your choice, without having to confirm each download.

Step 4: Open your web browser’s console

While in your activities page, hit the F12 key to open your web browser’s console.

Step 5: Execute the code

Copy the following code, paste it in the console and hit the Enter key to execute it:

Array.from(
  document.querySelectorAll('a[href^="/modern/activity/"]')
).map(anchor => {
  return anchor.href.replace(
    '/modern/activity/',
    '/modern/proxy/download-service/export/gpx/activity/'  );
}).forEach((url, i) => setTimeout(() => window.open(url), i * 10000));

Things to note:

  • Line 2: Extract URLs from activity links in the page
  • Lines 4-7: Change URL path to point to the activity’s download page
  • Line 6: You can change gpx to tcx or kml. To download the original files, replace the whole URL with https://connect.garmin.com/modern/proxy/download-service/files/activity
  • Line 8: Download each file every 10000 ms (10 seconds) to allow enough time for each download to complete