09-07-2021 08:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-07-2021 08:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
In Fitbit's Get Activity Logs List endpoint, what are the units of speed and pace?
GET https://api.fitbit.com/1/user/-/activities/list.json
"pace": 309.30047594399764,
"source": {
"id": "2295XJ",
"name": "Fitbit for Windows Phone",
"type": "app",
"url": "https://www.fitbit.com/"
},
"speed": 11.628206575689497,
"startTime": "2016-01-31T19:11:49.000-08:00",

09-13-2021 10:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-13-2021 10:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @tryikram
Speed and pace are calculated based on the localization specified by the Accept-Language header. The Accept-Language header value is case sensitive. If this header is missing or the value is misspelled we default to metric. See https://dev.fitbit.com/build/reference/web-api/developer-guide/application-design/#Localization.
Best,
Gordon
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

09-16-2021 04:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2021 04:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you Gordon for the reply. I did check this link before, however, Pace and Speed are not listed in it. (I am using en_UK).

09-16-2021 05:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-16-2021 05:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
en_UK is not one was have tested, but I would assume it uses the metric system. Speed would km/h. The definition of pace is time / distance. In case, that would be h / km.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

11-20-2021 06:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
11-20-2021 06:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I am looking at Speed in a Swimming Activity. I don't think speed (1.431878820375335) is miles/hr, I tried yards/sec but that doesn't seem to equate to the duration swam or total yards swam. Any idea what unit speed is in for swimming in the US? Also I know duration is in millseconds but the only way I can work it out to what my fitbit app shoes for duration (2' 7") is to multiply the duration (3357000) by 57 (not 60) and convert the milliseconds to time. So I guess I am looking for any additional information on the units for speed and duration in a swimming activity. Example of log data below
# "distance" : 1.335227,
# "distanceUnit" : "Mile",
# "duration" : 3357000,
# "activeDuration" : 3357000,
# "logType" : "auto_detected",
# "swimLengths" : 74,
# "speed" : 1.431878820375335,
# "pace" : 2514.179236938738,
# "poolLength" : 25,
# "poolLengthUnit" : "Yard",

11-20-2021 06:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
11-20-2021 06:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
OK, I take it back speed is miles/hour, my bad. But I would still like to know how to convert duration (in milliseconds) to what my app shows, e.g
duration" : 3357000 = 2' 07"

11-20-2021 06:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
11-20-2021 06:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Sorry, I am having a bad day, I meant Pace not Duration
# "pace" : 2514.179236938738 (shown in JSON activity log) = 2' 07" (Shown in fitbit app)
The only way I can work tht out is
pace2 = (j.pace * 57)
d_hours, d_minutes, d_seconds, timeStr = milli2time(pace2)
I would suspect 60 to have been an acceptable number but it always calculates to high compared to what the app shows. 57 seems to be spot on for all my swimming events, but there is not logical "math" to it.

