views:

25

answers:

2

Basically I want to know how many people have tweeted a link to a url, but since there are dozens of link shortener out there I don't see any way to do this without having access to all of their url maps. I found a previous question here but it was over a year old and didn't have any new answers.

So #1, does anyone know of a service/API for doing this?

And #2, can anyone think of a way to accomplish this task other than submitting the long url in question to all the popular link shortening sites?

ps- I'm also open to comments about why this is impossible or impractical.

+2  A: 

You could perform a Google search (or the equivalent via API) for any pages that link to your page. This is done with the link: keyword. So if you're trying to figure out how many people link to www.example.com (regardless of whether it's through a link shortner URL), then you would just do a Google search for link:www.example.com.

e.g.: http://www.google.com/search?q=link:www.example.com

Note that this will only find pages that have been indexed, so pages that haven't been crawled, or pages that get crawled infrequently, will not show up in the results until a later date (if at all).

Matt Huggins
Doug
If someone has a better solution, I'd love to hear it. I don't know what it would be though! :)
Matt Huggins
A: 

Since all sites have different algorithms for shortening the URLs, and these are different sites that most likely do not share their data with each other, how can you hope to find all of them in a single or small number of queries?

All you can do is brute-force it, and even then this might not be any good if a site is content to create a new value for the same long-form URL (especially if you send a different long-form URL that maps to the same place, like http://www.stackoverflow.com/ rather than http://stackoverflow.com/).

In order to really get this to work, there would have to be a site that ALREADY automatically collects all of this information from every site, which the URL shortening sites voluntarily call. And even if you wrote such a site, that doesn't account for the URL-shortening sites already out there who already have data!

In short, I do not see how this is remotely possible, unless I'm wrong about there being such a database somewhere out there.

Platinum Azure