Skip to main content

Return the IANA timezone for a given coordinate pair

Get IANA timezone for a coordinate pair. Fully offline — no external API call. Accepts ?latitude=&longitude= and/or ?lat=&lon= (any pair that supplies both coordinates). Examples: ?latitude=19.055&longitude=72.869 (Mumbai), ?lat=19.055&lon=72.869

Endpoint

GET /v1/utils/timezone

Request parameters

FieldTypeRequiredDescription
latitudenumber | nullNoLatitude (alias: lat)
longitudenumber | nullNoLongitude (alias: lon)
latnumber | nullNoAlias for latitude
lonnumber | nullNoAlias for longitude

Example request

curl -X GET "https://api.asterwise.com/v1/utils/timezone?latitude=19.076&longitude=72.8777" \
-H "Authorization: Bearer YOUR_API_KEY"

Example response

{
"success": true,
"message": "success",
"data": {
"latitude": 19.076,
"longitude": 72.8777,
"timezone": "Asia/Kolkata"
}
}

Response fields

FieldTypeDescription
successbooleanTrue if the request succeeded
messagestringHuman-readable status message
dataobject
data.latitudenumberInput latitude.
data.longitudenumberInput longitude.
data.timezonestringIANA timezone identifier.

Errors

CodeDescriptionReference
authentication_failedMissing or invalid API key.authentication_failed
ephemeris_unavailableUpstream ephemeris service error.ephemeris_unavailable
insufficient_tierAPI key tier does not include this endpoint.insufficient_tier
internal_errorUnexpected server error.internal_error
ip_rate_limit_exceededToo many requests in a short window.ip_rate_limit_exceeded
payload_too_largeRequest body exceeds the size limit.payload_too_large
resource_not_foundReferenced resource was not found.resource_not_found
validation_errorRequest body failed schema validation.validation_error