Getting Started
QuickRedir provides a simple REST API for creating short URLs and tracking analytics. All endpoints are free to use with no authentication required.
Base URL
https://ivgntuymxnymsfnlgeei.supabase.co/functions/v1
Endpoints
POST Create Short URL
/shorten
Creates a new short URL from a long URL. Optionally accepts a custom short code.
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
url | string | Yes | The long URL to shorten (must include http:// or https://) |
custom_code | string | No | Custom short code (3-50 characters, letters, numbers, hyphens, underscores only) |
Request Example
POST /shorten
Content-Type: application/json
{
"url": "https://example.com/very-long-url",
"custom_code": "my-custom-link"
}
Success Response (200)
Status: 200 OK
Content-Type: application/json
Content-Type: application/json
{
"short_code": "my-custom-link",
"short_url": "https://www.quickredir.com/my-custom-link",
"long_url": "https://example.com/very-long-url",
"created_at": "2025-01-02T12:00:00.000Z"
}
Error Responses
400 Bad Request: Invalid URL or custom code format
409 Conflict: Custom code already taken or blacklisted
409 Conflict: Custom code already taken or blacklisted
{
"error": "This custom code is already taken"
}
GET Get Analytics
/analytics?code={short_code}
Retrieves analytics data for a specific short URL.
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
code | string | Yes | The short code to get analytics for |
Request Example
GET /analytics?code=my-custom-link
Success Response (200)
{
"total_clicks": 42,
"unique_clicks": 38,
"created_at": "2025-01-02T12:00:00.000Z",
"referrers": [
{
"referer": "https://facebook.com",
"count": 15
},
{
"referer": "Direct",
"count": 12
}
],
"countries": ["US", "CA", "GB"],
"recent_clicks": [
{
"clicked_at": "2025-01-02T15:30:00.000Z",
"user_agent": "Mozilla/5.0...",
"ip_address": "192.168.1.1",
"referer": "https://facebook.com",
"country": "US",
"city": "New York"
}
]
}
Rate Limits
QuickRedir API has generous rate limits to ensure fair usage:
- Shorten URLs: 100 requests per minute per IP
- Analytics: 200 requests per minute per IP
- Redirects: No limits (handled automatically)
Error Codes
Status Code | Description |
---|---|
200 | Success |
400 | Bad Request - Invalid parameters |
404 | Not Found - Short code doesn't exist |
409 | Conflict - Custom code already taken |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
SDK Examples
JavaScript/Node.js
// Create short URL
const response = await fetch('https://ivgntuymxnymsfnlgeei.supabase.co/functions/v1/shorten', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://example.com/very-long-url',
custom_code: 'my-custom-link'
})
});
const data = await response.json();
console.log(data.short_url); // https://www.quickredir.com/my-custom-link
Python
import requests
# Create short URL
response = requests.post(
'https://ivgntuymxnymsfnlgeei.supabase.co/functions/v1/shorten',
json={
'url': 'https://example.com/very-long-url',
'custom_code': 'my-custom-link'
}
)
data = response.json()
print(data['short_url']) # https://www.quickredir.com/my-custom-link
cURL
# Create short URL
curl -X POST https://ivgntuymxnymsfnlgeei.supabase.co/functions/v1/shorten \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/very-long-url",
"custom_code": "my-custom-link"
}'
# Get analytics
curl "https://ivgntuymxnymsfnlgeei.supabase.co/functions/v1/analytics?code=my-custom-link"
Support
Need help with the API? Contact us at nick@3rdcoast.digital or visit our main website for more information.