API Freaks logoAPI Freaks logo
CTRL+K

    APIs

  • Pricing
  • Resources
  • Tools

  • Contact us
CTRL+K
Sign InGet Started For Free
  • Overview
  • Documentation
  • How to Guides
  • Pricing
  • APIFreaks
  • Organization and Teams
  • Credits Usage API
  • IP Geolocation Lookup
  • Bulk IP Geolocation Lookup
  • Domain WHOIS Lookup
  • IP WHOIS Lookup
  • ASN Lookup
  • Domain WHOIS Historical Lookup
  • Domain WHOIS Reverse Lookup
  • Bulk Domain WHOIS Lookup
  • DNS Lookup
  • Historical DNS Lookup
  • Reverse DNS Lookup
  • Bulk DNS Lookup
  • SSL Certificate Lookup
  • Domain Availability
  • Bulk Domain Availability API
  • Website Screenshot
  • Bulk Screenshot
  • Currencies Exchange Rates
  • Currency Converter
  • Currency Time Series
  • Currency Fluctuation
  • Geolocalized Currency Converter
  • Live Commodity Prices
  • Commodity Historical Prices
  • Commodity Fluctuation
  • Commodity Time Series
  • Timezone Lookup
  • Timezone Converter
  • Zipcode Lookup
  • User Agent Parser
  • Bulk User Agent Parser
  • Astronomy API

Timezone Lookup API - Get Timezone from IP and More

The Timezone Lookup API allows you to retrieve timezone from IP address, location address, coordinates, timezone name, IATA Codes, ICAO Codes or UN/LO CODE. This API delivers a wide range of date and time information, including the current time, date in multiple formats, week, month, year, and Unix timestamp.

Get the timezone information by following ways:

  1. From timezone name
  2. From address (preferably city and country)
  3. From location coordinates (latitude and longitude)
  4. From IP address
  5. From IATA code
  6. From ICAO code
  7. From UN/LO Code

IP to Timezone API

Use our IP to timezone API to get timezone from IPv4 or IPv6 address by passing the ip query parameter. The response will include both timezone and geolocation details. In this scenario, you can also specify an additional "lang" parameter to receive geolocation information in multiple languages.

10K Free Credits, No Credit Card Required

Features

Real-Time Data

Get up-to-the-second timezone offset between two locations. Users always receive the most current and accurate time details.

Diverse Input Options

Use timezone name, location address, or location coordinates, IATA, ICAO or UN/LO CODE to perform time conversion making the api suitable for a wide range of applications.

Documentation

API Endpoint

GET

https://api.apifreaks.com/v1.0/geolocation/timezone

Test
LANGUAGE
Python
PHP
Java
Node
Ruby
JavaScript
C#
$ pip install requests

API Request

ParameterRequiredTypeDefaultDescription
ipNoStringrequest ipIPv4 or IPv6 address to extract timezone information using IP address
tzNoString-Extract timezone information using timezone name
locationNoString-Extract timezone information using location (preferably city and country)
latNoNumber-Latitude to extract timezone information using location coordinates
longNoNumber-Longitude to extract timezone information using location coordinates
langNoStringenResponse 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_codeNoString-The 3 letter IATA code to extract the comprehensive airport details along with the timezone information, in which that airport exists.
icao_codeNoString-The 4 letter ICAO code to extract the comprehensive airport details along with the timezone information, in which that airport exists.
lo_codeNoString-The 5 letter UN/LO CODE to extract the comprehensive lo code/city details along with the timezone information of the concerned city.

API Response

For a comprehensive view of the API response structure and detailed field descriptions, explore the interactive Response Table by clicking here.

HTTP Error Codes

HTTP StatusReasons
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.

How-To-Guides

Timezone Information for an Address

Pass the address using location query parameter to get the timezone information for an address.

curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&location=London,%20UK'
# 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 } } }

When getting timezone information using the location address, the response will also contain the location field for location information.

Timezone Information for Location Coordinates

Pass the latitude and longitude of a location as query parameters lat and long to get the timezone information for provided coordinates.

curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&lat=-27.4748&long=153.017'
# 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": {} } }

IP to Timezone API

Get timezone from IPv4 or IPv6 address by passing the ip query parameter to the IP to timezone API. The response will include both timezone and geolocation details. If the ip is not provided, the API will default to using the request's IP address.

curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&ip=1.1.1.1'
# 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": {} } }

When getting timezone information using the ip address, the response will also contain the location field for geolocation information for the ip address location. To get the geolocation information in a specific language, provide the language code using the lang parameter. Default geolocation response is in English.

curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&ip=1.1.1.1&lang=es'
The languages supported are:
  1. en (English)
  2. es(Spanish)
  3. de (German)
  4. fr (French)
  5. ja (Japanese)
  6. it (Italian)
  7. cs (Czech)
  8. ru (Russian)
  9. cn (Chinese Simplifed)

Timezone and Airport Details from IATA Code

Pass any 3 letter IATA code as a query paramter iata_code to get the comprehensive airport details along with the timezone information, in which that airport exists.

curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&iata_code=DXB'
# 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": {} } }

Timezone and Airport Details from ICAO Code

Pass the any 4 letter ICAO code as a query paramter icao_code to get the comprehensive airport details along with the timezone information, in which that airport exists.

curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&icao_code=KATL'
# Response { "airport_details": { "type": "large_airport", "name": "Hartsfield Jackson Atlanta International Airport", "latitude": "33.63670", "longitude": "-84.42810", "elevation_ft": 1026, "continent_code": "NA", "country_code": "US", "state_code": "US-GA", "city": "Atlanta", "iata_code": "ATL", "icao_code": "KATL", "faa_code": "" }, "time_zone": { "name": "America/New_York", "offset": -5, "offset_with_dst": -4, "date": "2025-09-02", "date_time": "2025-09-02 06:22:12", "date_time_txt": "Tuesday, September 02, 2025 06:22:12", "date_time_wti": "Tue, 02 Sep 2025 06:22:12 -0400", "date_time_ymd": "2025-09-02T06:22:12-0400", "date_time_unix": 1756808532.357, "time_24": "06:22:12", "time_12": "06:22:12 AM", "week": 36, "month": 9, "year": 2025, "year_abbr": "25", "current_tz_abbreviation": "EDT", "current_tz_full_name": "Eastern Daylight Time", "standard_tz_abbreviation": "EST", "standard_tz_full_name": "Eastern Standard Time", "is_dst": true, "dst_savings": 1, "dst_exists": true, "dst_tz_abbreviation": "EDT", "dst_tz_full_name": "Eastern Daylight Time", "dst_start": { "utc_time": "2025-03-09 TIME 07", "duration": "+1H", "gap": true, "date_time_after": "2025-03-09 TIME 03", "date_time_before": "2025-03-09 TIME 02", "overlap": false }, "dst_end": { "utc_time": "2025-11-02 TIME 06", "duration": "-1H", "gap": false, "date_time_after": "2025-11-02 TIME 01", "date_time_before": "2025-11-02 TIME 02", "overlap": true } } }

Timezone and City Details from UN/LO CODE

Pass any 5 letter UN/LO CODE as a query paramter lo_code to get the comprehensive lo code/city details along with the timezone information of the concerned city.

curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY&lo_code=DEBER'
# 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 } } }

Timezone Information for Calling Machine IP

Call the API without passing any location, coordinates, or IP address. It will use the calling machine's IP address to return the ip timezone information.

curl -X 'GET' 'https://api.apifreaks.com/v1.0/geolocation/timezone?apiKey=API-KEY'

Pricing

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.

Price Estimation Calculator

Ready to get started?

Sign Up for Free

APIFreaks

API Catalog

  • Geolocation APIs
  • WHOIS APIs
  • DNS APIs
  • SSL APIs
  • Domain APIs
  • Screenshot APIs
  • Currency APIs
  • Commodity APIs
  • Timezone APIs
  • Zipcode APIs
  • User Agent APIs
  • Other APIs

Tools Catalog

  • Code Formatters
  • Data & Query Tools
  • Text Tools
  • Email Utilities
  • Viewers

Docs

  • APIs
  • Swagger Docs

Pricing & Accounts

  • Pricing
  • Sign up
  • Sign In

Company

  • About Us
  • Resources
  • Terms
  • Privacy

Copyright © 2024

Made in Pakistan