Does track keywords do a search on expanded urls?



I would like to track all the tweets that mentions my website (lets say I can specify track keywords as google, com and write some custom code to filter tweets that contains urls or subdomains of this url as suggested in the twitter documentation. But does the api also return the tweets that has (or sub domains) posted using url shorteners (which is not



Hi Aditya,

Matching is performed on the contents of the entities.urls array. When shortened URLs are posted as part of the tweet this metadata will only include the shortened url, the display_url (as written in the Tweet body)… and in this case the expanded_url is essentially the same as the display_url. So in this case there would be no matching for terms in the non-shortened URL. (I included a JSON example below)

For what it is worth, Gnip (Twitter’s “enterprise data” provider) Activity Stream format includes a fully expanded URL. For more information, see

"entities": {
    "urls": [
        "url": "http:\/\/\/SoaTsqt47v",
        "expanded_url": "http:\/\/\/xYe5Qh",
        "display_url": "\/xYe5Qh",
        "indices": [


Thanks for the response, Snowman. Gnip’s twitter activity stream might be a better fit for us given we want the filters to work on shortened url’s using third party services.