Log in Sign up free

urlr API

A small REST API for creating and managing short links. JSON in, JSON out. Base URL:

https://urlr.io/api

Every request needs an API key (see Authentication). All responses are JSON with a standard shape on error.

Authentication

Pass your API key as a Bearer token in the Authorization header. Find your key in Settings → API. Keep it secret — treat it like a password.

Authorization: Bearer urlr_live_sk_7f3a9c2e8b41d0f6a29c

GETGet Link Stats

GET /api/links/:id — return a link plus its aggregated analytics.

curl https://urlr.io/api/links/4812 \
  -H "Authorization: Bearer urlr_live_sk_7f3a9c2e8b41d0f6a29c"

Response 200 OK

{
  "id": 4812,
  "shortUrl": "https://urlr.io/launch",
  "totalClicks": 4812,
  "topReferrer": "twitter.com",
  "topCountry": "US",
  "devices": { "mobile": 61, "desktop": 33, "tablet": 6 }
}

Rate Limits

Limits are per API key. Exceeding a limit returns 429 Too Many Requests with a Retry-After header.

TierRequests / hourLink creation
Free100100 / hour
Pro soon1,0001,000 / hour
Team soon5,0005,000 / hour

Errors

Errors use standard HTTP status codes and a consistent JSON body.

{
  "error": "That alias is already taken."
}
StatusMeaning
400Bad request — invalid or missing fields
401Missing or invalid API key
404Link not found
409Alias already taken
429Rate limit exceeded