url.ext.io is a fast, simple link shortener service that lets you create concise, shareable links.
features:
built with ❤️ by the smplstuff team
powered by flask and modern web technologies
url.ext.io provides a simple REST API for programmatically creating and managing shortened URLs.
Base URL: https://url.ext.io/api/v1
-h uppercase).
/shorten
Create a shortened URL
{
"url": "https://example.com/very/long/url",
"custom_code": "mycode" // optional
}
{
"original_url": "https://example.com/very/long/url",
"short_code": "mycode",
"short_url": "https://url.ext.io/mycode",
"expires_at": "2025-06-15T12:30:45" // null for authenticated users
}
curl -X POST https://url.ext.io/api/v1/shorten \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/very/long/url"}'
/stats/{short_code}
Get statistics for a shortened URL (requires authentication)
{
"short_code": "mycode",
"original_url": "https://example.com/very/long/url",
"created_at": "2025-06-12T12:30:45",
"expires_at": null,
"total_clicks": 42
}
curl https://url.ext.io/api/v1/stats/mycode \
-H "Authorization: Bearer YOUR_API_TOKEN"
/link/{short_code}
Delete a shortened URL (requires authentication)
curl -X DELETE https://url.ext.io/api/v1/link/mycode \
-H "Authorization: Bearer YOUR_API_TOKEN"
/api/v1/user/links
Get all links created by the authenticated user
{
"links": {
"abc123": {
"url": "https://example.com/very/long/url",
"created_at": "2023-05-01T12:30:45",
"clicks": 42
},
"xyz789": {
"url": "https://another-example.com/page",
"created_at": "2023-05-15T08:15:30",
"clicks": 17
}
}
}
curl https://url.ext.io/api/v1/user/links \
-H "Authorization: Bearer YOUR_API_TOKEN"
/api/v1/user/tokens
Get all API tokens for the authenticated user
{
"tokens": [
{
"token": "abc12...def9",
"created_at": "2023-05-01T12:30:45",
"expires_at": "2023-06-01T12:30:45"
},
{
"token": "xyz78...ghi3",
"created_at": "2023-05-15T08:15:30",
"expires_at": "2023-06-15T08:15:30"
}
]
}
curl https://url.ext.io/api/v1/user/tokens \
-H "Authorization: Bearer YOUR_API_TOKEN"
/api/v1/user/tokens
Revoke an API token
{
"token": "your_full_api_token_here"
}
{
"success": true
}
curl -X DELETE https://url.ext.io/api/v1/user/tokens \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"token": "full_token_to_revoke"}'
For authenticated API requests, you need to include your API key in the Authorization header.
/auth/token
Get an API token with your username and password
{
"username": "your_username",
"password": "your_password",
"expires_in": 90 // optional, days until expiry (1-365, default: 30)
}
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": "2025-07-12T12:30:45"
}
curl -X POST https://url.ext.io/api/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"username": "your_username", "password": "your_password", "expires_in": 90}'
Anonymous users: 10 requests per minute
Authenticated users: 60 requests per minute
// Example: Create a shortened URL
async function shortenUrl(url, customCode = null) {
const response = await fetch('https://url.ext.io/api/v1/shorten', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: url,
custom_code: customCode
}),
});
return await response.json();
}
// Usage
shortenUrl('https://example.com/very/long/url')
.then(data => console.log(data.short_url))
.catch(error => console.error('Error:', error));
import requests
# Example: Create a shortened URL
def shorten_url(url, custom_code=None):
payload = {"url": url}
if custom_code:
payload["custom_code"] = custom_code
response = requests.post(
"https://url.ext.io/api/v1/shorten",
json=payload
)
return response.json()
# Usage
result = shorten_url("https://example.com/very/long/url")
print(result["short_url"])
$url);
if ($custom_code) {
$payload["custom_code"] = $custom_code;
}
$ch = curl_init("https://url.ext.io/api/v1/shorten");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
// Usage
$result = shorten_url("https://example.com/very/long/url");
echo $result["short_url"];
?>
# Create a shortened URL
curl -X POST https://url.ext.io/api/v1/shorten \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/very/long/url"}'
# Create a shortened URL with custom code (authenticated)
curl -X POST https://url.ext.io/api/v1/shorten \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{"url": "https://example.com/very/long/url", "custom_code": "mycode"}'
# Get link statistics
curl https://url.ext.io/api/v1/stats/mycode \
-H "Authorization: Bearer YOUR_API_TOKEN"
# Get all user links
curl https://url.ext.io/api/v1/user/links \
-H "Authorization: Bearer YOUR_API_TOKEN"
# Delete a link
curl -X DELETE https://url.ext.io/api/v1/link/mycode \
-H "Authorization: Bearer YOUR_API_TOKEN"
# Get auth token (default 30 day expiry)
curl -X POST https://url.ext.io/api/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"username": "your_username", "password": "your_password"}'
# Get auth token with custom expiry (90 days)
curl -X POST https://url.ext.io/api/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"username": "your_username", "password": "your_password", "expires_in": 90}'
# Revoke token
curl -X DELETE https://url.ext.io/api/v1/user/tokens \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"token": "full_token_to_revoke"}'
Are you sure you want to delete this link? This action cannot be undone.