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.
/api/v1/geocodeTry it out
/api/v1/geocodeParameters
Code
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | Optional | Place name for forward geocoding (address, landmark, city) |
| lat | number | Optional | Latitude for reverse geocoding (-90 to 90) |
| lng | number | Optional | Longitude for reverse geocoding (-180 to 180) |
| country | string | Optional | Country code filter (e.g. AE, SA) |
| lang | string | Optional | Language for results |
| limit | number | Optional | Max 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
| 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 |
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.