Nike API PHP Example Feb20


This Post Was Wrote at

Related Posts

Share This

Nike API PHP Example

Recently Nike released their developer site to give people a preview and a glimpse into how they will be able to access and export Nike data through their upcoming API. The problem being is that it’s still in development stage, and for users like me, who aren’t part of (or won’t be part of) their Nike+ Accelerator Program, it doesn’t actually give you access.

But it does expose quite a few parts that with a little tinkering, console debugging, and help from the ol’ t’internet you can figure out the core concepts and key attributes and write your own PHP script. It returns the information in lovely JSON format which can easily be used and manipulated to your hearts content.


$data = array(‘appid: fuelband’, “Accept: application/json”);
$buffer = curl_exec($curl_handle);

if (empty($buffer)) {
print “Sorry, something went wrong here”;
} else {
print $buffer;


Simple hey! The {access_token} is a personal ID related to your account, that you can generate from the Nike Developer Site.

The URL can take various formats, depending what you want to grab, The URL above:


Simply grabs an overview of my activity:

“experienceTypes”: [
“summaries”: [
“experienceType”: “ALL”,
“records”: {
“lifetimeFuel”: 64631
“experienceType”: “RUNNING”,
“records”: {
“level”: 3,
“lifetimeDuration”: “29:17:42.000”,
“lifetimeGpsRuns”: 29,
“lifetimeHeartActivities”: 0,
“lifetimeAveragePace”: 348832.2388571808

But you can also use these URL’s to get more information:

The last one giving you full GPS data of an activity.

A big hats off to WotLabs that basically gave me the last piece of the pizzle, the appid.