KhaleejiAPIKhaleejiAPI
PricingDocumentationAbout
Sign InGet Started
Back to all APIs

URL Shortener

Shorten URLs with click analytics and custom domains

Category: UtilitiesEndpoint: /v1/url/shorten

Avg Response

<50ms

Uptime SLA

99.99%

Free Tier

1,000/mo

Quick Start

JavaScript / TypeScript

javascript
import { KhaleejiAPI } from '@khaleejiapi/sdk';
const client = new KhaleejiAPI('your_api_key');
// Create a short URL
const result = await client.utility.shortenURL({
url: 'https://example.com/very/long/path/to/page',
code: 'mylink',
});
console.log(result);
// {
// code: "mylink",
// shortUrl: "https://khaleejiapi.dev/api/v1/url/mylink",
// originalUrl: "https://example.com/very/long/path/to/page",
// createdAt: "2025-01-15T10:30:00Z"
// }

Python

python
from khaleejiapi import KhaleejiAPI
client = KhaleejiAPI('your_api_key')
result = client.utility.shorten_url(
url="https://example.com/very/long/path/to/page",
code="mylink"
)
print(result["shortUrl"])
# "https://khaleejiapi.dev/api/v1/url/mylink"

cURL

curl
curl -X POST "https://khaleejiapi.dev/api/v1/url/shorten" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/very/long/path/to/page","code":"mylink"}'
Get Your API KeyView Documentation

Related APIs

QR Code Generator

Generate QR codes with custom colors, logos, and formats

Translation API

AI-powered translation for 22+ languages with transliteration and formality control

Weather API

Real-time weather and 7-day forecasts for MENA cities via Open-Meteo

Arabic Text ProcessingZakat Calculator
KhaleejiAPIKhaleejiAPI

Fast, affordable APIs built in Dubai for developers across the Middle East.

All systems operational

APIs

  • Email Validation
  • Phone Validation
  • VAT Validation
  • IP Geolocation
  • Exchange Rates
  • Image Processing
  • View all →

Resources

  • Documentation
  • API Reference
  • SDKs
  • Status
  • Changelog

Company

  • About
  • Blog
  • Careers
  • Contact

Legal

  • Privacy
  • Terms
  • DPA

© 2026 KhaleejiAPI. All rights reserved.

Made with love in Dubai by Berd-i & Sons