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

Exporting Data - Bulk Mile Splits

Hello all,

Is there a way to bulk export mile split data? You can do this for one activity at a time, but wondering if this can be done for all activities and in one file/download?

  • Check this thread with script to download splits: How do I exporting all activity data that include lap times for all running activities?.

    You can change it from download to printing of selected data.

  • Unfortunately, I do not know how to run a script.

  • In a web-browser's Dev Tools, which you can open by F12 key as mentioned or by finding them somewhere in menu. Then select Console, there you can run scripts. That example script is to download splits from two latest activities as JSON files.

    Good to check tutorials about web-browsers' Dev Tools.

  • Yeah, I can download individual activities using this method - but it does not bulk download data in one file. Is there a way to bulk download all splits data into one file?

  • To make one file from those, you would need to choose how it should look, what data to include.

    You can import multiple single files using some editor, like Excel, those have import creators where you choose how to format and join data.

     

    Or change script from download to print.

    Filters can be added to the first link - here are activityType=running to print only runs and limit=2 for 2 latest activities. You can add other filters, check names in the advanced search on the activities' page. Also start=10 is useful to list partially, it omit 10 newest.

    Then check how values are named in splits files to print them - for example: startTimeGMT, distance, duration, averageSpeed, maxSpeed.

    Next, copy results to Excel and sort rows (as printing order is random) and format as needed - raw distance is in meters and speed in m/s, can be converted to pace with right formula.

    jQuery.getJSON(
        'https://connect.garmin.com/modern/proxy/activitylist-service/activities/search/activities?activityType=running&limit=2',
        (act_list) => {
            act_list.forEach((act) => {
                jQuery.getJSON(
                    'https://connect.garmin.com/modern/proxy/activity-service/activity/' + act.activityId + '/splits',
                    (laps) => {
                        laps.lapDTOs.forEach((l) => {
                            console.dir(l.startTimeGMT, l.distance, l.duration, l.averageSpeed, l.maxSpeed)
                    })
                })
            })
        }
    )