Geo API
Get timezone information, reverse geocode coordinates, and resolve locations. Coordinate-based endpoints return IANA timezone names using the same resolution rules as Prayer and Time APIs (polygon data when bundled, coarse fallback otherwise). See the Supported timezones page for explicit zone strings and aliases elsewhere in the API.
Get Timezone
Get timezone information for a location using coordinates.
GET
/v1/geo/timezoneQuery Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| lat | float | Required | Latitude (-90 to 90) |
| lng | float | Required | Longitude (-180 to 180) |
Example Request
curl "https://api.falakapi.com/v1/geo/timezone?lat=21.4225&lng=39.8262" \
-H "X-API-Key: fak_your_api_key_here"Example Response
{
"lat": 21.4225,
"lng": 39.8262,
"timezone": "Asia/Riyadh",
"offset": "+03:00"
}Notes
- •Uses offline polygon-based timezone detection when boundary data is available; otherwise falls back to a coarse embedded map.
- •No external API calls required
- •Response timezone field is always an IANA identifier (aliases apply only to endpoints that accept a tz/timezone parameter string).
Reverse Geocode
Get location information from coordinates (reverse geocoding).
GET
/v1/geo/reverseQuery Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| lat | float | Required | Latitude (-90 to 90) |
| lng | float | Required | Longitude (-180 to 180) |
Example Request
curl "https://api.falakapi.com/v1/geo/reverse?lat=21.4225&lng=39.8262" \
-H "X-API-Key: fak_your_api_key_here"Example Response
{
"lat": 21.4225,
"lng": 39.8262,
"timezone": "Asia/Riyadh",
"city": "N/A",
"state": "N/A",
"country": "N/A"
}Notes
- •Returns city and country information
- •Useful for location-based features
Resolve Location
Resolve a location from various input formats (city name, coordinates, etc.).
GET
/v1/geoQuery Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| q | string | Required | Location query (city name, coordinates, etc.) |
Example Request
curl "https://api.falakapi.com/v1/geo?q=New+Delhi" \
-H "X-API-Key: fak_your_api_key_here"Example Response
{
"lat": 28.6139,
"lng": 77.209,
"display_name": "New Delhi, India",
"source": "nominatim"
}Notes
- •Supports city names, coordinates, and other location formats
- •Returns coordinates and timezone information