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

Download Daily Steps

Former Member
Former Member
Hey everyone!

As I see, there were several topics on that some time ago, but still no solid solution.

Did anyone find a way how to get daily steps count in csv/json/xml/xls/xlsx format?

Thanks,
FIL

Top Replies

All Replies

  • I don't think there's an easy direct way (there's the settings button that let you do export original from within the steps page, but the result is a bunch of fit files in a zip file) and I realize that the alternative may also be out of your comfort zone, but if you don't mind writing a small program on the watch and at a server backend you could fairly easy obtain those values....

    connectiq app (on the watch):
    - read the steps from the history ( https://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/ActivityMonitor/History.html )
    - send the values to your server backend ( https://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Communications.html#makeWebRequest-instance_method )

    server backend program 1:
    - store the values you send

    server backend program 2:
    - send the stored values in the format you want
  • From the steps trend over time link accessible from the steps page, you can export a csv of steps by day for 7 days. That doesn't help if you want a month or a year in one file but it's a start.
  • Ah - a 2-year old question that remains outstanding ;-)

    I asked support and we can only download a .fit file from the web site. Does anyone know a program that can read and make sense of such files?

    The support people can't (and understandably won't) make any comment on third-party applications.

  • Unfortunately the monkey-c links above now give 404s

  • If you open the network console while looking at a daily summary on Garmin Connect (e.g. [https://connect.garmin.com/modern/daily-summary/2021-04-14], you'll see one request that looks like this:

    [https://connect.garmin.com/modern/proxy/wellness-service/wellness/dailySummaryChart/YOURUSERNAME?date=2021-04-14]

    The response is JSON data with 15 minute granularity:
    e.g

    [
    //...
     {
        "startGMT": "2021-04-14T13:15:00.0",
        "endGMT": "2021-04-14T13:30:00.0",
        "steps": 86,
        "primaryActivityLevel": "sedentary",
        "activityLevelConstant": false
    }, {
        "startGMT": "2021-04-14T13:30:00.0",
        "endGMT": "2021-04-14T13:45:00.0",
        "steps": 461,
        "primaryActivityLevel": "highlyActive",
        "activityLevelConstant": false
    }, {
        "startGMT": "2021-04-14T13:45:00.0",
        "endGMT": "2021-04-14T14:00:00.0",
        "steps": 1038,
        "primaryActivityLevel": "highlyActive",
        "activityLevelConstant": false
    },
    //...
    ]

    Similarly, if you look at the network console while looking at the steps report:

    [https://connect.garmin.com/modern/report/29/wellness/last_seven_days]

    [https://connect.garmin.com/modern/proxy/userstats-service/wellness/daily/YOURUSERNAME?fromDate=2021-04-01&untilDate=2021-04-07&metricId=29&metricId=38&grpParentActType=false]

    {
        "userProfileId": 5074031,
        "statisticsStartDate": "2021-04-01",
        "statisticsEndDate": "2021-04-07",
        "allMetrics": {
            "metricsMap": {
                "WELLNESS_TOTAL_STEPS": [{
                    "value": 16373.0,
                    "calendarDate": "2021-04-01"
                }, {
                    "value": 77.0,
                    "calendarDate": "2021-04-02"
                }, {
                    "value": 11097.0,
                    "calendarDate": "2021-04-03"
                }, {
                    "value": 16959.0,
                    "calendarDate": "2021-04-04"
                }, {
                    "value": 1757.0,
                    "calendarDate": "2021-04-05"
                }, {
                    "value": 3864.0,
                    "calendarDate": "2021-04-06"
                }, {
                    "value": 13754.0,
                    "calendarDate": "2021-04-07"
                }],
                "WELLNESS_TOTAL_STEP_GOAL": [{
                    "value": 9530.0,
                    "calendarDate": "2021-04-01"
                }, {
                    "value": 10900.0,
                    "calendarDate": "2021-04-02"
                }, {
                    "value": 10900.0,
                    "calendarDate": "2021-04-03"
                }, {
                    "value": 10940.0,
                    "calendarDate": "2021-04-04"
                }, {
                    "value": 12150.0,
                    "calendarDate": "2021-04-05"
                }, {
                    "value": 11110.0,
                    "calendarDate": "2021-04-06"
                }, {
                    "value": 9660.0,
                    "calendarDate": "2021-04-07"
                }]
            }
        },
        "groupedMetrics": null
    }

    I played around with this in the browser and I was able to get at least 1 year's worth of total step data in one request. So it wouldn't be too hard to write a browser script or python script (for your personal use) to get the data you want and convert it to CSV.

    (Unfortunately you can't just copy and paste the URL into the address bar)

  • Unfortunately the monkey-c links above now give 404s

    You do not need any monkeys. You can pull the data directly from connect.garmin.com. And it was always so. Untill recently, it was enough to enter the following URL into the browser's address line, replacing the USER_ID with your own user ID as seen in the address line of your public profile at GC Web, and adjusting the starting and ending dates:

    https://connect.garmin.com/modern/proxy/userstats-service/wellness/daily/USER_ID?fromDate=2021-01-01&untilDate=2021-04-14&metricId=29&metricId=38

    However, recently Garmin Connect pages require an additional header string, and the plain URL call will return an error, but you can still call it from the DevTools Console (F12 in the browser) in the following way:

    jQuery.getJSON(
        'https://connect.garmin.com/modern/proxy/userstats-service/wellness/daily/USER_ID?fromDate=2021-01-01&untilDate=2021-04-14&metricId=29&metricId=38',
        function(data){console.log(data.allMetrics.metricsMap.WELLNESS_TOTAL_STEPS);}
    );

    Again, you have to replace the string USER_ID with your true user ID, and adjust the dates, if necessary. Also, an active session of Garmin Connect Web must be open in the browser. You get the result as an JSON object that you can copy to a text file, and either process it directly or convert it to whatever format you prefer.

  • Interesting. I'll give that a go.

    Someone who can write a browser extension would no doubt be able to put something together to create a download button...

  • Ah, sorry for the duplicate -  was faster to type it. I did not see it before posting

  • I cooked up a browser script to do this. It should work in any modern browser on PC or Mac, and even on a phone or tablet.

    It'll ask for a start date and end date, and give you download buttons for CSV and the original JSON. I tested this with a range of one year, and it worked fine.

    Installation

    1) Get script from here: [https://pastebin.com/jRHC6KU8

    Copy the script contents to your clipboard: Scroll to bottom of page, click on "RAW Paste Data" box, CTRL/CMD-A, CTRL/CMD-C

    2) Open this page: https://caiorss.github.io/bookmarklet-maker/

    2a) Set title to "GC export steps"

    2b) Paste script into "Code" box

    2c) Click "generate bookmarklet"

    2d) Drag blue bookmarklet to bookmarks bar. If the bookmarks bar isn't visible, press CTRL/CMD-SHIFT-B.

    If you don't have a bookmark bar or you're on mobile, select and copy the contents of Output box, bookmark any site at all, edit the bookmark, then paste what you just copied into the Address/Location/URL box. (In Firefox you can also right-click and select "Bookmark this link")

    Usage after Installation

    1) Sign into Garmin Connect: [https://connect.garmin.com]

    2) Click on "GC export steps" bookmark. A dialog will open in the current tab.

  • WillNorthYork: it works. You are a star, thank you.