API reference / Analytics
Get the mentions on X and Reddit
The posts on X and Reddit in the period that name the domain of the site, or the words and handles of its settings. It also gives each X post, or link in the bio of a handle, whose t.co link brought visits in the period. Each has those visitors and their revenue. The most visitors come first, then the newest.
/api/v1/analytics/mentionsOther ways to call it
troopy analytics mentionstroopy_get_analytics_mentionsQuery 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 50 · At least 1 · At most 200
searchstringOnly posts whose text or author contains these words, any case
At most 100 characters
platformenum<string>Only the posts of one platform
xreddit
trafficboolean | enum<string>Only posts whose links brought visits in the period
truefalse
Response
200 · application/jsondata*array<object>9 properties
platform*enum<string>xreddit
text*stringauthor*string@handle on X, u/name on Reddit
url*string | nullat*string | nullWhen the author posted it. null for a link in a bio
score*integerLikes on X, upvotes on Reddit
comments*integervisitors*integerThe visitors in the period from its t.co links. Only X posts have them
revenue*integerTheir revenue, minor units