Loading
Loading
Resolve any location identifier to its current timezone, local time, UTC offset, and full DST details. Supports IP addresses, GPS coordinates, city or address strings, IATA airport codes, ICAO codes, UN/LOCODEs, and IANA timezone names.
The Timezone Lookup API returns the current time in six formats, UTC offset with and without DST, DST transition timestamps (start and end), timezone abbreviation, and Unix timestamp for any supported location input. IATA and ICAO lookups also return full airport details. UN/LOCODE lookups include city, state, country, and location type. IP and address lookups support 12 response languages via the lang parameter.
Pass your API key as the apiKey parameter in every request.
This is version 2.0 of the API.
All parameters are optional query string parameters. Pass any one of location, lat/long, ip, tz, iata_code, icao_code, or lo_code. If no parameter is provided, the API resolves the timezone for the calling machine's IP address.
formatoptionalStringdefault: jsonResponse format: 'json' (default) or 'xml'.
ipoptionalStringIPv4/IPv6 address to extract timezone info using IP address
tzoptionalStringExtract timezone information using timezone name
locationoptionalStringdefault: London, UKExtract timezone information using location (preferably city and country)
latoptionalIntegerLatitude to extract timezone information using location coordinates
longoptionalIntegerLongitude to extract timezone information using location coordinates
langoptionalStringdefault: enResponse language. Possible values are:
iata_codeoptionalStringExtract timezone info using 3-letter IATA airport code
icao_codeoptionalStringExtract timezone info using 4-letter ICAO airport code
lo_codeoptionalStringExtract timezone info using 5-letter UN/LO CODE city code
A successful request returns a 200 OK response with a JSON object. The time_zone object is always present. Additional top-level objects appear based on the lookup method used. See the response preview on the right for the full JSON structure.
ipThe IP address used for the timezone lookup. Returned when queried using the ip= parameter or with no parameters.
name (String), offset (Float), offset_with_dst (Float), current_time (String), current_time_unix (Float), …
location_string (String), continent_code (String), continent_name (String), country_code2 (String), country_code3 (String), …
type (String), name (String), latitude (String), longitude (String), elevation_ft (Integer), …
lo_code (String), city (String), state_code (String), country_code (String), country_name (String), …
See the HTTP Status Codes documentation for a complete reference of common API errors and HTTP status codes.
'latitude' (999) or 'longitude' (0) is not valid. 'latitude' must be between -90.0 and +90.0 and 'longitude' must be between -180.0 and +180.0.
Check whether your input values are correct; time_zone_name = Invalid/Timezone
'999.999.999.999' is not an IP string literal.
Invalid IATA code: INVALID. IATA code must be in the format of AAA.
Invalid ICAO code: INVALID. ICAO code must be in the format of AAAA.
'Data not found for the provided LO code: XXXXX Please contact at support@apifreaks.com if provided LO code exists.'
We couldn't find the location (ZZZNOTEXIST). Try a city or state level location address only.