DEPRECATED

The v1 endpoints have been deprecated and will be removed after 1H 2014. Please use the current version instead.

Daily storyline

Required scope: activity AND location

Get daily storylines for user. See Daily summary API for details about the format of the time parameters. Note that the storyline API has a max range of 7 days in one query and with track points just one day per query.

GET /user/storyline/daily/<date>[?trackPoints=true/false]

GET /user/storyline/daily/<week>

GET /user/storyline/daily?from=<from>&to=<to>

GET /user/storyline/daily?pastDays=<pastDays>[&trackPoints=true/false]

Optional parameter:

  • trackPoints: if true, the returned activities also include track point information

Response

All the daily storyline API calls return a JSON array of dates and move or place segments.

[
    {
        "date": "20121212",
        "segments": [
            {
                "type": "place",
                "startTime": "20121212T000000Z",
                "endTime": "20121212T071430Z",
                "place": {
                    "id": 1,
                    "type": "unknown",
                    "location": {
                        "lat": 55.55555,
                        "lon": 33.33333
                    }
                }
            },
            {
                "type": "move",
                "startTime": "20121212T071430Z",
                "endTime": "20121212T074617Z",
                "activities": [
                    {
                        "activity": "wlk",
                        "startTime": "20121212T071430Z",
                        "endTime": "20121212T072732Z",
                        "duration": 782,
                        "distance": 1251,
                        "steps": 1353,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T071430Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T072732Z"
                            }
                        ]
                    },
                    {
                        "activity": "trp",
                        "startTime": "20121212T072732Z",
                        "endTime": "20121212T074616Z",
                        "duration": 1124,
                        "distance": 8443,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T072732Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T074208Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T074617Z"
                            }
                        ]
                    }
                ]
            },
            {
                "type": "place",
                "startTime": "20121212T074617Z",
                "endTime": "20121212T100051Z",
                "place": {
                    "id": 2,
                    "type": "unknown",
                    "location": {
                        "lat": 55.55555,
                        "lon": 33.33333
                    }
                },
                "activities": [
                    {
                        "activity": "wlk",
                        "startTime": "20121212T074804Z",
                        "endTime": "20121212T075234Z",
                        "duration": 270,
                        "distance": 227,
                        "steps": 303,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T074804Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T075234Z"
                            }
                        ]
                    }
                ]
            },
            {
                "type": "move",
                "startTime": "20121212T100051Z",
                "endTime": "20121212T100715Z",
                "activities": [
                    {
                        "activity": "wlk",
                        "startTime": "20121212T100051Z",
                        "endTime": "20121212T100715Z",
                        "duration": 384,
                        "distance": 421,
                        "steps": 488,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T100051Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T100715Z"
                            }
                        ]
                    }
                ]
            },
            {
                "type": "place",
                "startTime": "20121212T100715Z",
                "endTime": "20121212T110530Z",
                "place": {
                    "id": 4,
                    "name": "test",
                    "type": "foursquare",
                    "foursquareId": "4df0fdb17d8ba370a011d24c",
                    "location": {
                        "lat": 55.55555,
                        "lon": 33.33333
                    }
                },
                "activities": [
                    {
                        "activity": "wlk",
                        "startTime": "20121212T101215Z",
                        "endTime": "20121212T101255Z",
                        "duration": 40,
                        "distance": 18,
                        "steps": 37,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T101215Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T101255Z"
                            }
                        ]
                    }
                ]
            },
            {
                "type": "move",
                "startTime": "20121212T110530Z",
                "endTime": "20121212T111129Z",
                "activities": [
                    {
                        "activity": "wlk",
                        "startTime": "20121212T110530Z",
                        "endTime": "20121212T111128Z",
                        "duration": 358,
                        "distance": 493,
                        "steps": 441,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T110531Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T110536Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T110947Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T111017Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T111129Z"
                            }
                        ]
                    }
                ]
            },
            {
                "type": "place",
                "startTime": "20121212T111129Z",
                "endTime": "20121212T153638Z",
                "place": {
                    "id": 2,
                    "type": "unknown",
                    "location": {
                        "lat": 55.55555,
                        "lon": 33.33333
                    }
                },
                "activities": [
                    {
                        "activity": "wlk",
                        "startTime": "20121212T111233Z",
                        "endTime": "20121212T112203Z",
                        "duration": 570,
                        "distance": 565,
                        "steps": 809,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T111233Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T112203Z"
                            }
                        ]
                    }
                ]
            },
            {
                "type": "move",
                "startTime": "20121212T153638Z",
                "endTime": "20121212T160744Z",
                "activities": [
                    {
                        "activity": "trp",
                        "startTime": "20121212T153638Z",
                        "endTime": "20121212T155321Z",
                        "duration": 1003,
                        "distance": 8058,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T153638Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T155322Z"
                            }
                        ]
                    },
                    {
                        "activity": "wlk",
                        "startTime": "20121212T155322Z",
                        "endTime": "20121212T160744Z",
                        "duration": 862,
                        "distance": 1086,
                        "steps": 1257,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T155322Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T155402Z"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T160744Z"
                            }
                        ]
                    }
                ]
            },
            {
                "type": "place",
                "startTime": "20121212T160744Z",
                "endTime": "20121212T232730Z",
                "place": {
                    "id": 1,
                    "type": "unknown",
                    "location": {
                        "lat": 55.55555,
                        "lon": 33.33333
                    }
                }
            }
        ],
        "caloriesIdle": 1785
    }
]
  • date: storyline date, in format yyyyMMdd
  • segments: JSON array of storyline segments or null if there is no storyline available for the date
  • caloriesIdle (optional): daily idle burn in kcal. Available if user has at least once enabled calories
Segment
  • type: “move” or “place”
  • startTime: segment start time in yyyyMMdd’T’HHmmssZ format
  • endTime: segment end time in yyyyMMdd’T’HHmmssZ format
  • place (optional): a JSON object with info about the place
  • activities (optional): JSON array of activities for the segment
Place
  • id (optional): a unique identifier (per-user, 64 bit unsigned) of the place
  • name (optional): name for the place
  • type: one of:
    • unknown: the place has not been identified
    • home: the place is labeled as home
    • school: the place is labeled as school
    • work: the place is labeled as work
    • user: the place has been manually named
    • foursquare: the place has been identified from foursquare
  • foursquareId (optional): foursquare venue id if applicable
  • location: JSON object with:
    • lat: latitude coordinate as number
    • lon: longitude coordinate as number
Activity
  • activity: activity type, one of “wlk” (walking),“cyc” (cycling),“run” (running) or “trp” (transport)
  • startTime: start time of the activity in yyyyMMdd’T’HHmmssZ format
  • endTime: end time of the activity in yyyyMMdd’T’HHmmssZ format
  • duration: duration of the activity in seconds
  • distance: distance for the activity in meters
  • steps (optional): step count for the activity (if applicable)
  • calories (optional): calories burn for the activity in kcal (if applicable), on top of the idle burn. Available if user has at least once enabled calories
  • trackPoints (optional): JSON array of track points for the activity when requested with each track point having:
    • lat: latitude coordinate
    • lon: longitude coordinate
    • time: timestamp in yyyyMMdd’T’HHmmssZ format