Loading
Loading
Whatever location data your system already has — an IP address from a login event, GPS coordinates from a device, a city name from a form, a 3-letter IATA code from a flight record, a 4-letter ICAO code from aviation software, a UN/LOCODE from a shipment manifest, or a timezone name from your database — the Timezone Lookup API resolves it. Pass any of the seven supported input types and get back the current time in six formats, UTC offset, full DST status with transition timestamps, timezone abbreviation, and Unix timestamp in a single JSON response.
The response goes beyond a name and an offset. An IATA or ICAO lookup returns complete airport details — name, coordinates, elevation, continent, country, state, and city — alongside timezone data. A UN/LOCODE lookup returns the location type (port, rail terminal, airport, postal exchange) alongside city and country. IP-based and address-based lookups include full geolocation context, returnable in 9 languages using the lang parameter. For converting a timestamp between two timezones, see the Timezone Converter API.
Every response reflects the live current time at the requested location — including the active timezone abbreviation, whether DST is currently in effect, and the precise UTC offset with DST adjustment. No caching, no stale offsets.
Query by IP address, GPS coordinates, city or address string, IATA airport code, ICAO airport code, UN/LOCODE, or timezone name. One endpoint handles all seven — no normalisation, no separate integrations for different location data types.
Every response includes the exact UTC timestamp of the next DST start and end, the duration of the change, and gap/overlap indicators — not just a simple is_dst flag. Build schedulers, reminders, and clock-change alerts that handle transitions correctly across all regions.
Pass a 3-letter IATA or 4-letter ICAO code and receive complete airport details — name, type, elevation, coordinates, continent, country, state, and city — alongside the timezone. No separate airport database required.
Pass any 5-character UN/LOCODE to get the timezone alongside city details, state code, country code, and location type. Covers ports, rail terminals, road terminals, airports, and postal exchanges worldwide.
Geolocation fields can be returned in English, German, Russian, Japanese, French, Chinese Simplified, Spanish, Czech, or Italian using the lang parameter — for IP-based and address-based lookups.
$ pip install requests
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| ip | No | String | request ip | IPv4 or IPv6 address to extract timezone information using IP address |
| tz | No | String | - | Extract timezone information using timezone name |
| location | No | String | - | Extract timezone information using location (preferably city and country) |
| lat | No | Number | - | Latitude to extract timezone information using location coordinates |
| long | No | Number | - | Longitude to extract timezone information using location coordinates |
| lang | No | String | en | Response language of "location" field in case of lookup through IP address / location address. Possible values are: (1) en (English) (2) de (German) (3) ru (Russian) (4) ja (Japanese) (5) fr (French) (6) cn (Chinese Simplifed) (7) es (Spanish) (8) cs (Czech) (9) it (Italian) |
| iata_code | No | String | - | The 3 letter IATA code to extract the comprehensive airport details along with the timezone information, in which that airport exists. |
| icao_code | No | String | - | The 4 letter ICAO code to extract the comprehensive airport details along with the timezone information, in which that airport exists. |
| lo_code | No | String | - | The 5 letter UN/LO CODE to extract the comprehensive lo code/city details along with the timezone information of the concerned city. |
| HTTP Status | Reasons |
|---|---|
| 400 | (1) When provided Latitude and Longitude values are not valid.
(2) When provided timezone is not valid.
(3) When timezone detail couldn't be found for the provided IP address.
(4) If the provided UN/LOCODE, IATA code or ICAO code is not valid. |
| 404 | (1) When provided location is not found.
(2) If the provided UN/LOCODE, IATA code or ICAO code is not found. |
Pass any city name, address, or place string using the location parameter. The API geocodes the input and returns the timezone with full structured location data. For best results, include both city and country (e.g. London, UK).
# Response { "location": { "location_string": "London, UK", "country_name": "United Kingdom", "state_prov": "England", "city": "London", "locality": "", "latitude": "51.50002", "longitude": "-0.19244" }, "time_zone": { "name": "Europe/London", "offset": 0, "offset_with_dst": 1, "date": "2025-09-02", "date_time": "2025-09-02 11:19:28", "date_time_txt": "Tuesday, September 02, 2025 11:19:28", "date_time_wti": "Tue, 02 Sep 2025 11:19:28 +0100", "date_time_ymd": "2025-09-02T11:19:28+0100", "date_time_unix": 1756808368.994, "time_24": "11:19:28", "time_12": "11:19:28 AM", "week": 36, "month": 9, "year": 2025, "year_abbr": "25", "current_tz_abbreviation": "BST", "current_tz_full_name": "British Summer Time", "standard_tz_abbreviation": "GMT", "standard_tz_full_name": "Greenwich Mean Time", "is_dst": true, "dst_savings": 1, "dst_exists": true, "dst_tz_abbreviation": "BST", "dst_tz_full_name": "British Summer Time", "dst_start": { "utc_time": "2025-03-30 TIME 01", "duration": "+1H", "gap": true, "date_time_after": "2025-03-30 TIME 02", "date_time_before": "2025-03-30 TIME 01", "overlap": false }, "dst_end": { "utc_time": "2025-10-26 TIME 01", "duration": "-1H", "gap": false, "date_time_after": "2025-10-26 TIME 01", "date_time_before": "2025-10-26 TIME 02", "overlap": true } } }curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&location=London,%20UK'
When getting timezone information using the location address, the response will also contain the location field for location information.
Pass latitude and longitude using the lat and long parameters to resolve the timezone for any precise geographic point — no IP address or place name required. Ideal for IoT devices, GPS-enabled applications, and any system that logs coordinates and needs to attach the correct local timestamp.
# Response { "time_zone": { "name": "Australia/Brisbane", "offset": 10, "offset_with_dst": 10, "date": "2025-09-02", "date_time": "2025-09-02 20:20:05", "date_time_txt": "Tuesday, September 02, 2025 20:20:05", "date_time_wti": "Tue, 02 Sep 2025 20:20:05 +1000", "date_time_ymd": "2025-09-02T20:20:05+1000", "date_time_unix": 1756808405.731, "time_24": "20:20:05", "time_12": "08:20:05 PM", "week": 36, "month": 9, "year": 2025, "year_abbr": "25", "current_tz_abbreviation": "AEST", "current_tz_full_name": "Australian Eastern Standard Time", "standard_tz_abbreviation": "AEST", "standard_tz_full_name": "Australian Eastern Standard Time", "is_dst": false, "dst_savings": 0, "dst_exists": false, "dst_tz_abbreviation": "", "dst_tz_full_name": "", "dst_start": {}, "dst_end": {} } }curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&lat=-27.4748&long=153.017'
Pass any IPv4 or IPv6 address using the ip parameter to get the timezone and full geolocation details for that IP. If ip is omitted, the API automatically uses the calling machine's IP address. Code examples are available in Python, PHP, Java, Node.js, Ruby, JavaScript, and C#.
# Response { "ip": "1.1.1.1", "location": { "continent_code": "OC", "continent_name": "Oceania", "country_code2": "AU", "country_code3": "AUS", "country_name": "Australia", "country_name_official": "Commonwealth of Australia", "is_eu": false, "state_prov": "Queensland", "state_code": "AU-QLD", "district": "Brisbane", "city": "South Brisbane", "zipcode": "4101", "latitude": "-27.47306", "longitude": "153.01421" }, "time_zone": { "name": "Australia/Brisbane", "offset": 10, "offset_with_dst": 10, "date": "2025-09-02", "date_time": "2025-09-02 20:20:34", "date_time_txt": "Tuesday, September 02, 2025 20:20:34", "date_time_wti": "Tue, 02 Sep 2025 20:20:34 +1000", "date_time_ymd": "2025-09-02T20:20:34+1000", "date_time_unix": 1756808434.242, "time_24": "20:20:34", "time_12": "08:20:34 PM", "week": 36, "month": 9, "year": 2025, "year_abbr": "25", "current_tz_abbreviation": "AEST", "current_tz_full_name": "Australian Eastern Standard Time", "standard_tz_abbreviation": "AEST", "standard_tz_full_name": "Australian Eastern Standard Time", "is_dst": false, "dst_savings": 0, "dst_exists": false, "dst_tz_abbreviation": "", "dst_tz_full_name": "", "dst_start": {}, "dst_end": {} } }curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&ip=1.1.1.1'
Pass a 3-letter IATA code using the iata_code parameter, or a 4-letter ICAO code using the icao_code parameter, to get the airport's timezone alongside complete airport details — name, coordinates, elevation, continent, country, state, and city. Useful for flight booking platforms, airline operations software, and any application that works with airport identifiers.
# Response { "airport_details": { "type": "large_airport", "name": "Dubai International Airport", "latitude": "25.25280", "longitude": "55.36440", "elevation_ft": 62, "continent_code": "AS", "country_code": "AE", "state_code": "AE-DU", "city": "Dubai", "iata_code": "DXB", "icao_code": "OMDB", "faa_code": "" }, "time_zone": { "name": "Asia/Dubai", "offset": 4, "offset_with_dst": 4, "date": "2025-09-02", "date_time": "2025-09-02 14:21:43", "date_time_txt": "Tuesday, September 02, 2025 14:21:43", "date_time_wti": "Tue, 02 Sep 2025 14:21:43 +0400", "date_time_ymd": "2025-09-02T14:21:43+0400", "date_time_unix": 1756808503.507, "time_24": "14:21:43", "time_12": "02:21:43 PM", "week": 36, "month": 9, "year": 2025, "year_abbr": "25", "current_tz_abbreviation": "GST", "current_tz_full_name": "Gulf Standard Time", "standard_tz_abbreviation": "GST", "standard_tz_full_name": "Gulf Standard Time", "is_dst": false, "dst_savings": 0, "dst_exists": false, "dst_tz_abbreviation": "", "dst_tz_full_name": "", "dst_start": {}, "dst_end": {} } }curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&iata_code=DXB'
Pass any 5-character UN/LOCODE using the lo_code parameter to get the timezone alongside city details, state code, country code, and location type — covering ports, rail terminals, road terminals, airports, and postal exchanges worldwide. Used in logistics platforms, freight tracking systems, and supply chain software.
# Response { "lo_code_details": { "lo_code": "DEBER", "city": "Berlin", "state_code": "BE", "country_code": "DE", "country_name": "", "location_type": "Port, Rail Terminal, Road Terminal, Airport, Postal Exchange", "latitude": "52.51667", "longitude": "13.38333" }, "time_zone": { "name": "Europe/Berlin", "offset": 1, "offset_with_dst": 2, "date": "2025-09-02", "date_time": "2025-09-02 12:22:32", "date_time_txt": "Tuesday, September 02, 2025 12:22:32", "date_time_wti": "Tue, 02 Sep 2025 12:22:32 +0200", "date_time_ymd": "2025-09-02T12:22:32+0200", "date_time_unix": 1756808552.328, "time_24": "12:22:32", "time_12": "12:22:32 PM", "week": 36, "month": 9, "year": 2025, "year_abbr": "25", "current_tz_abbreviation": "CEST", "current_tz_full_name": "Central European Summer Time", "standard_tz_abbreviation": "GMT+01:00", "standard_tz_full_name": "Central European Standard Time", "is_dst": true, "dst_savings": 1, "dst_exists": true, "dst_tz_abbreviation": "CEST", "dst_tz_full_name": "Central European Summer Time", "dst_start": { "utc_time": "2025-03-30 TIME 01", "duration": "+1H", "gap": true, "date_time_after": "2025-03-30 TIME 03", "date_time_before": "2025-03-30 TIME 02", "overlap": false }, "dst_end": { "utc_time": "2025-10-26 TIME 01", "duration": "-1H", "gap": false, "date_time_after": "2025-10-26 TIME 02", "date_time_before": "2025-10-26 TIME 03", "overlap": true } } }curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&lo_code=DEBER'
Pass a standard IANA timezone name using the tz parameter (e.g. Europe/London, Asia/Dubai) to get all current date, time, DST, and offset details — without needing a location identifier or IP address. Useful for backend jobs, scheduled tasks, and data pipelines where the timezone name is already known.
curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&tz=Europe/London'
Add the lang parameter to any IP or address-based request to receive geolocation fields in your preferred language. This works alongside all standard timezone fields, which are always returned in English. Supported values: en (English), de (German), ru (Russian), ja (Japanese), fr (French), cn (Chinese Simplified), es (Spanish), cs (Czech), it (Italian).
curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&ip=1.1.1.1&lang=es'
Call the API without any parameters and it automatically resolves the timezone for the calling machine's IP address. No location input required — useful for server-side auto-detection, scheduling applications that need to capture a user's timezone at login, and event booking tools that handle timezone-aware scheduling automatically.
curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY'
To use the TimeZone API, API credits are required. Charges apply only for successful queries, defined by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits already charged will be refunded.
For each successful request, 1 credit will be charged for timezone lookup. Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.
GET https://api.apifreaks.com/v1.0/geolocation/timezone?ip=1.1.1.1The response includes the timezone name, current local time, UTC offset, DST status, and geolocation details for that IP. Omitting ipreturns timezone data for the calling machine's IP address.