Utilities

Weather API

Current conditions and 7-day forecasts for MENA cities powered by Open-Meteo. Returns temperatures, humidity, wind, UV index, and WMO weather codes with English/Arabic descriptions and emoji icons. Results are cached for 30 minutes.

Endpoint:/api/v1/weather
Method:GET
Latency:~200ms / ~5ms (cached)

Try it out

GET/api/v1/weather

Parameters

Code

curl
curl -X GET "https://khaleejiapi.dev/api/v1/weather?city=dubai&lat=25.2048&lng=55.2708&days=3" \
-H "Authorization: Bearer your_api_key"

Parameters

NameTypeRequiredDescription
citystringOptionalCity name (13 MENA cities supported). Required if lat/lng not provided
latnumberOptionalLatitude (-90 to 90). Requires lng
lngnumberOptionalLongitude (-180 to 180). Requires lat
daysnumberOptionalForecast days (1–7)

Supported Cities

DubaiAbu DhabiRiyadhJeddahMeccaDohaKuwait CityManamaMuscatAmmanBeirutCairoBaghdad

Use lat/lng for locations not in the predefined list.

Response Fields

current.temperature

Current temperature in °C

current.humidity

Relative humidity percentage

current.windSpeed

Wind speed in km/h

current.condition

WMO code + English/Arabic text + emoji icon

current.uvIndex

UV index (0–15 scale)

forecast[].maxTemp

Daily high temperature in °C

forecast[].precipitation

Precipitation in mm

location.timezone

IANA timezone identifier

Rate Limits

PlanRequests/MonthRate Limit
Free1,00010 req/min
Starter10,00060 req/min
Professional100,000300 req/min
Business500,000500 req/min

Debugging & Support

Include X-Request-ID when contacting support

Every response from KhaleejiAPI includes an X-Request-ID header — a unique identifier that lets our support team pull the exact log entry for your request within seconds. Always share it when reporting an unexpected error or unexpected result.

How to capture it

JavaScript / fetch

const res = await fetch("https://khaleejiapi.dev/api/v1/...", {
  headers: { Authorization: "******" },
});
const requestId = res.headers.get("x-request-id");
console.log("Request ID:", requestId);
// → e.g. "req_01j9xkz4vp8..."

cURL

curl -si "https://khaleejiapi.dev/api/v1/..." \
  -H "Authorization: ******" | grep -i x-request-id
# → x-request-id: req_01j9xkz4vp8...

Browser DevTools

Open DevTools (F12) → Network tab → click the failing request → scroll to the Response Headers section → copy the value next to x-request-id.

For a full list of error codes and guidance on common issues, see the Troubleshooting guide.