Hi, The problem is: how to find tweets that point to a certain URL. Most of those tweets would use a shortened version of the URL, and most of them probably bit.ly. Bit.ly does not provide a way to list all shortened versions of a URL, and creates individually shortened versions of each URL per User (namely, the twitter user, so there is no way to find the URL that is created via Twitter status updates - which would probably be the most common URL).
I thought I had found a way to at least approximate searching for bit.ly-masked references on twitter with the /stats method from bitly. Giving a bitly hash, the /stats method lists referrers by urls, which might look like this (part of a /stats response): "twitter.com": { "/": 1, "/testFollowAPI": 1 } } So I figured that I could then take all the paths that are not common Twitter paths (like /home, /, /replies, /favorites, /inbox) and assume that they are twitter accounts. Then I searched Twitter for tweets from these accounts containing "bit.ly". For each hit, I would then again ask bit.ly to expand the bit.ly url in the tweet. With any luck, I would find the tweet referencing the url. Apart from the fact that it is a pretty wasteful process (lots of calls to bitly and also to Twitter search), I only just realized that of course /stats only lists references when somebody has clicked on a bit.ly URL. Since I don't expect many people to click on the URL on a user's profile page, the utility of this approach is greatly diminished. I think most of the referrers would just be /home if users click on tweets in their stream. I don't suppose Twitter would be willing to "click" on each incoming bit.ly link with referrer from the tweeting user's page at least once? ;-) I gave the long story because I want to emphasize that as far as I know, there still is no proper solution to this. Bit.ly does NOT provide a way to list all shortened versions of an URL. If there is such a method, please point me to it, because I just don't see it. I filed an issue for this a while ago, but it was closed with the announcement that it would be solved sometime in the future. Unfortunately there was not new "issue" or "feature" created that I could track to see when it would be solved. The original issue is here: http://code.google.com/p/twitter-api/issues/detail?id=402 Sorry for the long post - I just wasted so much time trying to work around the issue, and only realized the flaws in the approach right now... Björn