Public bitly Data

There are many ways to find bitly data to begin working with. Using the bitly API's user-level link history and analytics endpoints, any user's bitly links can automatically be imported into your application. Additionally, link-level analytics endpoints can be used to get information about any publicly exoposed bitly link, including the millions found on social networks such as Twitter and Facebook.

We are always looking to expose more interesting data sets to the bitly developer community. If you have access to such data and you'd like to work with bitly on making it available publicly, please contact us at api@bitly.com.

1.USA.gov Data

Through a partnership with Measured Voice and the US Government, the data set containing all clicks on most .gov and .mil addresses is publicly available here. This data can be consumed as a realtime PubSub stream, and is stored in hourly archive as well.

Bitly For Feelings Data

We provide a raw pub/sub feed of data created whenever anyone clicks on a Bitly For Feelings link. The pub/sub endpoint responds to HTTP requests and returns a stream of JSON entries, one per line, that represent real-time clicks.

Stream Endpoint

https://pubsub.bitly.net/feelings/decodes

Parameters

Example Request

curl -s https://pubsub.bitly.net/feelings/decodes?access_token=ACCESS_TOKEN

Guide to the Data

Important Note: In addition to click entries, the pub/sub stream will also include a periodic "heartbeat" entry. This message is intended to maintain the HTTP connection even if there are no click entries to be sent to the requester. Heartbeat messages can be ignored.

The JSON data dictionary is as follows:

{
    "a": USER_AGENT,
    "c": COUNTRY_CODE, # 2-character ISO code
    "cy": GEO_CITY_NAME,
    "g": GLOBAL_BITLY_HASH,
    "gr": GEO_REGION,
    "h": ENCODING_USER_BITLY_HASH,
    "hh": SHORT_URL_CNAME, # one of the bitly-for-feelings domains
    "ll": [LATITUDE, LONGITUDE],
    "r": REFERRING_URL,
    "t": TIMESTAMP,
    "tz": TIMEZONE, # in http://en.wikipedia.org/wiki/Zoneinfo format
    "u": LONG_URL
}

The JSON responses may omit some of these data points (for example, if geographic information is not available).

Heartbeat messages will appear every 30 seconds and can be ignored.

{
    "_heartbeat_": TIMESTAMP
}

Feelings Domains

The list of feelings domains is currently as follows: