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 when track points are included.

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

GET /user/storyline/daily/<week>[?trackPoints=true/false][&updatedSince=<updatedSince>][&timeZone=<timeZone>]

GET /user/storyline/daily/<month>[?updatedSince=<updatedSince>][&timeZone=<timeZone>]

GET /user/storyline/daily?from=<from>&to=<to>[&trackPoints=true/false][&updatedSince=<updatedSince>][&timeZone=<timeZone>]

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

Optional parameter:

  • trackPoints: if true, the returned activities also include track point information. Including track points limits the query range to 7 days.

Response

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

[
    {
        "date": "20121212",
        "summary": [
            {
                "activity": "walking",
                "group": "walking",
                "duration": 3333,
                "distance": 3333,
                "steps": 3333,
                "calories": 300
            },
            {
                "activity": "walking_on_treadmill",
                "group": "walking",
                "duration": 270,
                "steps": 303,
                "calories": 30
            },
            {
                "activity": "transport",
                "group": "transport",
                "duration": 1124,
                "distance": 8443
            },
            {
                "activity": "underground",
                "group": "transport",
                "duration": 1003,
                "distance": 8058
            },
            {
                "activity": "zumba",
                "duration": 570,
                "calories": 200
            }
        ],
        "segments": [
            {
                "type": "place",
                "startTime": "20121212T000000+0200",
                "endTime": "20121212T071430+0200",
                "place": {
                    "id": 1,
                    "type": "unknown",
                    "location": {
                        "lat": 55.55555,
                        "lon": 33.33333
                    }
                },
                "lastUpdate": "20130317T121143Z"
            },
            {
                "type": "move",
                "startTime": "20121212T071430+0200",
                "endTime": "20121212T074617+0200",
                "activities": [
                    {
                        "activity": "walking",
                        "group": "walking",
                        "manual": false,
                        "startTime": "20121212T071430+0200",
                        "endTime": "20121212T072732+0200",
                        "duration": 782,
                        "distance": 1251,
                        "steps": 1353,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T071430+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T072732+0200"
                            }
                        ]
                    },
                    {
                        "activity": "transport",
                        "group": "transport",
                        "manual": false,
                        "startTime": "20121212T072732+0200",
                        "endTime": "20121212T074616+0200",
                        "duration": 1124,
                        "distance": 8443,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T072732+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T074208+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T074617+0200"
                            }
                        ]
                    }
                ],
                "lastUpdate": "20130317T121143Z"
            },
            {
                "type": "place",
                "startTime": "20121212T074617+0200",
                "endTime": "20121212T100051+0200",
                "place": {
                    "id": 2,
                    "type": "unknown",
                    "location": {
                        "lat": 55.55555,
                        "lon": 33.33333
                    }
                },
                "activities": [
                    {
                        "activity": "walking_on_treadmill",
                        "group": "walking",
                        "manual": true,
                        "duration": 270,
                        "steps": 303,
                        "calories": 30,
                        "trackPoints": []
                    }
                ],
                "lastUpdate": "20130317T121143Z"
            },
            {
                "type": "move",
                "startTime": "20121212T100051+0200",
                "endTime": "20121212T100715+0200",
                "activities": [
                    {
                        "activity": "walking",
                        "group": "walking",
                        "manual": false,
                        "startTime": "20121212T100051+0200",
                        "endTime": "20121212T100715+0200",
                        "duration": 384,
                        "distance": 421,
                        "steps": 488,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T100051+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T100715+0200"
                            }
                        ]
                    }
                ],
                "lastUpdate": "20130317T121143Z"
            },
            {
                "type": "place",
                "startTime": "20121212T100715+0200",
                "endTime": "20121212T110530+0200",
                "place": {
                    "id": 4,
                    "name": "test",
                    "type": "foursquare",
                    "foursquareId": "4df0fdb17d8ba370a011d24c",
                    "foursquareCategoryIds": ["4bf58dd8d48988d125941735"],
                    "location": {
                        "lat": 55.55555,
                        "lon": 33.33333
                    }
                },
                "activities": [
                    {
                        "activity": "walking",
                        "group": "walking",
                        "manual": false,
                        "startTime": "20121212T101215+0200",
                        "endTime": "20121212T101255+0200",
                        "duration": 40,
                        "distance": 18,
                        "steps": 37,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T101215+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T101255+0200"
                            }
                        ]
                    }
                ],
                "lastUpdate": "20130317T121143Z"
            },
            {
                "type": "move",
                "startTime": "20121212T110530+0200",
                "endTime": "20121212T111129+0200",
                "activities": [
                    {
                        "activity": "walking",
                        "group": "walking",
                        "manual": false,
                        "startTime": "20121212T110530+0200",
                        "endTime": "20121212T111128+0200",
                        "duration": 358,
                        "distance": 493,
                        "steps": 441,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T110531+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T110536+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T110947+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T111017+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T111129+0200"
                            }
                        ]
                    }
                ],
                "lastUpdate": "20130317T121143Z"
            },
            {
                "type": "place",
                "startTime": "20121212T111129+0200",
                "endTime": "20121212T153638+0200",
                "place": {
                    "id": 2,
                    "type": "unknown",
                    "location": {
                        "lat": 55.55555,
                        "lon": 33.33333
                    }
                },
                "activities": [
                    {
                        "activity": "zumba",
                        "manual": true,
                        "duration": 570,
                        "calories": 200,
                        "trackPoints": []
                    }
                ],
                "lastUpdate": "20130317T121143Z"
            },
            {
                "type": "move",
                "startTime": "20121212T153638+0200",
                "endTime": "20121212T160744+0200",
                "activities": [
                    {
                        "activity": "underground",
                        "group": "transport",
                        "manual": false,
                        "startTime": "20121212T153638+0200",
                        "endTime": "20121212T155321+0200",
                        "duration": 1003,
                        "distance": 8058,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T153638+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T155322+0200"
                            }
                        ]
                    },
                    {
                        "activity": "walking",
                        "group": "walking",
                        "manual": false,
                        "startTime": "20121212T155322+0200",
                        "endTime": "20121212T160744+0200",
                        "duration": 862,
                        "distance": 1086,
                        "steps": 1257,
                        "calories": 99,
                        "trackPoints": [
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T155322+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T155402+0200"
                            },
                            {
                                "lat": 55.55555,
                                "lon": 33.33333,
                                "time": "20121212T160744+0200"
                            }
                        ]
                    }
                ],
                "lastUpdate": "20130317T121143Z"
            },
            {
                "type": "place",
                "startTime": "20121212T160744+0200",
                "endTime": "20121212T232730+0200",
                "place": {
                    "id": 1,
                    "type": "unknown",
                    "location": {
                        "lat": 55.55555,
                        "lon": 33.33333
                    }
                },
                "lastUpdate": "20130317T121143Z"
            }
        ],
        "caloriesIdle": 1785,
        "lastUpdate": "20130317T121143Z"
    }
]
  • date: storyline date, in format yyyyMMdd
  • summary: JSON array of activity summaries or null if there is no summary available for the date
  • 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
  • lastUpdate (optional): when the storyline was last updated in ISO 8601 (yyyyMMdd’T’HHmmssZ) format, always in UTC
Summary
  • See Summaries API for description about the summary JSON format.
Segment
  • type: currently one of move, place or off (off segments indicate that Moves tracking had stopped for some reason)
  • startTime: segment start time in ISO 8601 (yyyyMMdd’T’HHmmssZ) format
  • endTime: segment end time in ISO 8601 (yyyyMMdd’T’HHmmssZ) format
  • place (optional): a JSON object with info about the place
  • activities (optional): JSON array of activities for the segment
  • lastUpdate (optional): when the segment was last updated in ISO 8601 (yyyyMMdd’T’HHmmssZ) format, always in UTC
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
    • facebook: the place has been identified from facebook
    • foursquare: the place has been identified from foursquare
  • facebookPlaceId (optional): facebook place id if applicable
  • foursquareId (optional): foursquare venue id if applicable
  • foursquareCategoryIds (optional): foursquare category ids for the place if available
  • location: JSON object with:
    • lat: latitude coordinate as number
    • lon: longitude coordinate as number
Activity
  • activity: specific name of the activity. See Activity list API for list of currently supported activities.
  • group (optional): a more generic activity supergroup to which the action belongs to. If defined, one of: walking, running, cycling or transport. Note that there can be additional groups in the future.
  • manual: whether the activity was manually added by user. Note that only in-place activities can currently be added manually. Geo-activities are currently never manually added, even if corrected by user to a different activity.
  • startTime (optional): start time of the activity if known in ISO 8601 (yyyyMMdd’T’HHmmssZ) format
  • endTime (optional): end time of the activity if known in ISO 8601 (yyyyMMdd’T’HHmmssZ) format
  • duration: duration of the activity in seconds
  • distance (optional): distance for the activity in meters (if applicable)
  • 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 (if available) with each track point having:
    • lat: latitude coordinate
    • lon: longitude coordinate
    • time: timestamp in ISO 8601 (yyyyMMdd’T’HHmmssZ) format