Matching keywords with Tweet results in Filter API



I’m using the Filter API and am tracking multiple keywords. I am looking at various methods on organizing each Tweet returned according to the Keyword used to find it.

This appears to be fairly straight-forward. Basically, I am just searching for my keywords within the Text and “marking” the Tweet accordingly.

However, there are cases where I am not sure whether or not I am following Twitter’s algorithm. For example, what happens if I were to search for a Term such as “Twitter Developer”? Does it literally only return Tweets that include (case-insensitive, I’m sure) the literal sub-string “Twitter Developer”? Or, does it also return permutations of that string, such as “Twitter” or “Developer”? Are there any other weird results that I may not know about?

I’m just trying to create a fairly reliable implementation, staying as close to Twitter’s algorithm as possible. It’d be great if this data was actually included in the Tweet objects received in the Stream :wink:


  • Kurtis


Also; I should mention. There may be cases where punctuation or other “weird” characters are included. Does Twitter deal with this in a special way?

I suppose the overall question is, how does Twitter decide which Tweets match a given keyword?

Thanks ahead of time.




We detail our strategy for track matching here:


Thanks! I’m still a little fuzzy on a few details but this clarifies quite a bit. I’m surprised I wasn’t able to find it while searching around.