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.







One response to “Nike API PHP Example”

  1. cchana Avatar

    I’ve only had a quick look at the API documentation they’ve provided but I must say it looks like an step in the right direction. Liberating data is just as important as collecting it and one of main reasons I myself worked on Nike+PHP.

    The Fuelband line seems to be the focus for things now, but with so many years put behind their other products, it’s not a suprise and I guess they’re very stable.