HidURL API Reference
Integrate URL shortening into your applications with our simple REST API.
Authentication
All API requests require authentication using a Bearer token. Include it in the Authorization header:
Authorization: Bearer your_api_token
Get your API token from the API Keys dashboard. All users can create API tokens.
Base URL
https://api.hidurl.com/v1/publicAll API endpoints are prefixed with this base URL.
Rate Limits
Pro Plan
60/min
10K requests/day
Bulk Plan
300/min
100K requests/day
Enterprise
Unlimited
Custom limits
Endpoints
/shortenCreate a shortened URL
Request Body
{
"url": "string (required)",
"custom_alias": "string (optional, min 5 chars)"
}
Example
curl -X POST https://api.hidurl.com/v1/public/shorten \
-H "Authorization: Bearer your_api_token" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/very-long-url"}'Response
{
"id": 123,
"short_code": "abc123",
"short_url": "https://hidurl.com/abc123",
"original_url": "https://example.com/...",
"clicks": 0
}
/shortenCreate a shortened URL with a custom alias
Example
curl -X POST https://api.hidurl.com/v1/public/shorten \
-H "Authorization: Bearer your_api_token" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/page", "alias": "mylink"}'/bulkCreate multiple shortened URLs at once (Bulk plan required)
Request Body
{
"urls": ["string", "string", ...]
}
Example
curl -X POST https://api.hidurl.com/v1/public/bulk \
-H "Authorization: Bearer your_api_token" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://example1.com", "https://example2.com"]}'/urls/{code}Get information about a shortened URL
Example
curl https://api.hidurl.com/v1/public/urls/abc123 \ -H "Authorization: Bearer your_api_token"
/urls/{code}/statsGet detailed statistics for a URL (Pro plan required)
Example
curl https://api.hidurl.com/v1/public/urls/abc123/stats \ -H "Authorization: Bearer your_api_token"
Response
{
"total_clicks": 1234,
"devices": { "desktop": 800, "mobile": 400, "tablet": 34 },
"browsers": { "Chrome": 600, "Safari": 400, ... },
"os": { "Windows": 500, "macOS": 400, ... },
"referrers": { "twitter.com": 200, "direct": 500, ... }
}
/urls/{code}Delete a shortened URL
Example
curl -X DELETE https://api.hidurl.com/v1/public/urls/abc123 \ -H "Authorization: Bearer your_api_token"
Error Codes
| Code | Description |
|---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Feature not available on your plan |
404 | Not Found - URL not found |
429 | Rate Limit Exceeded |
Ready to get started?
Create your API key and start integrating in minutes.