Geolocation

Geocoding API

Forward and reverse geocoding with MENA region optimization. Powered by Nominatim (OpenStreetMap) with automatic fallback to a curated 26-location MENA dataset. Includes Arabic names, landmark types, and nearby point-of-interest discovery.

Endpoint:/api/v1/geocode
Method:GET
Latency:~100ms

Try it out

GET/api/v1/geocode

Parameters

Code

curl
curl -X GET "https://khaleejiapi.dev/api/v1/geocode?q=Burj%20Khalifa&lang=en&limit=10" \
-H "Authorization: Bearer your_api_key"

Parameters

Provide either q for forward geocoding or lat + lng for reverse geocoding.

ParameterTypeRequiredDescription
qstringOptionalPlace name for forward geocoding (address, landmark, city)
latnumberOptionalLatitude for reverse geocoding (-90 to 90)
lngnumberOptionalLongitude for reverse geocoding (-180 to 180)
countrystringOptionalCountry code filter (e.g. AE, SA)
langstringOptionalLanguage for results
limitnumberOptionalMax results to return (1–50)

Geocoding Modes

Forward Geocoding — ?q=Burj Khalifa

Convert place names, addresses, or landmarks to coordinates. Returns multiple results ranked by relevance. MENA country biasing for better results.

Reverse Geocoding — ?lat=25.19&lng=55.27

Convert coordinates to addresses. Returns enriched result with nearby landmarks (Burj Khalifa, Palm Jumeirah, etc.) when in GCC region.

Response Fields

name / nameAr

Place name in English and Arabic

lat / lng

Latitude and longitude coordinates

country / countryCode

Country name and ISO code

address

Structured address: road, neighbourhood, city, state, postcode, full

type

Place type (city, attraction, building, etc.)

nearbyLandmarks

Nearby GCC landmarks (reverse geocoding only)

Rate Limits

PlanRequests/MonthRate Limit
Free1,00010 req/min
Starter10,00060 req/min
Professional100,000300 req/min
Business500,0001,000 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.