Integrate our powerful URL shortening service into your applications. Create shortlinks, track statistics, and manage links programmatically.
The TEPAKS Shortlink Generator API allows you to create short URLs, retrieve link statistics, and generate API keys for authentication. All endpoints return JSON responses and require an API key for authentication (except for generating a new API key).
All API requests (except /api.php?action=generate_key
) require an API key, which must be included in the request either as:
X-API-Key: your_api_key
api_key=your_api_key
https://videy.ws/api.php
Generate a new API key for accessing the API.
Method | GET |
---|---|
Endpoint | /api.php?action=generate_key |
Authentication | Not required |
Parameters | None |
Example Request:
curl -X GET "https://videy.ws/api.php?action=generate_key"
Example Response:
{
"success": true,
"api_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}
Create a single shortlink for a given URL.
Method | POST |
---|---|
Endpoint | /api.php?action=create |
Authentication | Required |
Parameters |
|
Example Request:
curl -X POST "https://videy.ws/api.php?action=create" \
-H "X-API-Key: your_api_key" \
-d "url=https://example.com/very-long-url"
Example Response:
{
"success": true,
"result": {
"original": "https://example.com/very-long-url",
"shortened": "https://videy.ws/v/?id=abc1234",
"shortcode": "abc1234"
}
}
Create multiple shortlinks for a list of URLs.
Method | POST |
---|---|
Endpoint | /api.php?action=bulk_create |
Authentication | Required |
Parameters |
|
Example Request:
curl -X POST "https://videy.ws/api.php?action=bulk_create" \
-H "X-API-Key: your_api_key" \
-d 'urls=["https://example.com/page1","https://example.com/page2"]'
Example Response:
{
"success": true,
"results": [
{
"original": "https://example.com/page1",
"shortened": "https://videy.ws/v/?id=xyz7890",
"shortcode": "xyz7890"
},
{
"original": "https://example.com/page2",
"shortened": "https://videy.ws/v/?id=def4567",
"shortcode": "def4567"
}
]
}
Retrieve statistics for a specific shortlink.
Method | GET |
---|---|
Endpoint | /api.php?action=stats&shortcode={shortcode} |
Authentication | Required |
Parameters |
|
Example Request:
curl -X GET "https://videy.ws/api.php?action=stats&shortcode=abc1234&api_key=your_api_key"
Example Response:
{
"success": true,
"stats": {
"hits": 10,
"user_agents": ["Mozilla/5.0 ...", "..."],
"timestamps": ["2025-06-22 12:46:00", "..."]
}
}
All error responses follow this format:
{
"success": false,
"error": "Error message"
}
Common HTTP status codes:
400
: Bad Request (missing or invalid parameters)401
: Unauthorized (invalid or missing API key)500
: Internal Server ErrorHere's an example of how to use the API with JavaScript:
const API_BASE_URL = 'https://videy.ws/api.php';
const API_KEY = 'your_api_key';
async function createShortlink(url) {
try {
const response = await fetch(`${API_BASE_URL}?action=create`, {
method: 'POST',
headers: {
'X-API-Key': API_KEY,
'Content-Type': 'application/x-www-form-urlencoded'
},
body: `url=${encodeURIComponent(url)}`
});
const data = await response.json();
console.log(data);
} catch (error) {
console.error('Error:', error);
}
}
createShortlink('https://example.com/very-long-url');
Currently, there are no strict rate limits, but please use the API responsibly. Contact us for high-volume usage.
For support or inquiries, contact us via WhatsApp at +62 819-3729-6315
Back to Shortlink Generator