Shorten URLs, track clicks, custom slugs — all via REST API.
https://url-fmard.vercel.appX-API-Key: your_key (header) or ?key=your_key (query)
Get your free key below
/api/shorten
Shorten a long URL. Optionally provide a custom slug.
url
string
yes
The URL to shorten
custom
string
no
Custom slug, 3–20 characters
{
"short_url": "https://url-fmard.vercel.app/abc123",
"code": "abc123",
"original": "https://example.com/very-long-url",
"created_at": "2025-01-15T10:30:00Z"
}
/api/info?code=xxx
Get information and click stats for a shortened URL.
{
"code": "abc123",
"url": "https://example.com/very-long-url",
"clicks": 42,
"created_at": "2025-01-15T10:30:00Z"
}
/{code}
Redirect to the original URL. Returns 302 redirect.
// 400 — Bad Request
{ "error": "Invalid URL" }
// 401 — Unauthorized
{ "error": "Invalid API key" }
// 409 — Conflict
{ "error": "Slug already taken" }
// 429 — Rate Limited
{ "error": "Daily limit reached. Upgrade your plan." }
Get a free API key for 6 requests/day. No credit card required.
X-API-Key: your_key?key=your_keyStart free. Pay only when you need more.