Paste a long URL and get a clean, shareable short link instantly. Powered by onoe.in.
By using this service you agree not to shorten spam or malicious URLs.
onoe.in/g?launch.Shorten a long URL. Optionally specify a custom code and/or expiry.
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | required | The long URL to shorten |
| api_key | string | required | Your API key (or use X-API-Key header) |
| custom_code | string | optional | Desired short code (3–20 chars, alphanumeric) |
| ttl_days | integer | optional | Days until the link expires |
# Example Request
curl -X POST https://onoe.in/api.php?action=shorten \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/very/long/url/here"}'
# Response
{
"success": true,
"short_url": "https://onoe.in/g?JxkwE",
"code": "JxkwE",
"long_url": "https://example.com/very/long/url/here"
}
Retrieve click statistics for a short link.
# Example Request
curl "https://onoe.in/api.php?action=stats&code=JxkwE" \
-H "X-API-Key: YOUR_API_KEY"
# Response
{
"success": true,
"stats": {
"code": "JxkwE",
"short_url": "https://onoe.in/g?JxkwE",
"long_url": "https://example.com/very/long/url/here",
"clicks": 142,
"created_at": "2025-01-15 10:30:00",
"expires_at": null
}
}
async function shortenUrl(longUrl, apiKey) {
const res = await fetch('https://onoe.in/api.php?action=shorten', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': apiKey
},
body: JSON.stringify({ url: longUrl })
});
const data = await res.json();
if (data.success) {
console.log('Short URL:', data.short_url);
}
}
shortenUrl('https://your-long-url.com/path', 'YOUR_API_KEY');