Authentication Required

API Key

Parameters

Required

site_token Site Token

Optional

geoLimit Start and end positions for the portion of visitors to send back. Values can be:

A single integer n - fetch the n most recent visitors to the site

Comma-delimited string x , n - fetch the n most recent visitors starting from the visitor at position x

Returns

JSON ONLY. Object per visitor containing Geographic Location information for the visitors currently online. Visitors are ordered chronologically from most recent to oldest by the time they landed on the site

Key Type Description
v_[VISITOR ID] object The object for a visitor, keyed by v_ suffixed by their internal visitor ID. The object contains keys lat for latitude, lon for longitude and land for 32-bit Unix timestamp land time

Each resultset includes a key "other", representing how many more visitors fall into other result groups outside the limit.

Complexity cost

1 unit

Example Request

http://api.gosquared.com/geo?api_key=API_KEY&site_token=GSN-1234567-X

Example Response

{
    "geo": {
        "v_2131841112": {
            "lat": 18.98,
            "lon": 72.83,
            "land": 1309873706
        },
        "v_2127763148": {
            "lat": 44.28,
            "lon": 8.5,
            "land": 1309873690
        },
        "v_1502969964": {
            "lat": 42.38,
            "lon": -71.1,
            "land": 1309873653
        },
        "v_386429125": {
            "lat": 41.75,
            "lon": -72.76,
            "land": 1309873590
        },
        "v_1808835344": {
            "lat": 41.21,
            "lon": -73.17,
            "land": 1309873552
        },
        "v_1110838986": {
            "lat": 38.99,
            "lon": -77.13,
            "land": 1309873739
        },
        "v_653956423": {
            "lat": 51.5,
            "lon": -0.13,
            "land": 1309873370
        }
    }
}

Example Request

http://api.gosquared.com/geo?api_key=API_KEY&site_token=GSN-1234567-X&geoLimit=2,3

Example Response

{
    "geo": {
        "v_1502969964": {
            "lat": 42.38,
            "lon": -71.1,
            "land": 1309873653
        },
        "v_386429125": {
            "lat": 41.75,
            "lon": -72.76,
            "land": 1309873590
        },
        "v_1808835344": {
            "lat": 41.21,
            "lon": -73.17,
            "land": 1309873552
        }
    }
}
Last modified: 3 April 2012 12:12