短縮URLサービス bit.lyのAPI
bit.ly サイト: http://bit.ly/
GoogleCodeにあがっているAPIのドキュメント: http://code.google.com/p/bitly-api/wiki/ApiDocumentation
・現在のAPIバージョンは「2.0.1」(09/05/19)
・APIを使用するための注意点
すべてのAPIがHTTP Basic Authenticationを使用することで供給された認証資格証明書を必要とします。 もしくは、 query arguments: login=login&apiKey=apiKey でも良い。
・一つのIPアドレスから同時接続の制限数
5つ未満
・他必要なパラメーター一覧
| 項目 | パラメーター |
| バージョン | version=2.0.1 |
| フォーマット | format=json or format=xml |
| コールバック | callback=callback |
・REST API
| 項目 | 詳細 | 例 |
| /shorten | 長いURLを引数で渡した場合に「hash」「shortUrl」「userHash」が返ってくる | http://api.bit.ly/shorten?version=2.0.1&longUrl={URLを記述}&login={APILogin}&apiKey={APIKey} |
| /expand | shotrenにより作成した「hash」もしくは「shortUrl」を引数で渡した場合、元のURLが「hash」をキーとして返ってくる | http://api.bit.ly/expand?version=2.0.1&shortUrl={shortUrl}&login={APILogin}&apiKey={APIKey} |
| /info | URL先の情報が返ってくる | http://api.bit.ly/info?version=2.0.1&shortUrl={shortUrl}&login={APILogin}&apiKey={APIKey} |
| /states | トラフィックとリファラーデータが返ってくる | http://api.bit.ly/stats?version=2.0.1&shortUrl={shortUrl}&login={APILogin}&apiKey={APIKey} |
| /errors | APIのエラーリストが返ってくる | http://api.bit.ly/errors?version=2.0.1&login={APILogin}&apiKey={APIKey} |
