You must have a valid access token before being able to use the API, see authentication on how to obtain an access token.
The API is only available using https. The base url to the API is:
The API calls described below are relative to the base url.
Each API call must include a valid access token given either in the HTTP
Authorization header or as a query parameter in the request url.
GET /api/1.1/user/summary/daily/20130401 Authorization: Bearer <access_token> GET /api/1.1/user/summary/daily/20130401?access_token=<access_token>
If the access token is not valid, HTTP status code
401 Unauthorized is returned.
Currently the exact timespan used to query data for a day depends on user’s current time zone, which is provided in the profile API.
We are working on improving the time zone support in the future, so that the current time zone will not affect history.
The timestamps in API responses are in users local time, with time zone designator included in the timestamp.
An unpublished app can make at most
2000 requests per hour and
60 requests per minute. For apps published in Connected Apps, the limits are
4000 requests per hour and
120 requests per minute. The quotas reset at the top of each hour and minute. Each response includes the headers
X-RateLimit-MinuteRemaining with the current values. If the rate limiting is activated, the
429 Too Many Requests response code is returned. Requests using newly issued access tokens will have double the normal rate limit for an hour. If you need a higher limit, please contact us at email@example.com.
The from/to date range in API calls must be between
firstDate in user profile and the current day. When requesting data for a specific week or month, the week/month must be between week/month of first date in user profile and current week/month.
In ideal conditions the API should provide at most couple of hours old user data. User data is uploaded to our servers whenever user opens the app in phone and periodically every couple of hours.
The data updates may be irregular if user has bad internet connection or is using the Moves battery saving mode.
All API calls return an
ETag header in the response with some value. You can provide
If-None-Match header with a previously saved ETag value in the API call and if the ETag values still match, server will respond with
304 Not Modified response code and empty body. If the ETag values do not match, full response is returned instead. See http://en.wikipedia.org/wiki/HTTP_ETag for more details.
All API calls, except profile, return a
Last-Modified header in the response with some timestamp in RFC 1123 format. You can provide
If-Modified-Since header in the API call in same format and if the data for the date range has not been updated since then, server will respond with
304 Not Modified response code and an empty body.
Server will check both
If-Modified-Since headers if both are included in the request, and only respond with
304 Not Modified if they both agree. Full response is always returned if neither one of the headers is included.
You can set HTTP request header
Accept-Encoding: gzip to receive compressed responses.
The /api/v1/ endpoints have been deprecated and will be removed after 1H 2014.
Documentation for V1 endpoints:
groupfield in both summaries and storylines
startTimeas a unique ID, you should probably convert the timestamp to UTC or unix time first
manualflag to indicate whether an 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
lastUpdatetimestamp in summaries and storylines which tells when data was last updated for a day or storyline segment
If-Modified-SinceHTTP headers in summary and storyline API calls
updatedSincequery parameter in summary and storyline API calls