twitter.domains

A list of the domains from links mentioned in a Tweet.

Remember that Twitter has an automated link shortener which converts links mentioned in a Tweet into links belonging to the t.co domain. The twitter.domains target contains the unwrapped version of the link, not the t.co shortened version.

The author of the Tweet might have shortened a link already; they might have converted apple.com, for example, into a bit.ly shortened link. Twitter's automatic shortener might, in turn, convert that bit.ly link into a t.co link. In this example, the twitter.domains target unwraps the t.co link to a bit.ly link, but it does not resolve that bit.ly link all the way back to the original apple.com link. In other words, if a link has been shortened, the process always performs one unwrap but no more.

DataSift has a powerful link aggregator of its own, the Links Augmentation, which fully resolves links back to the page they point to. Take a look at the links.domain target.

Examples

Filter for Tweets that include links to Apple.com. Note that the target is an array and we are filtering for just one value so we use the == operator rather than contains:

twitter.domains == "apple.com"

Filter for Tweets that include links to google.com or microsoft.com. Note that the target is an array and we are filtering for a value from a list so we use the in operator rather than contains:

twitter.domains in "google.com, microsoft.com"

Resource information

Target service: Twitter

Target object: Twitter: Tweet

Type: array(string)

Array: Yes

Always exists: No