Last 7 days, UTC

Average Latency
7ms

Average Uptime
100.0%

Current Status
Online

  • No information
  • Outage
  • Disruption
  • Normal
Average latency determined from Mashape to API Response time
Query Authentication
 

The API key and Site Token for a user/website.


Authentication
Description
Parameter
String

The API key of your account. You can find this in your account area, developer tab.

api_key

Required

String

The site token for the site you are retrieving data for. You can find this in your account area, developer tab. It will look like GSN-1234567-X.

site_token

Required

Endpoints

HTTP 200 : aggregateStats Model GET/aggregateStats
						[[
  {
    "type": "browsers",
    "list": [],
    "cardinality": 0
  },
  {
    "type": "countries",
    "list": [],
    "cardinality": 0
  },
  {
    "type": "languages",
    "list": [],
    "cardinality": 0
  },
  {
    "type": "organisations",
    "list": [],
    "cardinality": 0
  },
  {
    "type": "platforms",
    "list": [],
    "cardinality": 0
  }
]]						
aggregateStats

The aggregateStats function provides a breakdown of the browsers, countries, languages, platforms and organisations and provides the number of visitors in each category.


Test console
Description
Parameter
string

'|' seperated list of integers specifiying how much data to respond with, ordered 'browsers', 'countries', 'languages', 'organisations', 'platforms'. Default 5|5|5|5|5.
Example: 5|5|5|5|5

limit

Optional

HTTP 200 : campaigns Model GET/campaigns
						{
  "cardinality": 0
}						
campaigns

The campaigns function shows how your sites campaigns are performing.


Test console
Description
Parameter
string

An MD5 hash of a page's URL to filter results by that specific page.

page

Optional

HTTP 200 : concurrents Model GET/concurrents
						{
  "visitors": 0,
  "returning": 0,
  "pages": 0,
  "active": 0,
  "tagged": 0
}						
concurrents

The concurrents function is very similar to overview. It's designed to be quick and is the best way of getting the number of people on your site.


Test console
Description
Parameter
string

The response presenter, accepts old/plain. Defaults to plain.

presenter

Optional

HTTP 200 : engagement Model GET/engagement
						{
  "timeOnSite": {
    "breakdown": null,
    "average": 0
  },
  "visitDepth": {
    "breakdown": null,
    "average": 0
  }
}						
engagement

The engagement function lets you know how engaged users are on the website. For example whether they are active and their time on site.


HTTP 200 : functions Model GET/functions
						{
  "/aggregateStats,/aggregateStats/:types": "aggregateStats",
  "false": "reportPreferences",
  "/campaigns": "campaigns",
  "/concurrents": "concurrents",
  "/engagement": "engagement",
  "/expandUrl": "expandUrl",
  "/geo": "geo",
  "/ignoredVisitors,/ignoredVisitors/:visitorID": "ignoredVisitors",
  "/taggedVisitors,/taggedVisitors/:visitorID": "taggedVisitors",
  "/": "index",
  "/sites": "listSites",
  "/notifications/:id,/notifications": "notifications",
  "/sites/:siteToken/nuke": "nukeSite",
  "/organics": "organics",
  "/overview": "overview",
  "/pages": "pages",
  "/referrers": "referrers",
  "/sites/:siteToken": "siteDetails",
  "/time": "time",
  "/timeSeries,/timeSeries/:mode": "timeSeries",
  "/visitors": "visitors",
  "/visitors/:visitorID": "visitorInfo"
}						
functions

Functions responds with a list of all available API functions and their URLs.


HTTP 200 : geo Model GET/geo
						{
  "list": [],
  "cardinality": 0
}						
geo

The geo function responds with the specified site's visitors' locations.


Test console
Description
Parameter
string

An MD5 hash of a page's URL to filter results by that specific page.

page

Optional

string

Specify referrer (not a spelling mistake)

referer

Optional

string

Specify organics

organic

Optional

string

This parameter allows you to specify what campaign you'd like to filter results by.

campaign

Optional

string

Specify what type of visitors to get the data for, 'all', 'returning' and 'tagged' are valid. Defaults to 'all'.

visitorsMode

Optional

string

The response presenter, accepts old/plain. Defaults to plain.

presenter

Optional

string

The maximum number of visitors to respond with.

limit

Optional

HTTP 200 : ignoredVisitors Model GET/ignoredVisitors
						{
  "list": [],
  "cardinality": 0
}						
ignoredVisitors

Retrieves a list of ignored visitors. This list comprises numerical visitor IDs in an array. To add or remove visitors IDs to the list, use the POST and DELETE HTTP methods.


HTTP 200 : organics Model GET/organics
						{
  "list": [],
  "cardinality": 0
}						
organics

The organics function returns the search providers and queries that referred users to the site.


Test console
Description
Parameter
string

An MD5 hash of the page to filter by.

pageHash

Optional

string

The maximum number of organics to respond with. Defaults to 100. An offset can be specified too, e.g. 100,200 will return the 100th to 200th organics.
Example: 100

limit

Required

HTTP 200 : overview Model GET/overview
						{
  "visitors": 0,
  "returning": 0,
  "pages": 0,
  "active": 0,
  "tagged": 0,
  "summaries": {
    "range": {
      "from": "2013-07-09 23:20:00",
      "to": "2013-07-16 23:20:00"
    },
    "list": {}
  }
}						
overview

The overview function responds with summary data for the site, including people online, the number of active pages and more.


Test console
Description
Parameter
string

The timestamp/date to start the summary data from.

from

Required

string

The timestamp/date to retreive summary data until.

to

Required

string

The response presenter, accepts old/plain. Defaults to plain.

presenter

Required

HTTP 200 : pages Model GET/pages
						{
  "list": [],
  "cardinality": 0
}						
pages

The pages function returns the pages currently active on the site, ordered by the number of visitors online.


Test console
Description
Parameter
string

The format to respond with. Defaults to pageList.

presenter

Required

string

The maximum number of pages in the response. Defaults to 100. Offsets can be specified - e.g. 100,120.
Example: 100

limit

Required

HTTP 200 : referrers Model GET/referrers
						{
  "cardinality": 0,
  "list": []
}						
referrers

The referrers function responds with the websites that have referred users to the site along with the number of visitors currently active from that URL.


Test console
Description
Parameter
string

An MD5 hash of the page to filter by.

page

Optional

string

Defaults to plain.

presenter

Optional

string

The maximum number of referrers to respond with. Defaults to 200.
Example: 200

limit

Required

HTTP 200 : reportPreferences Model GET/reportPreferences{route}
						{}						
reportPreferences

This function is not stable, and is subject to change. Beware! Retrieve your site and user report preferences. Can be changed and deleted using other methods. Report Preferences for specific sites can be accessed, changes or deleted by using /reportPreferences/site_token. The object can also be expored using the URL route.


Test console
Description
Parameter
string

The route of the response object to follow, for example a site token to access site specific report preferences.
Example: /

route

Required

HTTP 200 : sites Model GET/sites
						{
  "owned": [
    {
      "id": 42961,
      "name": "http://www.mashape.com",
      "domain": "www.mashape.com",
      "url": "http://www.mashape.com",
      "acct": "GSN-772345-E",
      "tracker_installed": 0,
      "owner_id": 41106,
      "date_added": 1373936861,
      "limit_reached": 0,
      "timezone": "America/Los_Angeles",
      "search_term": "",
      "image": "thumbs.gosquared.com/GSN-772345-E",
      "token": "GSN-772345-E",
      "share_list": [
        {
          "id": "41106",
          "email": "alex@mashape.com",
          "state": "owner"
        }
      ]
    }
  ],
  "shared": []
}						
sites

The sites function will respond with a list of all of the sites that the user's API Key has access, split by whether or not they are shared sites. If a site token is provided, it will provide the details of just that site.


Test console
Description
Parameter
string

The site token that you would like to retreive the details for.

site_token

Required

HTTP 200 : time Model GET/time
						{
  "time": 1374018077338
}						
time

The time function responds with the current timestamp.


HTTP 200 : timeSeries Model GET/timeSeries
						{}						
timeSeries

The timeSeries function responds with the number of concurrent visitors over time, as the metric visitors.total.


Test console
Description
Parameter
string

The date to start retreiving results from. See https://www.gosquared.com/developer/latest/timeSeries/ for Accepted formats.

from

Optional

string

The date to end retreiving results from.

to

Optional

string

The metrics to receive in the response, e.g. visitors.total
Example: visitors

metrics

Optional

string

The interval to get figures for. TimeSeries averages the number of visitors over the interval to give a more useful result. Defaults to 5min

interval

Optional

string

The timezone. Default UTC.

timezone

Required

string

The response format. Defaults to json. CSV is also valid.

type

Required

HTTP 200 : visitors Model GET/visitors
						{
  "list": [],
  "cardinality": 0
}						
visitors

The visitors function responds with detailed information about the current visitors on the site. They can be filtered by multiple parameters. It can also get information for a specific visitor ID by defining the visitorID parameter.


Test console
Description
Parameter
string

The ID of the visitor to get data for.

visitorID

Required

string

The number of visitors to retrieve back, with an offset if desired. Defaults to 0,100.

limit

Optional

string

An MD5 hash of the page to filter by.

page

Optional

string

A referrer to filter results by.

referrer

Optional

string

An organic to filter results by.

organic

Optional

string

A campaign to filter results by.

campaign

Optional

string

What type of visitors to respond with. Defaults to all

visitorsMode

Optional

string

The response presenter, accepts old/plain. Defaults to plain.

presenter

Optional

Consume this API completely for free!


By joining the mashape API marketplace you can start using GoSquared API today!

Login to your account or signup: Create Account

or
   Signup with GitHub

By signing up you agree to our terms of service.