URL Shortener API

Shorten URLs, track clicks, custom slugs — all via REST API.

<100ms
Response
Click tracking
Built-in Analytics
Custom slugs
Your Brand

How It Works

Step 1
Send URL
POST your long URL to the API
Step 2
Get Short Link
Receive a short URL with a unique code
Step 3
Track Clicks
Monitor click count and analytics

Playground

Enter a URL and click Shorten

API Documentation

Base URL
https://url-fmard.vercel.app
Authentication
X-API-Key: your_key (header) or ?key=your_key (query) Get your free key below
POST /api/shorten

Shorten a long URL. Optionally provide a custom slug.

Request (JSON)

ParameterTypeRequiredDescription
url string yes The URL to shorten
custom string no Custom slug, 3–20 characters

Response (JSON)

{
  "short_url": "https://url-fmard.vercel.app/abc123",
  "code": "abc123",
  "original": "https://example.com/very-long-url",
  "created_at": "2025-01-15T10:30:00Z"
}
GET /api/info?code=xxx

Get information and click stats for a shortened URL.

Response (JSON)

{
  "code": "abc123",
  "url": "https://example.com/very-long-url",
  "clicks": 42,
  "created_at": "2025-01-15T10:30:00Z"
}
GET /{code}

Redirect to the original URL. Returns 302 redirect.

Error Responses

// 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 API Key

Get a free API key for 6 requests/day. No credit card required.

Usage

  • Add header: X-API-Key: your_key
  • Or query param: ?key=your_key

Limits

  • Playground (no key): 3 req/day
  • Free tier (with key): 6 req/day
  • Paid plans: see pricing below

Pricing

Start free. Pay only when you need more.

Free
$0
  • 6 requests/day
  • Random codes only
Starter
🚀 Launch Price
$12$5/mo
  • 200 requests/day
  • Custom slugs
  • Click tracking
Business
🚀 Launch Price
$79$39/mo
  • 5,000 requests/day
  • All features
  • Priority support