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 -
0or1designating 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 bitly links 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,weekormonth, default:day
Note: whenunitisminutethe maximum value forunitsis60. - units - an integer representing the time units to query data for. Pass
-1to return all units of time. - timezone - an integer hour offset from UTC (-14 to 14), or a timezone string default:
America/New_York. - rollup -
trueorfalse. 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 ofunit_reference_tsrounds to the nearestunit.
Note: historical data is stored hourly beyond the most recent 60 minutes. If aunit_reference_tsis specified,unitcannot beminute.
Return Values
- tz_offset - the offset for the specified
timezone, in hours. - unit - an echo of the specified
unitvalue. - units - an echo of the specified
unitsvalue. - tracking_domain_clicks - the number of the number of clicks on bitly links 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,weekormonth, default:day
Note: whenunitisminutethe maximum value forunitsis60. - units - an integer representing the time units to query data for. Pass
-1to return all units of time. - timezone - an integer hour offset from UTC (-14 to 14), or a timezone string default:
America/New_York. - rollup -
trueorfalse. 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 ofunit_reference_tsrounds to the nearestunit.
Note: historical data is stored hourly beyond the most recent 60 minutes. If aunit_reference_tsis specified,unitcannot beminute.
Return Values
- tz_offset - the offset for the specified
timezone, in hours. - unit - an echo of the specified
unitvalue. - units - an echo of the specified
unitsvalue. - 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"
}