URL Shortener API
Short links with click tracking, expiry dates, and QR codes. KV-backed, zero third-party auth dependency.
Endpoints
GET /shorten
Shorten any URL. Optional custom alias and TTL (days).
GET /expand
Expand a short code back to the original URL.
GET /stats
Click count, creation date, and expiry per short code.
GET /qr
Returns a QR code PNG for any URL.
GET /r/:code
Redirect to original URL with click tracking.
POST /mcp
JSON-RPC 2.0 — AI-native tool integration.
Quick Start
curl "https://api.lazy-mac.com/url-shortener-api/shorten?url=https://example.com/long-path"
curl "https://api.lazy-mac.com/url-shortener-api/expand?code=abc1234"
curl "https://api.lazy-mac.com/url-shortener-api/stats?code=abc1234"
curl "https://api.lazy-mac.com/url-shortener-api/qr?url=https://example.com&size=300" -o qr.png
Free
$0/mo
- 100 requests/day
- All endpoints
- JSON responses
Pro
$19/mo
- Unlimited requests
- Custom aliases
- MCP tool access
- Priority support
Get API Key — $19/mo