Geo API

Get timezone information, reverse geocode coordinates, and resolve locations. Includes offline timezone lookup using polygon-based detection.

Get Timezone

Get timezone information for a location using coordinates.

GET/v1/geo/timezone

Query Parameters

NameTypeRequiredDescription
latfloatRequiredLatitude (-90 to 90)
lngfloatRequiredLongitude (-180 to 180)

Example Request

curl "https://api.falakapi.com/v1/geo/timezone?lat=28.66&lng=77.07" \
  -H "X-API-Key: fak_your_api_key_here"

Example Response

{
  "timezone": "Asia/Kolkata",
  "offset": 330,
  "offset_string": "+05:30"
}

Notes

  • Uses offline polygon-based timezone detection
  • No external API calls required
  • Covers 400+ timezones worldwide

Reverse Geocode

Get location information from coordinates (reverse geocoding).

GET/v1/geo/reverse

Query Parameters

NameTypeRequiredDescription
latfloatRequiredLatitude (-90 to 90)
lngfloatRequiredLongitude (-180 to 180)

Example Request

curl "https://api.falakapi.com/v1/geo/reverse?lat=28.66&lng=77.07" \
  -H "X-API-Key: fak_your_api_key_here"

Example Response

{
  "location": {
    "city": "New Delhi",
    "country": "India",
    "coordinates": {
      "lat": 28.66,
      "lng": 77.07
    }
  }
}

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/geo

Query Parameters

NameTypeRequiredDescription
qstringRequiredLocation 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

{
  "location": {
    "city": "New Delhi",
    "country": "India",
    "coordinates": {
      "lat": 28.66,
      "lng": 77.07
    },
    "timezone": "Asia/Kolkata"
  }
}

Notes

  • Supports city names, coordinates, and other location formats
  • Returns coordinates and timezone information