Day 3

URL Shortener

Create branded short links with real-time analytics. Deploy globally in seconds.

Create Short Link

Only letters, numbers, hyphens, and underscores allowed

API Reference

POSThttps://urlshortener.brogee9o9.workers.dev/api/shorten

Create a new short link

Parameter
Description
urlrequired
The URL to shorten (must be HTTP or HTTPS)
customSlugoptional
Custom slug for the short link (letters, numbers, hyphens, underscores only)
curl -X POST "https://urlshortener.brogee9o9.workers.dev/api/shorten" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com"}'
GEThttps://urlshortener.brogee9o9.workers.dev/api/stats/{slug}

Get analytics and statistics for a short link

Parameter
Description
slugrequired
The slug of the short link (path parameter)
curl "https://urlshortener.brogee9o9.workers.dev/api/stats/abc123"
GEThttps://urlshortener.brogee9o9.workers.dev/{slug}

Redirect to the original URL and track the click

Parameter
Description
slugrequired
The slug of the short link (path parameter). Automatically tracks click analytics and redirects to the original URL.
curl -L "https://urlshortener.brogee9o9.workers.dev/abc123"

Features

Instant Shortening

Create short links instantly at the edge

Real-time Analytics

Track clicks, referrers, and more in real-time

Custom Slugs

Create branded, memorable short links