URL shortener and link management
Bitly provides a URL shortener and link management API to shorten long URLs and manage links.
import requests
url = "https://api-ssl.bitly.com/v4/shorten"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
}
data = {
"long_url": "https://www.example.com"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())Last 50 checks (10 min intervals)