API reference / Analytics
Get the search keywords
The Google searches that brought visitors in the period, from the Google Search Console connection of the workspace. Each search has its clicks, impressions, CTR, average position and the revenue that it probably brought. Troopy splits the Google revenue of each landing page among the searches that led there, by their clicks. A page filter keeps only the pages that contain it. connected is false until the workspace connects Search Console in Settings > Apps.
/api/v1/analytics/keywordsOther ways to call it
troopy analytics keywordstroopy_get_analytics_keywordsQuery parameters
periodenum<string>now is the last 10 minutes. 7d and 30d end today. 3m, 6m and 12m are whole months that end with this month. week starts on Monday. custom needs from and to
nowtodayyesterday24h7d30d3m6m12mweekmonthyearallcustom
Default "30d"
fromstringYYYY-MM-DD, in the workspace's time zone
date
tostringYYYY-MM-DD. The period includes this day
date
compareenum<string>Also gives another window: previous is the window just before, with the same length. year is the same days a year before. custom is compare_from to compare_to
previousyearcustom
compare_fromstringWith compare custom: the first day of the other window
date
compare_tostringWith compare custom: the last day of the other window
date
filter_channelstringchannel: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_referrerstringreferrer: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_utm_sourcestringutm source: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_utm_mediumstringutm medium: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_utm_campaignstringutm campaign: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_utm_termstringutm term: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_utm_contentstringutm content: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_refstringref: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_sourcestringsource: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_viastringvia: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_pagestringpage: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_entry_pagestringentry page: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_exit_pagestringexit page: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_hostnamestringhostname: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_countrystringcountry: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_regionstringregion: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_citystringcity: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_languagestringlanguage: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_browserstringbrowser: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_osstringos: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_devicestringdevice: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_screenstringscreen: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_goalstringgoal: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_propertystringVisitors who sent a goal with a property: op:name=value[,name=value], such as is:plan=pro. The op is one of is, is_not, contains, does_not_contain, matches and does_not_match
At most 500 characters
filter_visit_countstringSessions by the visitor's visit number: is:1 (new), gte:2 (returning), lte, is_not
At most 500 characters
limitintegerDefault 10 · At least 1 · At most 500
Response
200 · application/jsondata*object5 properties
connected*booleanavailable*booleanfalse when this server has no Google client to connect Search Console with
property*string | nullThe Search Console property that Troopy read, or null when nobody chose one
keywords*array<object>6 properties
query*stringclicks*integerimpressions*integerctr*number0 to 1
position*numberThe average position. 1 is the top
revenue*integerAn estimate, in minor units
total*integer