API Documentation
Simple JSON API. Free to use. No authentication required for basic operations.
Authentication
Basic shortening and free stats require no authentication. For paid features, pass your Customer Secret Key via the X-Customer-Key HTTP header or as a customer_secret_key parameter.
Rate Limits
All endpoints are limited to 30 requests per minute per IP address. Exceeding this returns HTTP 429.
Error Handling
All errors return JSON with an error field:
{"error": "Link not found"} // 404
{"error": "Rate limit exceeded"} // 429
{"error": "Missing field: url"} // 400
POST /api/shorten
Create a short link. No authentication required.
Request Body
{
"url": "https://example.com/very-long-url",
"customer_secret_key": "optional-existing-key"
}
Response (201)
{
"created_at": "2026-02-13T14:30:00+00:00",
"short_url": "https://a777.lt/u81OZL",
"short_code": "u81OZL",
"customer_secret_key": "a1b2c3d4e5f6...",
"returning_customer": false,
"auto_bound": false
}
Examples
curl -X POST https://a777.lt/api/shorten \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/my-long-url"}'
GET /api/stats/{code} — Free
Retrieve basic statistics for any public (non-paid) link. No authentication required.
Response (200)
{
"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",
"last_click_browser": "Chrome",
"last_click_os": "Windows",
"bot_clicks": 5,
"access_level": "free",
"clicks_by_date": [
{"date": "2026-02-10", "clicks": "23"},
{"date": "2026-02-11", "clicks": "45"}
],
"clicks_by_country": [
{"country": "US", "clicks": "67"},
{"country": "DE", "clicks": "31"}
],
"clicks_by_referrer": [
{"referer": "Direct", "clicks": "80"},
{"referer": "https://twitter.com", "clicks": "12"}
]
}
Examples
curl https://a777.lt/api/stats/u81OZL
GET /api/stats/{code} — Paid
Paid users get extended statistics. Pass your key via X-Customer-Key header.
Additional fields in response
{
"access_level": "paid",
"is_paid": true,
"paid_expires_at": "2027-02-13T14:44:00+00:00",
"paid_days_remaining": 365,
"clicks_by_browser": [
{"browser": "Chrome", "clicks": "89"},
{"browser": "Firefox", "clicks": "23"}
],
"clicks_by_os": [
{"os": "Windows", "clicks": "67"},
{"os": "macOS", "clicks": "42"}
],
"clicks_by_device": [
{"device_type": "desktop", "clicks": "95"},
{"device_type": "mobile", "clicks": "47"}
],
"clicks_by_bot": [
{"bot_name": "Googlebot", "clicks": "3"}
],
"clicks_by_hour": [
{"hour": 9, "clicks": "15"},
{"hour": 14, "clicks": "22"}
],
"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,
"bot_name": null
}
]
}
Examples
curl https://a777.lt/api/stats/u81OZL \ -H "X-Customer-Key: your-secret-key-here"
GET /api/dashboard
Retrieve aggregated analytics for all links in your paid account. Requires X-Customer-Key header.
Query Parameters
key=YOUR_KEY # required (or use header) link=short_code # filter by specific link country=US # filter by country code browser=Chrome # filter by browser os=Windows # filter by OS from=2026-01-01 # date range start to=2026-02-01 # date range end hide_bots=1 # exclude bot clicks tz_offset=2 # timezone offset hours
Response includes
{
"total_clicks": 1250,
"total_unique": 890,
"avg_redirect_ms": 11.2,
"total_bot_clicks": 45,
"expires_at": "2027-02-13...",
"days_remaining": 365,
"links": [...],
"daily_clicks": [...],
"hourly_distribution": [...],
"browsers": [...],
"os_breakdown": [...],
"devices": [...],
"countries": [...],
"referrers": [...]
}
Examples
curl "https://a777.lt/api/dashboard?from=2026-02-01&hide_bots=1" \ -H "X-Customer-Key: your-secret-key-here"
POST /api/bind
Add existing links to your paid dashboard account.
Request Body
{
"access_key": "your-secret-key-here",
"link_codes": ["u81OZL", "PTn6cU", "abc123"]
}
Response (200)
{
"bound": 2,
"skipped": [
{"code": "abc123", "reason": "not found"}
]
}
GET /api/export/{code}
Export click data for a link. Free accounts: CSV only. Paid accounts: CSV, JSON, XML, XLSX.
Query Parameters
format=csv|json|xml|xlsx # output format key=YOUR_KEY # required for json/xml/xlsx
Example
curl "https://a777.lt/api/export/u81OZL?format=csv" -o clicks.csv # Paid (JSON with all details): curl "https://a777.lt/api/export/u81OZL?format=json" \ -H "X-Customer-Key: your-key" -o clicks.json