URL Shortener API

URL Shortening + Analytics API

Create short URLs with click tracking

Starting at $0.0005 per request

Powerful Features

Built for developers who need reliable, fast, and scalable API solutions

🔗
Custom Slugs
Create branded short links with custom paths
📊
Click Analytics
Track clicks, referrers, and user agents
âš¡
Instant Redirect
Sub-50ms redirect times
💾
SQLite Storage
Reliable persistence with automatic backups

Technical Specifications

Response Time
< 50ms (redirect)
Storage
SQLite with backups
Analytics
Clicks, referrers, user agents
Custom Slugs
Yes

Use Cases

Perfect for a wide range of applications and workflows

✓

Marketing campaign tracking

✓

Link management systems

✓

Social media sharing

✓

QR code generation

Simple, Pay-Per-Use Pricing

No subscriptions. No hidden fees. Pay only for what you use.

Pay Per Use
$0.0005
per request
Simple & Scalable
Pay only for what you use
✓
No monthly fees or subscriptions
✓
No rate limits (pay per use)
✓
24-hour caching included
✓
Production-ready reliability
Powered by x402 Protocol
HTTP-native payments. No accounts, no billing cycles. Just set your API key and start using.

API Documentation

Get started in minutes with our simple REST API

Available Endpoints
RESTful API endpoints for URL Shortener API
POST/shortenCreate a short URL
GET/stats/:slugGet analytics for a short URL
Integration Examples
Copy and paste examples in your favorite language
# Create short URL
curl -X POST https://url-shortener.viralorb.com/shorten \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://viralorb.com", "slug": "orb"}'

# Get stats
curl "https://url-shortener.viralorb.com/stats/orb" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response Format
All responses are returned in JSON format
{
  "success": true,
  "data": { ... },
  "cached": false,
  "timestamp": "2026-05-05T15:47:00Z"
}