Database Reference
In-Depth Information
The
bit.ly API
lets you access analytics information for a URL that's been shortened. If you're
starting of with a full URL, you'll need to call the
lookup function
to obtain the short URL. You
can
sign up for API access here
.
This is most useful if you want to gauge the popularity of a site,
either so you can sort and ilter links you're displaying to a user or to feed into your own analysis
algorithms:
curl "http://api.bit.ly/v3/clicks?login=<login>&apiKey=<key>&\
shortUrl=http://bit.ly/hnB7HI"
{"status_code": 200, "data": {
"clicks": [{
"short_url": "http://bit.ly/hnB7HI",
"global_hash": "gKGd7s",
"user_clicks": 9,
"user_hash": "hnB7HI",
"global_clicks": 36}]},
"status_txt": "OK"
}
The
Compete API
gives a very limited amount of information on domains, a trust rating, a rank-
ing for how much traic a site receives, and any online coupons associated with the site. Unfor-
tunately, you don't get the full traic history information that powers the popular graphs on the
web interface. The
terms of service
also rate-limit you to 1,000 calls a day, and you can't retain
any record of the information you pull, which limits its usefulness:
curl "http://api.compete.com/fast-cgi/MI?d=google.com&ver=3&apikey=<key>&size=large"
<ci>
<dmn>
<nm>google.com</nm>
<trust caption="Trust">
<val>green</val>
<link>http://toolbar.compete.com/trustgreen/google.com</link>
<icon>...</icon>
</trust>
<rank caption="Profile">
<val>1</val>
<link>http://toolbar.compete.com/siteprofile/
google.com</link>
<icon>...</icon>