Sources
Retrieve historic Sources data
GETtrends/sources
Retrieves a historical list of sources that have referred visitors to the site, grouped by 'direct', 'organic', 'site' and 'social'.
Query String Parameters
from | String The start date-time for the query |
to | String The end date-time for the query |
dateFormat | String The format that any date parameters will be returned in. This takes any value permitted by Moment. |
format | StringDefault Value: Accepted values: The response format required (overrides header) |
group | BooleanDefault Value: Used in conjunction with a sourceType, groups list by common source. For site sourceType, groups by site domain. For organic sourceType, groups by search engine. For social sourceType, groups by social site domain. |
limit | StringDefault Value: The maximum number of results e.g. |
sourceType | String Accepted values: Retrieve only the results for the given source type |
Example Request
var GoSquared = require('gosquared');
var gosquared = new GoSquared({
api_key: 'demo',
site_token: 'GSN-106863-S'
});
gosquared.trends.v2.sources(function(err, res) {
if (err) return console.log(err);
console.log(res);
});
Live Responseundefined undefined
Your API Key is not authorised for this endpoint
Please fill in the required fields in the Query Builder
Retrieve sources by group
GETtrends/sources/{sourceType}
Retrieves a historical list of sources for the given section.
Path Parameters
sourceType | StringRequired Accepted values: Retrieve a list of items for given source type |
Query String Parameters
from | String The start date-time for the query |
to | String The end date-time for the query |
dateFormat | String The format that any date parameters will be returned in. This takes any value permitted by Moment. |
format | StringDefault Value: Accepted values: The response format required (overrides header) |
group | BooleanDefault Value: Used in conjunction with a sourceType, groups list by common source. For site sourceType, groups by site domain. For organic sourceType, groups by search engine. For social sourceType, groups by social site domain. |
limit | StringDefault Value: The maximum number of results e.g. |
Example Request
var GoSquared = require('gosquared');
var gosquared = new GoSquared({
api_key: 'demo',
site_token: 'GSN-106863-S'
});
gosquared.trends.v2.sources.{sourceType}(function(err, res) {
if (err) return console.log(err);
console.log(res);
});
Live Responseundefined undefined
Your API Key is not authorised for this endpoint
Please fill in the required fields in the Query Builder