Domains

/v3/bitly_pro_domain

Query whether a given domain is a valid bitly pro domain. Keep in mind that bitly custom short domains are restricted to less than 15 characters in length.

Authentication: oauth2

Parameters

  • domain - A short domain. ie: nyti.ms.

Return Values

  • bitly_pro_domain - 0 or 1 designating whether this is a current bitly domain.
  • domain - an echo back of the request parameter.

Example Request

API Address: https://api-ssl.bitly.com
GET /v3/bitly_pro_domain?access_token=ACCESS_TOKEN&domain=1.usa.gov

Example Response

{
  "data": {
    "bitly_pro_domain": true,
    "domain": "1.usa.gov"
  },
  "status_code": 200,
  "status_txt": "OK"
}

/v3/user/tracking_domain_clicks

Returns the number of clicks on Bitlinks pointing to the specified tracking domain that have occured in a given time period.

Users can register a tracking domain from their bitly settings page.

Authentication: oauth2

Errors

  • 500, TRACKING_DOMAIN_NOT_REGISTERED

Parameters

  • domain - a tracking domain as returned from /v3/user/tracking_domain_list.

  • unit - minute, hour, day, week or month, default: day
    Note: when unit is minute the maximum value for units is 60.

  • units - an integer representing the time units to query data for. Pass -1 to return all units of time.
  • timezone - an integer hour offset from UTC (-14 to 14), or a timezone string default: America/New_York.
  • rollup - true or false. Return data for multiple units rolled up to a single result instead of a separate value for each period of time.
  • limit - 1 to 1000 (default=100).
  • unit_reference_ts - an epoch timestamp, indicating the most recent time for which to pull metrics, default: now.
    Note: the value of unit_reference_ts rounds to the nearest unit.
    Note: historical data is stored hourly beyond the most recent 60 minutes. If a unit_reference_ts is specified, unit cannot be minute.

Return Values

  • tz_offset - the offset for the specified timezone, in hours.
  • unit - an echo of the specified unit value.
  • units - an echo of the specified units value.
  • tracking_domain_clicks - the number of the number of clicks on Bitlinks pointing to the specified tracking domain in the specified time.

Example Request

API Address: https://api-ssl.bitly.com
GET /v3/user/tracking_domain_clicks?access_token=ACCESS_TOKEN&domain=usa.gov

Example Response

{
  "data": {
    "tracking_domain_clicks": 206,
    "tz_offset": -4,
    "unit": "day",
    "units": -1
  },
  "status_code": 200,
  "status_txt": "OK"
}

/v3/user/tracking_domain_shorten_counts

Returns the number of links, pointing to a specified tracking domain, shortened (encoded) in a given time period by all bitly users.

Users can register a tracking domain from their bitly settings page.

Authentication: oauth2

Errors

  • 500, TRACKING_DOMAIN_NOT_REGISTERED

Parameters

  • domain - a tracking domain as returned from /v3/user/tracking_domain_list.
  • unit - minute, hour, day, week or month, default: day
    Note: when unit is minute the maximum value for units is 60.
  • units - an integer representing the time units to query data for. Pass -1 to return all units of time.
  • timezone - an integer hour offset from UTC (-14 to 14), or a timezone string default: America/New_York.
  • rollup - true or false. Return data for multiple units rolled up to a single result instead of a separate value for each period of time.
  • limit - 1 to 1000 (default=100).
  • unit_reference_ts - an epoch timestamp, indicating the most recent time for which to pull metrics, default: now.
    Note: the value of unit_reference_ts rounds to the nearest unit.
    Note: historical data is stored hourly beyond the most recent 60 minutes. If a unit_reference_ts is specified, unit cannot be minute.

Return Values

  • tz_offset - the offset for the specified timezone, in hours.
  • unit - an echo of the specified unit value.
  • units - an echo of the specified units value.
  • tracking_domain_shorten_counts - the number of links to the specified tracking domain shortened (encoded) by all bitly users in the specified time.

Example Request

API Address: https://api-ssl.bitly.com
GET /v3/user/tracking_domain_shorten_counts?access_token=ACCESS_TOKEN&domain=usa.gov

Example Response

{
  "data": {
    "tracking_domain_shorten_counts": 88,
    "tz_offset": -4,
    "unit": "day",
    "units": -1
  },
  "status_code": 200,
  "status_txt": "OK"
}