API Reference

Full REST API — free, no authentication required for most endpoints. Rate limits apply per IP.

Base URL https://a777.lt
POST

/api/shorten

Create a new short link. Returns the short URL and a customer secret key for later access to statistics.

Save the customer_secret_key from the response — it cannot be recovered and is needed to access paid stats.

Request body (JSON)

FieldTypeDescription
urlrequiredstringThe URL to shorten. Must be a valid http/https URL.
customer_secret_keyoptionalstringSupply 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

JSON
{
  "short_url": "https://a777.lt/u81OZL",
  "short_code": "u81OZL",
  "original_url": "https://example.com/my-long-url",
  "customer_secret_key": "a7k_xxxxxxxxxxxxxxxx"
}

GET

/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
Response 200 — JSON
{
  "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" }
  ]
}

GET

/api/stats/{code} — paid

Dashboard key

Extended 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

Additional JSON 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
  }]
}

GET

/api/dashboard

Dashboard key

Aggregated analytics across all links in your paid account. Supports filtering by date, country, browser, OS, and bot status.

Query parameters

ParameterTypeDescription
linkoptionalstringFilter to a specific short code
countryoptionalstringFilter by 2-letter country code (e.g. US)
browseroptionalstringFilter by browser name
osoptionalstringFilter by OS name
fromoptionaldateStart date YYYY-MM-DD
tooptionaldateEnd date YYYY-MM-DD
hide_botsoptionalintSet to 1 to exclude bot clicks
tz_offsetoptionalintTimezone offset in hours for hourly chart
cURL
curl "https://a777.lt/api/dashboard?from=2026-02-01&hide_bots=1" \
  -H "X-Customer-Key: your-secret-key-here"

POST

/api/bind

Dashboard key

Add existing links to your dashboard account by their short codes.

Request body — JSON
{
  "access_key": "your-secret-key-here",
  "link_codes": ["u81OZL", "PTn6cU", "abc123"]
}
Response 200 — JSON
{
  "bound": 2,
  "skipped": [
    { "code": "abc123", "reason": "not found" }
  ]
}

GET

/api/export/{code}

Export click data for a link. Free accounts get CSV. Dashboard accounts get CSV, JSON, XML, and XLSX.

ParameterTypeDescription
formatrequiredstringcsv | json | xml | xlsx
keyoptionalstringDashboard key — required for non-CSV formats
cURL examples
# 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.

Header method (preferred)
X-Customer-Key: your-secret-key-here
Query parameter method
GET /api/dashboard?key=your-secret-key-here&from=2026-01-01

Rate Limits

Rate limiting is applied per IP address.

EndpointLimit
/api/shorten30 requests / minute
/api/stats/*30 requests / minute
/api/dashboard30 requests / minute
/api/export/*30 requests / minute
When rate limited, the API returns HTTP 429. Back off and retry after 60 seconds.

Error codes

HTTPMeaning
400Bad request — missing or invalid parameters
401Unauthorized — invalid or missing customer key
404Short code not found
410Link expired or removed
429Rate limit exceeded
500Server error — please contact support
Error response format
{
  "error": true,
  "message": "Short code not found",
  "code": 404
}