Timezone API
Get current time and timezone information for 38 MENA and international cities. Supports lookup by city name, coordinates (nearest-city via Haversine), or IANA timezone identifier. DST-aware with dynamic UTC offset calculation.
/v1/timezoneTry it out
/v1/timezoneParameters
Code
curl -X GET "https://khaleejiapi.dev/api/v1/timezone?city=Dubai" \ -H "X-API-Key: your_api_key"Parameters
All parameters are optional. When no parameters are provided, returns a listing of all 38 supported cities.
| Parameter | Type | Required | Description |
|---|---|---|---|
| city | string | Optional | City name in English or Arabic (38 MENA + international cities) |
| lat | number | Optional | Latitude (-90 to 90) for nearest-city lookup |
| lng | number | Optional | Longitude (-180 to 180) for nearest-city lookup |
| timezone | string | Optional | IANA timezone identifier (e.g. Asia/Dubai) |
Lookup Modes
By City Name — ?city=Dubai
Look up timezone by English or Arabic city name. Returns current time, UTC offset, DST status, abbreviation, and coordinates.
By Coordinates — ?lat=25.2&lng=55.3
Find the nearest city using Haversine distance formula. Returns the same data plus distance in km.
By IANA Timezone — ?timezone=Asia/Dubai
Returns all cities in the specified timezone, or just the timezone info if no cities match.
No Parameters
Lists all 38 supported cities with their current times and timezone information.
Response Fields
name / nameAr
City name in English and Arabic
timezone
IANA timezone identifier (e.g. Asia/Dubai)
utcOffset
Current UTC offset (e.g. +04:00)
isDST
Whether the city is currently observing DST
currentTime
Current local time in ISO 8601 format
location
Latitude and longitude coordinates
Rate Limits
| Plan | Requests/Month | Rate Limit |
|---|---|---|
| Free | 1,000 | 10 req/min |
| Starter | 10,000 | 60 req/min |
| Professional | 100,000 | 300 req/min |
| Business | 500,000 | 1,000 req/min |