Skip to content

Instantly share code, notes, and snippets.

@ianjennings
Last active December 12, 2015 09:39
Show Gist options
  • Save ianjennings/4753122 to your computer and use it in GitHub Desktop.
Save ianjennings/4753122 to your computer and use it in GitHub Desktop.

bit.ly api one liners

Full docs here: http://dev.bitly.com/api.html

Replace [your api token] with your api token from: https://bitly.com/a/oauth_apps

Libraries for many languages found here: http://dev.bitly.com/code_libraries.html

Codecademy course found here: http://blog.bitly.com/post/40103601203/hack-at-bitlys-api-with-our-new-class-on-codecademy

This example uses mjson to prettypring the JSON output.

bursting_phrases

Returns phrases that are receiving an uncharacteristically high volume of click traffic, and the individual links (hashes) driving traffic to pages containing these phrases.

http://dev.bitly.com/data_apis.html#v3_realtime_bursting_phrases

curl https://api-ssl.bitly.com/v3/realtime/bursting_phrases?access_token=[your api token] | python -mjson.tool

hot_phrases

Returns phrases that are receiving a consistently high volume of click traffic, and the individual links (hashes) driving traffic to pages containing these phrases.

http://dev.bitly.com/data_apis.html#v3_realtime_hot_phrases

curl https://api-ssl.bitly.com/v3/realtime/hot_phrases?access_token=[your api token] | python -mjson.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment