The Shortly API allows you to programmatically create and manage short URLs. All API endpoints return JSON responses and use standard HTTP status codes.
https://88d.in/api
All responses are in JSON format with the following structure:
{
"success": true,
"data": { ... },
"error": null
}
Currently, all endpoints are public and don't require authentication. User authentication will be added in a future version.
Rate limit information is returned in response headers:
X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-Reset
/api/shorten
{
"original_url": "https://example.com/very/long/url",
"custom_alias": "my-link" // optional
}
{
"short_url": "https://88d.in/abc123",
"original_url": "https://example.com/very/long/url",
"short_code": "abc123",
"qr_code_url": "https://88d.in/qr/abc123"
}
curl -X POST https://88d.in/api/shorten \
-H "Content-Type: application/json" \
-d '{
"original_url": "https://example.com/very/long/url",
"custom_alias": "my-link"
}'
/api/info/{short_code}
{
"short_code": "abc123",
"original_url": "https://example.com/very/long/url",
"title": "Example Page",
"description": "This is an example page",
"click_count": 42,
"created_at": "2024-01-15T10:30:00Z",
"last_click_at": "2024-01-15T15:45:00Z"
}
curl https://88d.in/api/info/abc123
/api/analytics/{short_code}?days=30
days
- Number of days to include (default: 30, max: 365){
"url": {
"short_code": "abc123",
"original_url": "https://example.com/very/long/url",
"click_count": 42
},
"daily_clicks": [
{"date": "2024-01-15", "count": 5},
{"date": "2024-01-16", "count": 12}
],
"country_stats": [
{"country": "United States", "count": 25},
{"country": "Canada", "count": 17}
],
"total_clicks": 42
}
curl https://88d.in/api/analytics/abc123?days=7
/api/urls?page=1&limit=20
page
- Page number (default: 1)limit
- Results per page (default: 20, max: 100){
"urls": [
{
"id": 1,
"short_code": "abc123",
"short_url": "https://88d.in/abc123",
"original_url": "https://example.com/page",
"title": "Example Page",
"click_count": 42,
"created_at": "2024-01-15T10:30:00Z",
"last_click_at": "2024-01-15T15:45:00Z",
"is_active": true
}
],
"total": 150,
"page": 1,
"limit": 20,
"total_pages": 8
}
curl https://88d.in/api/urls?page=2&limit=10
Code | Description |
---|---|
400 | Bad Request - Invalid input parameters |
404 | Not Found - Short URL doesn't exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |