This repository contains an example Python implementation for the article.
uv syncThe script authenticates the user with the API then exports all workouts to the output directory using the specified file format.
uv run python3 main.py [-h] [-e ENDPOINT] [-t TOKEN] [-f {gpx,geojson,gpkg,parquet,shp,csv,json,xlsx,sql,sqlite3,xml,html}] [-o OUTPUT_DIRECTORY] [--start-date START_DATE] [--end-date END_DATE]The latitude/longitude parsing is based on Miroslav Bendík's MiFitDataExport project.
If the authentication does not work out of the box, you can also provide the token manually:
- Open the GDPR page
- Click
Export data - Sign in to your account
- Open the developer tools in your browser (F12)
- Select the
Networktab - Click on
Export dataagain - Look for any request containing the
apptokenheader or cookie - Pass the token to the script using the
-targument
