Runtastic JSON Account Backup Data PHP Converter

Published by John on August 12, 2019 Under PHP

Update: After submitting a ticket, Runtastic now includes a ‘Sport-sessions/GPS-data/’ folder in the export, which includes GPX files. So, if your only goal is to get GPX files to import/use with a different program or service, you can now get that directly from the export. However, these are not in human readable names, so you may still find this script useful.

I’ve been using Runtastic to manage my kayaking trips for about a year now and their app is great for viewing information about your app on your phone or quick stats. However, I have a couple apps I like to use, like GPXSee, Viking, and Google Maps, so that I can play with the GPS data or create nicer maps. So, I usually end up exporting most of my Runtastic Activities to GPX files, then import/use them in a different program.

Recently, Runtastic decided to disable their website and focus on their mobile app. I believe the website is the only way you currently can, could now, export the GPX data. And, even if they were to add an option to export it directly from the app on your phone, you would have to export it, downloading it, emailing it or connect your phone to your computer to get it off, which would likely end up being a pain.

Runtastic left an export feature available, but this export is hardly useful to most people, as it appears to be a proprietary JSON format, not event GEOJSON, and the file names are not helpful, as they don’t include the date of the activity in it. I’m not sure what use this data would be to most people in it’s basic form, aside from allowing you to re-import it back to Runtastic.

There are several websites, including competitors of Runtastic, which have converters setup. However, I wasn’t really wanting to upload my data to a random third-party site. In the email where you get this hard to use backup from runtastic, they even say:

Security Note: Do not download your data export on public computers. The export will contain personal data and should not be shared with others. After you have downloaded the requested data, the export will be automatically deleted from the server after 30 days.

This struck me as amusing given that since they aren’t providing a useful export, the solution most non-technical people are going to find is to upload all their data to a third-party site.

I found/tried a few of the scripts available to convert the data, but the ones I tried didn’t work and I wasn’t really wanting to compile/run a random C or Java program, just to convert a JSON file. So, I created a PHP Script to convert a Runtastic Account Export to useable GPX files.

You can view/download the script on github here: github.com/jkcr/runtastic-php-json-converter.

There are some instructions/details on Github, along with some known issues, so anyone that wants to help improve/test would be appreciated.

First login to Runtastic on your computer, click on Export and then download the provided export zip file, and extract it somewhere on your computer.

The basic usage is like this:


php ./runtastic_json_converter.php input_folder output_folder

input_folder = The Sport-sessions/GPS-data/ folder of your account backup.

output_folder = The folder you want the GPX data saved to.

By default, this script should not overwrite and existing files, but you can change this by setting the $allow_clobber variable to true.

When it is working correctly, a basic GPX file should be generated. I’ve tested opening in Google Maps, Viking, and GPXSee without issue. However, let me know if you run into any issues.


No Comments |

Add a Comment