API Reference
Full REST API — free, no authentication required for most endpoints. Rate limits apply per IP.
/api/shorten
Create a new short link. Returns the short URL and a customer secret key for later access to statistics.
customer_secret_key from the response — it cannot be recovered and is needed to access paid stats.
Request body (JSON)
| Field | Type | Description |
|---|---|---|
| urlrequired | string | The URL to shorten. Must be a valid http/https URL. |
| customer_secret_keyoptional | string | Supply your own key instead of getting an auto-generated one. |
curl -X POST https://a777.lt/api/shorten \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/my-long-url"}'
Response 200
{
"short_url": "https://a777.lt/u81OZL",
"short_code": "u81OZL",
"original_url": "https://example.com/my-long-url",
"customer_secret_key": "a7k_xxxxxxxxxxxxxxxx"
}
/api/stats/{code}
Basic statistics for any link. No authentication required. Returns clicks, countries, referrers, and date chart.
curl https://a777.lt/api/stats/u81OZL
{
"short_code": "u81OZL",
"short_url": "https://a777.lt/u81OZL",
"original_url": "https://example.com/long",
"total_clicks": 142,
"total_unique_clicks": 98,
"avg_redirect_time_ms": 12.35,
"creation_date": "2026-02-10T08:00:00+00:00",
"last_click": "2026-02-13T14:22:00+00:00",
"bot_clicks": 5,
"access_level": "free",
"clicks_by_date": [
{ "date": "2026-02-10", "clicks": "23" }
],
"clicks_by_country": [
{ "country": "US", "clicks": "67" },
{ "country": "DE", "clicks": "31" }
],
"clicks_by_referrer": [
{ "referer": "Direct", "clicks": "80" },
{ "referer": "https://twitter.com", "clicks": "12" }
]
}
/api/stats/{code} — paid
Dashboard keyExtended statistics when you pass your dashboard key via X-Customer-Key header. Adds browser, OS, device, hourly chart, and recent click log.
curl https://a777.lt/api/stats/u81OZL \ -H "X-Customer-Key: your-secret-key-here"
Additional fields
{
"access_level": "paid",
"paid_expires_at": "2027-02-13T14:44:00+00:00",
"paid_days_remaining": 365,
"clicks_by_browser": [{ "browser": "Chrome", "clicks": "89" }],
"clicks_by_os": [{ "os": "Windows", "clicks": "67" }],
"clicks_by_device": [{ "device_type": "desktop", "clicks": "95" }],
"clicks_by_hour": [{ "hour": 9, "clicks": "15" }, { "hour": 14, "clicks": "22" }],
"clicks_by_bot": [{ "bot_name": "Googlebot", "clicks": "3" }],
"recent_clicks": [{
"clicked_at": "2026-02-13T14:22:00+00:00",
"country_code": "US",
"browser": "Chrome",
"os": "Windows",
"device_type": "desktop",
"referer": "https://twitter.com",
"is_bot": false
}]
}
/api/dashboard
Dashboard keyAggregated analytics across all links in your paid account. Supports filtering by date, country, browser, OS, and bot status.
Query parameters
| Parameter | Type | Description |
|---|---|---|
| linkoptional | string | Filter to a specific short code |
| countryoptional | string | Filter by 2-letter country code (e.g. US) |
| browseroptional | string | Filter by browser name |
| osoptional | string | Filter by OS name |
| fromoptional | date | Start date YYYY-MM-DD |
| tooptional | date | End date YYYY-MM-DD |
| hide_botsoptional | int | Set to 1 to exclude bot clicks |
| tz_offsetoptional | int | Timezone offset in hours for hourly chart |
curl "https://a777.lt/api/dashboard?from=2026-02-01&hide_bots=1" \ -H "X-Customer-Key: your-secret-key-here"
/api/bind
Dashboard keyAdd existing links to your dashboard account by their short codes.
{
"access_key": "your-secret-key-here",
"link_codes": ["u81OZL", "PTn6cU", "abc123"]
}
{
"bound": 2,
"skipped": [
{ "code": "abc123", "reason": "not found" }
]
}
/api/export/{code}
Export click data for a link. Free accounts get CSV. Dashboard accounts get CSV, JSON, XML, and XLSX.
| Parameter | Type | Description |
|---|---|---|
| formatrequired | string | csv | json | xml | xlsx |
| keyoptional | string | Dashboard key — required for non-CSV formats |
# Free CSV export curl "https://a777.lt/api/export/u81OZL?format=csv" -o clicks.csv # Paid JSON export curl "https://a777.lt/api/export/u81OZL?format=json" \ -H "X-Customer-Key: your-key" -o clicks.json
Authentication
Most endpoints are public. Paid features require the X-Customer-Key header or key query parameter. Keys are generated on link creation and emailed after dashboard purchase.
X-Customer-Key: your-secret-key-here
GET /api/dashboard?key=your-secret-key-here&from=2026-01-01
Rate Limits
Rate limiting is applied per IP address.
| Endpoint | Limit |
|---|---|
| /api/shorten | 30 requests / minute |
| /api/stats/* | 30 requests / minute |
| /api/dashboard | 30 requests / minute |
| /api/export/* | 30 requests / minute |
Error codes
| HTTP | Meaning |
|---|---|
| 400 | Bad request — missing or invalid parameters |
| 401 | Unauthorized — invalid or missing customer key |
| 404 | Short code not found |
| 410 | Link expired or removed |
| 429 | Rate limit exceeded |
| 500 | Server error — please contact support |
{
"error": true,
"message": "Short code not found",
"code": 404
}