This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do I exporting all activity data that include lap times for all running activities?

I am attempting to get access to the raw data that has been logged on my Garmin watch. The data that I want is my lap times for all of my historic running activities (as per the below image).

I am able to download one at a time from each activity page. However, this will be long and tedious for all. Is there a way that these can be bulk exported?

I request a data export from Garmin which they sent but this data was not included. They summarise the activity and do not provide the lap times. Any help would be much appreciated.

  • The official way is to request your data from Garmin - Garmin Connect Full Data ExportI did this for my account which contains thousands of activities dating back to 2004. You'll eventually receive an email from Garmin with a link to download your entire Garmin profile which will include everything. All your activities exactly in the type they were uploaded (FIT, GPX, or TCX). Depending on the quantity of activities, it could take several weeks to receive the data export link from Garmin.

  • Raw laps. F12 -> console. Set limit as needed.

    jQuery.getJSON(
        'https://connect.garmin.com/modern/proxy/activitylist-service/activities/search/activities?limit=2',
        (act_list) => {
            act_list.forEach((act) => {
                jQuery.getJSON(
                    'https://connect.garmin.com/modern/proxy/activity-service/activity/' + act.activityId + '/splits',
                    (a) => {
                        console.dir(act.activityId, act.activityName, act.startTimeLocal)
                        f = document.createElement('a')
                        f.download = a.activityId + '-laps.json'
                        f.href = window.URL.createObjectURL(new Blob([JSON.stringify(a)]))
                        f.click()
                    })
            })
        }
    )

  • I requested and got the file in a few days. However, it only had the aggregated data unfortunately. 

  • I received all of it, exactly as it was synced. Just saves time if you're trying to download individually and don't want to use the developer tools. The data you want is buried in zip files - \DI-Connect-Fitness-Uploaded-Files\UploadedFiles_0-_Part1.zip, Part2, Part3, etc.

  • Thank you - I found the folder. All files are in a .fit format - can these be converted to JSON?

  • Thank you, this is very helpful and it worked. One problem, I change the limit to 117 which is the number of files that I want, however, only 14-20 files download - it seems like there is maybe a limit.

    Any ideas how I could get it to download all 117?

    Can i run outside of the console in something like Pycharm?

  • I tried with 30 and it downloaded all, be sure to select auto download for this filetype, so a web-browser won't show pop-up. If there will be still a problem, then maybe add some wait time between downloads - or download partially - there is also the &start= argument for the first link.

    It requires to be logged-in, so a web-browser's console is the easiest way as you don't need to support login. But there are threads with Python scripts (for example to download activities), so you would need to check them and add '/splits' to link they use.

  • Thanks for this. Is there a way to loop through a custom list rather than navigate to ''connect.garmin.com/.../activities to get the list of activity ids?

    I have downloaded most activities but a few are missing. It would be helpful if I could specify these and then iterate through the list to get the json file.

  • If only few activities are needed, then just use the middle part, without loop, to download one activity with given ID.

    Or open Network tab, enter search keyword 'splits', open each needed activity and download those files manually.

    For static loop, you would need to collect IDs, so you would open those activities anyway, so probably it wouldn't be better then Network tab. But sure, you can replace downloaded list by [1,2,3,4,5].forEach((id) => { console.dir(id) }) or something.

  • Thank you very much - i got it working as per the below. Thank you again Slight smile

    7747935062,7461183607,5494704923,5123403026].forEach((act) => {
    jQuery.getJSON(
    'connect.garmin.com/.../' + act + '/splits',
    (a) => {
    console.dir(act.activityId, act.activityName, act.startTimeLocal)
    f = document.createElement('a')
    f.download = a.activityId + '-laps.json'
    f.href = window.URL.createObjectURL(new Blob([JSON.stringify(a)]))
    f.click()
    })
    })