https://api.apifreaks.com/v1.0/geolocation/timezone
$ pip install requests
Click Test it to start the request and see the response here!
Below are the response fields when performing a lookup using geographical coordinates or a time-zone name:
Field | Type | Requirement | Description |
---|---|---|---|
timezone | String | Mandatory | The name of the timezone, e.g., "America/New_York" |
timezone_offset | Number | Mandatory | The time difference in hours from UTC for the specified timezone without considering DST |
timezone_offset_with_dst | Number | Mandatory | The time difference in hours from UTC for the specified timezone, including DST |
date | String | Mandatory | The current date in the specified timezone in YYYY-MM-DD format |
date_time | String | Mandatory | The current date and time in the specified timezone in ISO 8601 format |
date_time_txt | String | Mandatory | The current date and time in a human-readable format, e.g., "Wednesday, July 26, 2024, 15:00:00" |
date_time_wti | String | Mandatory | The current date and time in the specified timezone in "Weekday, Time" format |
date_time_ymd | String | Mandatory | The current date and time in "YYYY-MM-DD HH:MM:SS" format |
date_time_unix | Float | Mandatory | The current date and time as a Unix timestamp (seconds since Jan 1, 1970) |
time_24 | String | Mandatory | The current time in 24-hour format, e.g., "15:00:00" |
time_12 | String | Mandatory | The current time in 12-hour format with AM/PM, e.g., "03:00:00 PM" |
week | Number | Mandatory | The current week number of the year in the specified timezone |
month | Number | Mandatory | The current month number in the specified timezone |
year | Number | Mandatory | The current year in the specified timezone |
year_abbr | String | Mandatory | The abbreviated current year in the specified timezone, e.g., "24" for 2024 |
is_dst | Boolean | Mandatory | Indicates whether Daylight Saving Time (DST) is currently in effect in the specified timezone |
dst_savings | Number | Mandatory | The amount of time (in hours) by which clocks are adjusted for DST |
dst_exists | Boolean | Mandatory | Indicates whether DST is observed in the specified timezone |
dst_start | String | Mandatory | The start date of the DST period in the specified timezone |
dst_end | String | Mandatory | The end date of the DST period in the specified timezone |
dst_start.utc_time | String | Optional | The UTC time of the DST start date |
dst_start.duration | String | Optional | The duration of the DST start transition |
dst_start.gap | Boolean | Optional | Indicates whether there is a time gap at the start of DST |
dst_start.datetimeAfter | String | Optional | The date and time after the start of DST |
dst_start.datetimeBefore | String | Optional | The date and time before the start of DST |
dst_start.overlap | Boolean | Optional | Indicates whether there is an overlap period at the start of DST |
dst_end.utc_time | String | Optional | The UTC time of the DST end date |
dst_end.duration | String | Optional | The duration of the DST end transition |
dst_end.gap | Boolean | Optional | Indicates whether there is a time gap at the end of DST |
dst_end.datetimeAfter | String | Optional | The date and time after the end of DST |
dst_end.datetimeBefore | String | Optional | The date and time before the end of DST |
dst_end.overlap | Boolean | Optional | Indicates whether there is an overlap period at the end of DST |
The following fields will be appended to the above response based on the lookup performed using a location address:
Field | Type | Requirement | Description |
---|---|---|---|
geo.location | String | Mandatory | The complete geographical location, including country, state, city, and locality |
geo.country | String | Mandatory | The country of the geographical location |
geo.state | String | Mandatory | The state of the geographical location |
geo.city | String | Mandatory | The city of the geographical location |
geo.locality | String | Mandatory | The locality or neighborhood of the geographical location |
geo.latitude | Float | Mandatory | The latitude coordinate of the geographical location |
geo.longitude | Float | Mandatory | The longitude coordinate of the geographical location |
The following fields will be appended to the above response based on the lookup performed using an IP address:
Field | Type | Requirement | Description |
---|---|---|---|
geo.country_code2 | String | Mandatory | The 2-letter country code (ISO 3166-1 alpha-2) |
geo.country_code3 | String | Mandatory | The 3-letter country code (ISO 3166-1 alpha-3) |
geo.country_name | String | Mandatory | The common name of the country |
geo.continent_code | String | Mandatory | The two-letter code of the continent |
geo.continent_name | String | Mandatory | The full name of the continent |
geo.country_name_official | String | Mandatory | The official name of the country |
geo.state_prov | String | Mandatory | The state or province of the geographical location |
geo.is_eu | Boolean | Mandatory | Is the country belong to European Union? |
geo.state_code | String | Mandatory | The code for the state or province |
geo.district | String | Mandatory | The district of the geographical location |
geo.city | String | Mandatory | The city of the geographical location |
geo.zip_code | String | Mandatory | The postal code of the geographical location |
geo.latitude | String | Mandatory | The latitude coordinate of the geographical location |
geo.longitude | String | Mandatory | The longitude coordinate of the geographical location |
The following fields will be appended to the above response based on the lookup performed using an IATA code:
Field | Type | Requirement | Description |
---|---|---|---|
airportDetails.type | String | Mandatory | The type of airport (small, medium, large) |
airportDetails.name | String | Mandatory | The full name of the airport |
airportDetails.longitude | String | Mandatory | The longitude coordinate of the airport location |
airportDetails.latitude | String | Mandatory | The latitude coordinate of the airport location |
airportDetails.elevation_ft | Number | Mandatory | The elevation of the airport in feet |
airportDetails.continent_code | String | Mandatory | The 2-letter continent code where the airport is located |
airportDetails.country_code | String | Mandatory | The 2-letter country code where the airport is located |
airportDetails.state_code | String | Mandatory | The state or province code where the airport is located |
airportDetails.municipality | String | Mandatory | The city or municipality where the airport is located |
airportDetails.city | String | Mandatory | The city or administrative region that the airport serves to. |
airportDetails.iata_code | String | Mandatory | The IATA (International Air Transport Association) code for the airport |
airportDetails.icao_code | String | Mandatory | The ICAO (International Civil Aviation Organization) code for the airport |
airportDetails.faa_code | String | Mandatory | The FAA (Federal Aviation Administration) code for the airport |
The following fields will be appended to the above response based on the lookup performed using an ICAO code:
Field | Type | Requirement | Description |
---|---|---|---|
airportDetails.type | String | Mandatory | The type of airport (small, medium, large) |
airportDetails.name | String | Mandatory | The full name of the airport |
airportDetails.longitude | String | Mandatory | The longitude coordinate of the airport location |
airportDetails.latitude | String | Mandatory | The latitude coordinate of the airport location |
airportDetails.elevation_ft | Number | Mandatory | The elevation of the airport in feet |
airportDetails.continent_code | String | Mandatory | The 2-letter continent code where the airport is located |
airportDetails.country_code | String | Mandatory | The 2-letter country code where the airport is located |
airportDetails.state_code | String | Mandatory | The state or province code where the airport is located |
airportDetails.municipality | String | Mandatory | The city or municipality where the airport is located |
airportDetails.iata_code | String | Mandatory | The IATA (International Air Transport Association) code for the airport |
airportDetails.icao_code | String | Mandatory | The ICAO (International Civil Aviation Organization) code for the airport |
airportDetails.faa_code | String | Mandatory | The FAA (Federal Aviation Administration) code for the airport |
The following fields will be appended to the above response based on the lookup performed using a UN/LO CODE code:
Field | Type | Requirement | Description |
---|---|---|---|
loCodeDetails.lo_code | String | Mandatory | The UN/LO CODE code for the location |
loCodeDetails.city_name | String | Mandatory | The name of the city or location |
loCodeDetails.longitude | String | Mandatory | The longitude coordinate of the location |
loCodeDetails.latitude | String | Mandatory | The latitude coordinate of the location |
loCodeDetails.state_code | String | Mandatory | The state or province code of the location |
loCodeDetails.country_code | String | Mandatory | The 2-letter country code of the location |
loCodeDetails.administrative_country | String | Mandatory | The administrative country name of the location |
loCodeDetails.location_type | String | Mandatory | The type of the location (e.g., port, airport, rail terminal) |