Integrate our powerful URL shortening service into your applications. Create shortlinks, track statistics, and manage links programmatically.

API Documentation

Overview

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).

Authentication

All API requests (except /api.php?action=generate_key) require an API key, which must be included in the request either as:

Base URL

https://videy.ws/api.php

Endpoints

1. Generate API Key

Generate a new API key for accessing the API.

MethodGET
Endpoint/api.php?action=generate_key
AuthenticationNot required
ParametersNone

Example Request:


curl -X GET "https://videy.ws/api.php?action=generate_key"
        

Example Response:


{
    "success": true,
    "api_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}
        

2. Create Shortlink

Create a single shortlink for a given URL.

MethodPOST
Endpoint/api.php?action=create
AuthenticationRequired
Parameters
  • url (string, required): The original URL to shorten

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"
    }
}
        

3. Create Multiple Shortlinks

Create multiple shortlinks for a list of URLs.

MethodPOST
Endpoint/api.php?action=bulk_create
AuthenticationRequired
Parameters
  • urls (JSON array, required): Array of URLs to shorten

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"
        }
    ]
}
        

4. Get Shortlink Statistics

Retrieve statistics for a specific shortlink.

MethodGET
Endpoint/api.php?action=stats&shortcode={shortcode}
AuthenticationRequired
Parameters
  • shortcode (string, required): The shortcode of the link

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", "..."]
    }
}
        

Error Responses

All error responses follow this format:


{
    "success": false,
    "error": "Error message"
}
        

Common HTTP status codes:

Usage Example (JavaScript)

Here'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');
        

Rate Limits

Currently, there are no strict rate limits, but please use the API responsibly. Contact us for high-volume usage.

Contact

For support or inquiries, contact us via WhatsApp at +62 819-3729-6315

Back to Shortlink Generator