Claim your running activities from the Nike Run Club mobile app and convert them into GPX format.
By using this tool, you can extract your NRC running activities and convert them into GPX (GPS eXchange) format, which can then be imported into other fitness tracking apps or services, such as Strava.
This tool supports providing an access token, or a directory/files of NRC activities in JSON format.
This project was inspired by NRC Exporter. It's a JavaScript alternative to the original Python version. You can read how the Python maintainer was able to extract the data from the Nike Run Club app in this blog post, by doing some reverse engineering on the Nike Run Club app's API. The original project is no longer maintained, and this JavaScript version aims to provide a similar functionality with some improvements.
The only downside of this tool is that Nike may change their API or even block your account if they detect automated access. However, it should work for now, and you can use it at your own risk.
- Download the repository or clone it using Git:
git clone git@github.com:boolfalse/claim-nrc.git && cd claim-nrc/
- Install dependencies:
npm install
- Run the help command to see available options:
node claim-nrc.js --help
For claiming your NRC activities, you have to manually provide an access token as an argument. To extract the access token from that browser, check out the Getting an Access Token section below.
- Once you have the access token, you're ready to claim your NRC activities and convert them to GPX format by running this single command:
node claim-nrc.js -t <access_token>
The output GPX files will be saved in the activities/gpx/
directory, and the original JSON files will be saved in the activities/json/
directory. If these directories do not exist, they will be created automatically.
- If you have already downloaded your NRC activities somehow and want to convert that JSON data to GPX data, you put all of those JSON files in a folder and pass that folder's path to
claim-nrc
:
node claim-nrc.js -i /path/to/folder
- You can also pass specific JSON file(s) to convert them to GPX format:
node claim-nrc.js -i /path/to/file1.json /path/to/file2.json
The simplest way to retrieve an access token is to run this script in your desktop browser's console as a logged-in user. This will print the access token to the console.
JSON.parse(window.localStorage.getItem('oidc.user:https://accounts.nike.com:4fd2d5e7db76e0f85a6bb56721bd51df')).access_token
Alternatively, you can follow these steps to manually retrieve the access token from your browser's developer tools:
- Open the Nike website in your desktop browser.
- Log in to your account.
- Open the browser's developer tools (usually by pressing F12 or right-clicking and selecting "Inspect").
- Go to the "Application" tab in the developer tools.
- Find the key named "oidc.user:https://accounts.nike.com:<your_nike_account_id>" in the "Local Storage" subsection in the left sidebar.
- Click on it, and you should see a JSON object with an "access_token" field.
- Copy the value of the "access_token" field.
- You can now use this access token with the
-t
option when running theclaim-nrc
command.
This project is inspired by NRC Exporter, which is licensed under the MIT License. You can read the license in the LICENSE file in this repository.