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

Bulk download or API download of splits csv for each activity

I would like to do a bulk download of my Splits data for climbing activities, ideally using an API but I'd be happy to just select all the activities in Connect and then download them. It seems Garmin wants to make this process as difficult as possible for its users. I could go through the Strava API for the .fit data but this does not contain information on the splits. I am interested only in the splits csv and it doesn't seem to get passed to Strava. Any suggestions on how to get the splits csv in an automated practical way without having to download every file individually? 

  • Not sure what phone you have, but assume it is not a Windows Phone, as the Windows Mobile 10 OS was discontinued by Microsoft in 2017.  Meanwhile, moving this thread to the Garmin Connect Web subforum for better visibility.

  • You want to use Export Splits to CSV?

    Then just use a script to download all activities: Is there a way to export bulk data to TCX or GPX files? / 967646

    and modify the link for csv: /download-service/export/csv/activity/

  • Thanks for your input. This works well for the tcx files but it does not work for csv files - csv files are downloaded using that script but they are not the same as the ones available manually through the 'Export Splits to CSV' option. They only contain a limited set of summary fields. Is it possible to specify in the url for CSV Splits rather than CSV summary? 

  • Looks you're right that those are somehow different, but it seems that main difference is a change in formatting and order of values, for some activities csv from created link looks even longer then from the button.

    Maybe it would be easier to download JSON - a script like here: Export CSV from Garmin Connect miss avg temperature and fail to export max temperature / 1298022

    add at the end of the second link: + '/splits'

    and remove/change: a.activityName, a.summaryDTO.startTimeLocal as those values are unavailable there.

    Something like this:

    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(a.activityId)
                        f = document.createElement('a')
                        f.download = a.activityId + '-splits.json'
                        f.href = window.URL.createObjectURL(new Blob([JSON.stringify(a)]))
                        f.click()
                    })
            })
        }
    )