Skip to main content

Hello,

Recently, I built an app using the Strava API to automatically retrieve my activity data and store them in a database. I noticed that, using the “https://www.strava.com/api/v3/athlete/activities” API endpoint retrieves the calories as kilojoules, for example “"kilojoules": 637.0”. The calories shown in my Strava account are shown in calories units. Based on the same activity of the above example, I see in my account the value of 427 Cal.

 

However, 637.0 kilojoules are 152.2 calories - that is, a very different number from 427 Cal shown in my account.

I wanted to ask if I am missing any other conversion steps or how exactly are Calories calculated in the application but are different from the API? How can I transform the 637 kilojoules to the number that I am seeing in my account?

 

Thank you very much for your help in advance.

Best,

Panos

The kilojoules are the mechanical work that Strava calculates with the help of the powermeter data. The kcal Strava takes directly from the source when the activity is imported. You get the calories not with the activities summary but with the endpoint for the detailed activity /activities/{id}


Reply