URL Shortener API
Base URL: https://urlshort.at
Prefer a narrative walkthrough before diving into verbs? Read the URL shortener API guide for onboarding tips and operational guardrails engineering managers expect.
POST /api/shorten
Create a short URL. Requires a creatorId (UUID) so links can be listed and deleted later.
Content-Type: application/json
{
"url": "https://example.com/long-path",
"creatorId": "your-uuid-v4",
"customCode": "my-brand",
"expiresIn": 24
}Examples
# cURL
curl -X POST https://urlshort.at/api/shorten \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","creatorId":"550e8400-e29b-41d4-a716-446655440000"}'// JavaScript (fetch)
const res = await fetch("https://urlshort.at/api/shorten", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
url: "https://example.com",
creatorId: crypto.randomUUID(),
}),
});
const data = await res.json();# Python (requests)
import requests, uuid
r = requests.post("https://urlshort.at/api/shorten", json={
"url": "https://example.com",
"creatorId": str(uuid.uuid4()),
})
print(r.json())expiresIn is optional hours until expiry. customCode is optional (3–32 chars, alphanumeric, _ -).
GET /api/urls
Query: creatorId, optional page, limit.
GET /api/stats/:code
Query: creatorId (must match link owner).
DELETE /api/urls/:code
Query: creatorId.
Public tools
GET /api/public/summary/:code— click count + destination (no auth)GET /api/public/resolve?url=— expand a urlshort.at linkPOST /api/public/bulk-shorten— body{ urls: string[], creatorId }(max 50)
FAQ
- Do you offer GraphQL or webhooks?
- Today the product standardizes on JSON REST verbs; extend automations by polling list endpoints or pushing through your job queue.
- Recommended authentication pattern?
- Treat creatorId as a service account secret—rotate if repositories leak and never embed it in static frontends exposed to browsers.
- Global latency expectations?
- Cloudflare Workers terminate close to clients; still apply retry logic for upstream origin hiccups unrelated to URLShort.
- SLA or paid tiers?
- Documentation describes good-citizen quotas; monitor response headers for adaptive throttling cues during traffic spikes.
Related tools
More free utilities on URLShort — all work alongside your shortened links.
- URL Click CounterLook up total clicks on any URLShort short link — no login, instant results.
- Unshorten URLReveal the destination of a shortened link before opening it — useful for checking unknown URLs.
- QR Code GeneratorCreate a printable QR image for any URL or shortened link.
- Bulk ShortenerPaste many URLs at once and get matching short codes in one request.
- UTM BuilderAdd campaign parameters, then shorten the tagged URL.
- Redirect CheckerInspect HTTP status and redirect chains.
- URL EncoderPercent-encode text for query strings.
- URL DecoderDecode percent-encoded URLs.
- Slug GeneratorCreate URL-safe aliases for custom short links.
- Link Safety CheckerPreview urlshort.at destinations before clicking.
- HTTP Status CheckerProbe if a URL returns 200, 301, or errors.
- Tracking Param CleanerStrip utm_ and ad click IDs from URLs.