Timezone Lookup API - Get Timezone from IP, Coordinates, IATA Code & More
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 .
Features
Real-Time Timezone Data
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.
7 Input Methods in One Endpoint
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.
Full DST Transition Data
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.
Airport Details from IATA and ICAO Codes
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.
Logistics Code Support via UN/LOCODE
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.
9 Response Languages
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.
Timezone Lookup API
API Endpoint
$ pip install requestsimport requests
url = "https://api.apifreaks.com/v2.0/geolocation/timezone?lat=48.8566&long=2.3522"
payload = {}
headers = {
'X-apiKey': 'API-KEY'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Timezone Converter API
API Endpoint
$ pip install requestsimport requests
url = "https://api.apifreaks.com/v1.0/timezone/converter?lat_from=51.5074&long_from=-0.1278&lat_to=48.8566&long_to=2.3522&time=2025-06-15+12%3A00"
payload = {}
headers = {
'X-apiKey': 'API-KEY'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
How-To-Guides
Get Timezone from a City or Address
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": "2026-07-08", "date_time": "2026-07-08 12:39:34", "date_time_txt": "Wednesday, July 08, 2026 12:39:34", "date_time_wti": "Wed, 08 Jul 2026 12:39:34 +0100", "date_time_ymd": "2026-07-08T12:39:34+0100", "date_time_unix": 1783510774.8, "time_24": "12:39:34", "time_12": "12:39:34 PM", "week": 28, "month": 7, "year": 2026, "year_abbr": "26", "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", "current_time": "2026-07-08 14:19:48.696+0100", "current_time_unix": 1783516788.696, "dst_start": { "utc_time": "2026-03-29 TIME 01:00", "duration": "+1.00H", "gap": true, "date_time_after": "2026-03-29 TIME 02:00", "date_time_before": "2026-03-29 TIME 01:00", "overlap": false }, "dst_end": { "utc_time": "2026-10-25 TIME 01:00", "duration": "-1.00H", "gap": false, "date_time_after": "2026-10-25 TIME 01:00", "date_time_before": "2026-10-25 TIME 02:00", "overlap": true } } }curl -X 'GET' 'https://api.apifreaks.com/v2.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.
Get Timezone from GPS Coordinates
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": "Europe/Paris", "offset": 1, "offset_with_dst": 2, "date": "2026-07-08", "date_time": "2026-07-08 13:39:35", "date_time_txt": "Wednesday, July 08, 2026 13:39:35", "date_time_wti": "Wed, 08 Jul 2026 13:39:35 +0200", "date_time_ymd": "2026-07-08T13:39:35+0200", "date_time_unix": 1783510775.492, "time_24": "15:19:49", "time_12": "03:19:49 PM", "week": 28, "month": 7, "year": 2026, "year_abbr": "26", "current_tz_abbreviation": "CEST", "current_tz_full_name": "Central European Summer Time", "standard_tz_abbreviation": "CET", "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", "current_time": "2026-07-08 15:19:49.206+0200", "current_time_unix": 1783516789.206, "dst_start": { "utc_time": "2026-03-29 TIME 01:00", "duration": "+1.00H", "gap": true, "date_time_after": "2026-03-29 TIME 03:00", "date_time_before": "2026-03-29 TIME 02:00", "overlap": false }, "dst_end": { "utc_time": "2026-10-25 TIME 01:00", "duration": "-1.00H", "gap": false, "date_time_after": "2026-10-25 TIME 02:00", "date_time_before": "2026-10-25 TIME 03:00", "overlap": true } } }curl -X 'GET' 'https://api.apifreaks.com/v2.0/geolocation/timezone?apiKey=API-KEY&lat=48.8566&long=2.3522'
Get Timezone from an IP Address
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": "51.12.0.1", "location": { "continent_code": "EU", "continent_name": "Europe", "country_code2": "SE", "country_code3": "SWE", "country_name": "Sweden", "country_name_official": "Kingdom of Sweden", "is_eu": true, "state_prov": "Skane County", "state_code": "SE-M", "district": "Malmo", "city": "Malmo", "zipcode": "211 43", "latitude": "55.59669", "longitude": "13.00110" }, "time_zone": { "name": "Europe/Stockholm", "offset": 1, "offset_with_dst": 2, "date": "2026-07-08", "date_time": "2026-07-08 13:39:36", "date_time_txt": "Wednesday, July 08, 2026 13:39:36", "date_time_wti": "Wed, 08 Jul 2026 13:39:36 +0200", "date_time_ymd": "2026-07-08T13:39:36+0200", "date_time_unix": 1783510776.027, "time_24": "13:39:36", "time_12": "01:39:36 PM", "week": 28, "month": 7, "year": 2026, "year_abbr": "26", "current_tz_abbreviation": "CEST", "current_tz_full_name": "Central European Summer Time", "standard_tz_abbreviation": "CET", "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", "current_time": "2026-07-08 15:19:50.009+0200", "current_time_unix": 1783516790.009, "dst_start": { "utc_time": "2026-03-29 TIME 01:00", "duration": "+1.00H", "gap": true, "date_time_after": "2026-03-29 TIME 03:00", "date_time_before": "2026-03-29 TIME 02:00", "overlap": false }, "dst_end": { "utc_time": "2026-10-25 TIME 01:00", "duration": "-1.00H", "gap": false, "date_time_after": "2026-10-25 TIME 02:00", "date_time_before": "2026-10-25 TIME 03:00", "overlap": true } } }curl -X 'GET' 'https://api.apifreaks.com/v2.0/geolocation/timezone?apiKey=API-KEY&ip=51.12.0.1'
Get Timezone from an Airport Code (IATA or ICAO)
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": "London Heathrow Airport", "latitude": "51.47060", "longitude": "-0.46194", "elevation_ft": 83, "continent_code": "EU", "country_code": "GB", "state_code": "GB-ENG", "city": "London", "iata_code": "LHR", "icao_code": "EGLL", "faa_code": "" }, "time_zone": { "name": "Europe/London", "offset": 0, "offset_with_dst": 1, "date": "2026-07-08", "date_time": "2026-07-08 12:39:36", "date_time_txt": "Wednesday, July 08, 2026 12:39:36", "date_time_wti": "Wed, 08 Jul 2026 12:39:36 +0100", "date_time_ymd": "2026-07-08T12:39:36+0100", "date_time_unix": 1783510776.545, "time_24": "12:39:36", "time_12": "12:39:36 PM", "week": 28, "month": 7, "year": 2026, "year_abbr": "26", "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", "current_time": "2026-07-08 14:19:50.789+0100", "current_time_unix": 1783516790.789, "dst_start": { "utc_time": "2026-03-29 TIME 01:00", "duration": "+1.00H", "gap": true, "date_time_after": "2026-03-29 TIME 02:00", "date_time_before": "2026-03-29 TIME 01:00", "overlap": false }, "dst_end": { "utc_time": "2026-10-25 TIME 01:00", "duration": "-1.00H", "gap": false, "date_time_after": "2026-10-25 TIME 01:00", "date_time_before": "2026-10-25 TIME 02:00", "overlap": true } } }curl -X 'GET' 'https://api.apifreaks.com/v2.0/geolocation/timezone?apiKey=API-KEY&iata_code=LHR'
Get Timezone from a UN/LOCODE
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": "2026-07-08", "date_time": "2026-07-08 13:39:37", "date_time_txt": "Wednesday, July 08, 2026 13:39:37", "date_time_wti": "Wed, 08 Jul 2026 13:39:37 +0200", "date_time_ymd": "2026-07-08T13:39:37+0200", "date_time_unix": 1783510777.093, "time_24": "13:39:37", "time_12": "01:39:37 PM", "week": 28, "month": 7, "year": 2026, "year_abbr": "26", "current_tz_abbreviation": "CEST", "current_tz_full_name": "Central European Summer Time", "standard_tz_abbreviation": "CET", "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", "current_time": "2026-07-08 15:19:51.500+0200", "current_time_unix": 1783516791.5, "dst_start": { "utc_time": "2026-03-29 TIME 01:00", "duration": "+1.00H", "gap": true, "date_time_after": "2026-03-29 TIME 03:00", "date_time_before": "2026-03-29 TIME 02:00", "overlap": false }, "dst_end": { "utc_time": "2026-10-25 TIME 01:00", "duration": "-1.00H", "gap": false, "date_time_after": "2026-10-25 TIME 02:00", "date_time_before": "2026-10-25 TIME 03:00", "overlap": true } } }curl -X 'GET' 'https://api.apifreaks.com/v2.0/geolocation/timezone?apiKey=API-KEY&lo_code=DEBER'
Get Timezone by Name
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/v2.0/geolocation/timezone?apiKey=API-KEY&tz=Europe/London'
Get Timezone in a Specific Language
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/v2.0/geolocation/timezone?apiKey=API-KEY&ip=51.12.0.1&lang=es'
Auto-Detect Timezone from the Requesting IP
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/v2.0/geolocation/timezone?apiKey=API-KEY'
Convert Time Using Timezone Names
Pass the names of both timezones as tz_from and tz_to query parameters. tz_from is the timezone to convert and tz_to is the timezone to convert to.
# Response { "original_time": "2025-06-15 12:00:00", "converted_time": "2025-06-15 14:00:00", "diff_hour": 2, "diff_min": 120 }curl -X 'GET' 'https://api.apifreaks.com/v1.0/timezone/converter?apiKey=API-KEY&tz_from=Europe/London&tz_to=Europe/Istanbul&time=2025-06-15%2012:00'
Convert Time Using Location Coordinates
Pass the latitudes and longitudes of both locations using the query params lat_from, long_from and lat_to, long_to.
# Response { "original_time": "2025-06-15 12:00:00", "converted_time": "2025-06-15 04:00:00", "diff_hour": 8, "diff_min": 480 }curl -X 'GET' 'https://api.apifreaks.com/v1.0/timezone/converter?apiKey=API-KEY&lat_from=51.5074&long_from=-0.1278&lat_to=34.0522&long_to=-118.2437&time=2025-06-15%2012:00'
Convert Time Using Location Address
Pass the address of both locations using the query params location_from and location_to.
# Response { "original_time": "2025-06-15 12:00:00", "converted_time": "2025-06-15 06:00:00", "diff_hour": 6, "diff_min": 360 }curl -X 'GET' 'https://api.apifreaks.com/v1.0/timezone/converter?apiKey=API-KEY&location_from=Berlin,%20Germany&location_to=New%20York,%20USA&time=2025-06-15%2012:00'
Convert Time Using IATA Codes
Pass the IATA codes of both airports using the query params iata_from and iata_to.
# Response { "original_time": "2025-06-15 12:00:00", "converted_time": "2025-06-15 15:00:00", "diff_hour": 3, "diff_min": 180 }curl -X 'GET' 'https://api.apifreaks.com/v1.0/timezone/converter?apiKey=API-KEY&iata_from=LHR&iata_to=DXB&time=2025-06-15%2012:00'
Convert Time Using ICAO Codes
Pass the ICAO codes of both airports using the query params icao_from and icao_to.
# Response { "original_time": "2025-06-15 12:00:00", "converted_time": "2025-06-15 15:00:00", "diff_hour": 3, "diff_min": 180 }curl -X 'GET' 'https://api.apifreaks.com/v1.0/timezone/converter?apiKey=API-KEY&icao_from=EGLL&icao_to=OMDB&time=2025-06-15%2012:00'
Convert Time Using UN/LO CODE
Pass the UN/LO CODE codes of both cities using the query params locode_from and locode_to.
# Response { "original_time": "2025-06-15 12:00:00", "converted_time": "2025-06-15 21:00:00", "diff_hour": 9, "diff_min": 540 }curl -X 'GET' 'https://api.apifreaks.com/v1.0/timezone/converter?apiKey=API-KEY&locode_from=GBLON&locode_to=AUMEL&time=2025-06-15%2012:00'
Convert the Current Time
Omit the time query parameter and the API will perform conversion for the current time.
# Response { "original_time": "2026-07-07 15:24:43", "converted_time": "2026-07-07 16:24:43", "diff_hour": 1, "diff_min": 60 }curl -X 'GET' 'https://api.apifreaks.com/v1.0/timezone/converter?apiKey=API-KEY&location_from=London,%20UK&location_to=Paris,%20France'
FAQs
GET https://api.apifreaks.com/v2.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.
Pricing
To use the Timezone APIs, 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 both Timezone Lookup and Timezone Converter requests. 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.