Showing results for 
Search instead for 
Did you mean: 

TCX comparison vs Stream/Lap data from api

Mt. Kenya


I'm currently looking into using the strava api to export my activities to Gpx/Tcx (or any other format that suits my needs) because Garmin doesn't offer such a service / api. When looking into the data and comparing an activity from Garmin, exported in TCX format, with the data I can collect using the streams/laps api I noticed a few things?

1. The start/endindex of the first lap sometimes seem to be 0? Why can this happend and how should I deal with this? Since the lenght of the lap corresponds with the length found in Strava/Garmin ui.

2. The endIndex of the last lap doesn't correspond with the last index in the stream data? F.i. 1980 for the size in the stream. 1956 in the lap data?

Can someone explain to me why this could happen? And how to work with it?


Mt. Kenya

I finally found the cause of the mistmatch: if the beginning or the end of the activity is hidden, data returned by laps endpoint is not aligned with the stream endpoint. 

So now the question is: how to massively modify visibility of the start and end to have good alignment?

Moderator Moderator

Hey Jitbsomhorst,

Can you explain more about what you are trying to achieve? In the meantime you can take a look at our reference guide on Streams.

STRAVA | Developer Hub Team


I encounter exactly the same strange thing: the END index ID of the last lap (end_index = 1270) does not match the count of the rows returned by the stream api (size = 1352). Based on the doc provided, index returned by the LAPS API should match with stream index but it is the case only sometimes...

I can see that stream API return also the field "resolution" (value = "High" in my case) but I do not see anything in the documentation. I suspect we should get stream data with another resolution to match the LAPS index?

PS: I just checked data returned by the Strava web app (that us the URL endpoint "$ID/lap_efforts") and for the same LAP ID, end_index is not the same than API but this time is correct (1351)

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!

Know how to use Community

Understand Community Settings