onlineurlshortner.com logoonlineurlshortner.com
DEVELOPER API

REST API Reference

Integrate link shortening and stats retrieval directly into your applications, scripts, and workflows.

BASE URL
https://onlineurlshortner.com/api/v1
DEFAULT RATE LIMIT
10 requests / min / IP
PAYLOAD FORMAT
JSON (application/json)
POST/api/v1/shorten

Create a new short link with an optional custom slug and expiration rule.

// cURL Request
curl -X POST https://onlineurlshortner.com/api/v1/shorten \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/long-target-page",
    "slug": "custom-alias",
    "expiry": "never"
  }'
// 200 OK Response
{
  "slug": "custom-alias",
  "shortUrl": "https://onlineurlshortner.com/custom-alias",
  "originalUrl": "https://example.com/long-target-page",
  "createdAt": "2026-09-04T12:00:00.000Z",
  "expiry": "never",
  "hasPassword": false
}
GET/api/v1/stats/:slug

Retrieve the destination URL, creation timestamp, and total click counter for a specific short link.

// cURL Request
curl https://onlineurlshortner.com/api/v1/stats/custom-alias
// 200 OK Response
{
  "found": true,
  "link": {
    "slug": "custom-alias",
    "original_url": "https://example.com/long-target-page",
    "short_url": "https://onlineurlshortner.com/custom-alias",
    "created_at": "2026-09-04T12:00:00.000Z",
    "expires_at": null,
    "clicks": 42
  }
}
GET STARTED

Ready to simplify your links?

No account creation, no credit cards. Just clean, high-performance URLs.