API Overview
The ARB.WIKI URL Shortening API allows you to programmatically create, manage, and analyze shortened URLs. Our API is RESTful, uses JSON for data exchange, and provides comprehensive analytics.
Base URL
https://arb.wiki/
Rate Limiting
- Anonymous requests: 10 requests per minute
- Authenticated requests: 1000 requests per minute
Authentication
All API requests require authentication using an API key. Include your API key in the request headers:
X-API-Key: your-api-key-here
API Endpoints
Create Shortened URL
POST
/api/v1/web-urls/create
Creates a new shortened URL with optional UTM parameters and analytics tracking.
Request Body:
url
string, required
The original URL to shorten (max 2048 characters)
custom_code
string, optional
Custom short code (alphanumeric, -, _, ~)
title
string, optional
Title for the shortened URL
utm_source
string, optional
UTM source parameter for analytics
utm_medium
string, optional
UTM medium parameter for analytics
utm_campaign
string, optional
UTM campaign parameter for analytics
Success Response (201 Created):
{
"status": "Success",
"code": 201,
"data": {
"short_url": "https://arb.wiki/abc123",
"short_code": "abc123",
"original_url": "https://example.com",
"analytics_url": "https://arb.wiki/api/v1/web-urls/1/analytics"
}
}
List Shortened URLs
GET
/api/v1/web-urls/list
Retrieves a paginated list of your shortened URLs with basic analytics.
Query Parameters:
page
integer, optional
Page number (default: 1)
limit
integer, optional
Items per page (default: 20, max: 100)
campaign
string, optional
Filter by campaign name
Get URL Analytics
GET
/api/v1/web-urls/{id}/analytics
Get detailed analytics for a specific shortened URL including geographic data, referrer information, and click patterns.
Delete Shortened URL
DELETE
/api/v1/web-urls/{id}/delete
Deactivates a shortened URL. The URL will no longer redirect.
Code Examples
JavaScript (Fetch API)
const response = await fetch('https://arb.wiki/api/v1/web-urls/create', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your-api-key'
},
body: JSON.stringify({
url: 'https://example.com/long-url',
utm_source: 'newsletter',
utm_medium: 'email',
utm_campaign: 'spring_sale'
})
});
const data = await response.json();
console.log('Short URL:', data.data.short_url);
Python (requests)
import requests
url = 'https://arb.wiki/api/v1/web-urls/create'
headers = {
'Content-Type': 'application/json',
'X-API-Key': 'your-api-key'
}
data = {
'url': 'https://example.com/long-url',
'utm_source': 'newsletter',
'utm_medium': 'email',
'utm_campaign': 'spring_sale'
}
response = requests.post(url, json=data, headers=headers)
result = response.json()
print(f"Short URL: {result['data']['short_url']}")
cURL
curl -X POST https://arb.wiki/api/v1/web-urls/create \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"url": "https://example.com/long-url",
"utm_source": "newsletter",
"utm_medium": "email",
"utm_campaign": "spring_sale"
}'
Error Codes
400 Bad Request
Invalid request format or missing required parameters
401 Unauthorized
Invalid or missing API key
404 Not Found
Requested resource not found
429 Too Many Requests
Rate limit exceeded
500 Internal Server Error
Server error occurred
Error Response Format
{
"status": "Error",
"code": 400,
"message": "URL is required"
}