Welcome to FLL.LOL API
Our API allows you to programmatically create shortened URLs for your applications, websites, or services.
Easy Integration
Simple REST API that works with any programming language or platform.
Detailed Analytics
Track clicks and visitor information for all your shortened URLs.
Secure & Reliable
API keys with rate limiting and secure authentication.
API Documentation
Authentication
All API requests require an API key to be included in the header:
{
"X-API-Key": "your_api_key_here"
}
Create a Shortened URL
Endpoint: POST /api/v1/shorten
Description: Creates a new shortened URL
Request Body:
{
"url": "https://example.com/very/long/url/that/needs/shortening",
"custom_code": "custom" // Optional
}
Response:
{
"success": true,
"data": {
"short_url": "https://fll.lol/abc123",
"original_url": "https://example.com/very/long/url/that/needs/shortening",
"code": "abc123",
"created_at": "2025-04-19T20:58:43+03:00"
}
}
Error Response:
{
"success": false,
"error": "Invalid URL format",
"code": 400
}
Get URL Statistics
Endpoint: GET /api/v1/stats/{code}
Description: Get statistics for a shortened URL
Response:
{
"success": true,
"data": {
"code": "abc123",
"original_url": "https://example.com/very/long/url/that/needs/shortening",
"created_at": "2025-04-19T20:58:43+03:00",
"visit_count": 42,
"visits": [
{
"visit_time": "2025-04-19T21:05:22+03:00",
"country": "United States",
"browser": "Chrome"
},
// More visits...
]
}
}
Code Examples
PHP:
$apiKey = 'your_api_key_here';
$url = 'https://example.com/very/long/url';
$ch = curl_init('https://fll.lol/api/v1/shorten');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['url' => $url]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'X-API-Key: ' . $apiKey
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
echo "Shortened URL: " . $data['data']['short_url'];