Retrieves the location history given a share token, by date range or bounding box.
Supported Request Methods
json, xml, gpx, kml
By default, location history is returned in JSON format. Optionally history can be returned in GPX or KML formats. To specify a different output format, append the file extension to the end of the path, for example, location/history.gpx.
- count (default: 10)Return the most recent n points of historyshare/history?count=100
- afterReturn points more recent than the given timestamp. Dates should be given in iso8601 format or as a unix timestamp.share/history?after=1280340811
- beforeReturn points older than the given timestamp. Dates should be given in iso8601 format or as a unix timestamp.share/history?before=1280340811
- sort (default: desc) asc or descSort the points returned in ascending or descending order. If you're retrieving the latest 500 points, you should sort by "desc" but if you're downloading historical data in chunks you should probably sort by "asc".share/history?after=1280340811&sort=asc
- accuracy (default: 150)Return points with an accuracy greater than the given value. Rough location fixes from the cell tower will usually have an accuracy of 500 meters, so querying data more accurate than 200 meters will give you good results.share/history?accuracy=200
- thinning (default: 0)The "thinning" parameter will thin the history data by 1/n so you get slightly less accurate data but it will be spread out over a longer period of time. For example, if the user records 100 points in an hour, and you set thinning to 2, returning the last 100 points will return data logged in the last 2 hours. The points are chosen at random, so you will get slightly different results if you run this repeatedly. Set to "0" or omit the parameter to turn thinning off.
- geometryIf you want to query points by geometry, set this parameter to the type of geometry you're specifying. circle or rectangle are the two modes that are currently supported. Some of the below parameters will be required based on the search type.share/history?geometry=circle¢er=45.511,-122.633&radius=0.5 or share/history?geometry=rectangle&sw=45.504,-122.653&ne=45.512,-122.644
- center Required for geometry=pointWhen querying for data within a circle, specify the center of the circle in the format lat,long.
- radius Required for geometry=pointWhen querying for data within a circle, specify the radius of the circle in meters.
- sw Required for geometry=rectangleWhen querying for data within a rectangle, specify the southwest corner of the rectangle in the format lat,long.
- ne Required for geometry=rectangleWhen querying for data within a rectangle, specify the northeast corner of the rectangle in the format lat,long.
The response is identical to the response to location/history.