{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ipgeolocation/json-schema/ipgeolocation-timezone-lookup-response-schema.json",
  "title": "TimezoneLookupResponse",
  "description": "Response returned by the Timezone Lookup API.\n\nContains timezone information for the requested identifier such as a\ntimezone name, IP address, geographic coordinates, location address,\nairport code (IATA/ICAO), or UN/LOCODE.\n\nDepending on the lookup method used, additional contextual objects may\nbe returned:\n\n- `ip` appears when the lookup is performed using an IP address or when\n  no parameters are provided (caller IP lookup).\n- `location` appears when the lookup is performed using an IP address\n  or location address.\n- `airport_details` appears when the lookup is performed using\n  `iata_code` or `icao_code`.\n- `lo_code_details` appears when the lookup is performed using\n  `lo_code`.\n\nThe `time_zone` object is always present in the response.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ipgeolocation-timezone-api-openapi.yml#/components/schemas/TimezoneLookupResponse",
  "type": "object",
  "properties": {
    "ip": {
      "type": "string",
      "description": "The IP address used to determine the timezone. This field appears\nonly when the lookup is performed using an IP address or when the\nAPI resolves the caller's IP automatically.\n"
    },
    "location": {
      "$ref": "#/$defs/Location"
    },
    "airport_details": {
      "$ref": "#/$defs/AirportDetails"
    },
    "lo_code_details": {
      "$ref": "#/$defs/LocodeDetails"
    },
    "time_zone": {
      "$ref": "#/$defs/Timezone"
    }
  },
  "$defs": {
    "AirportDetails": {
      "type": "object",
      "description": "Airport information returned when the timezone lookup is performed\nusing `iata_code` or `icao_code`.\n\nContains metadata about the airport including its geographic\ncoordinates, country, and airport identifiers.\n",
      "properties": {
        "type": {
          "type": "string",
          "description": "Classification of the airport based on size and traffic."
        },
        "name": {
          "type": "string",
          "description": "Official name of the airport."
        },
        "latitude": {
          "type": "string",
          "description": "Latitude coordinate of the airport."
        },
        "longitude": {
          "type": "string",
          "description": "Longitude coordinate of the airport."
        },
        "elevation_ft": {
          "type": "number",
          "description": "Airport elevation above sea level measured in feet."
        },
        "continent_code": {
          "type": "string",
          "description": "Two-letter continent code where the airport is located."
        },
        "country_code": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code."
        },
        "state_code": {
          "type": "string",
          "description": "State or province code where the airport is located."
        },
        "city": {
          "type": "string",
          "description": "City served by the airport."
        },
        "iata_code": {
          "type": "string",
          "description": "Three-letter IATA airport identifier."
        },
        "icao_code": {
          "type": "string",
          "description": "Four-letter ICAO airport identifier."
        },
        "faa_code": {
          "type": "string",
          "description": "FAA location identifier used primarily in the United States."
        }
      }
    },
    "DSTTransition": {
      "type": "object",
      "description": "Represents a daylight saving time transition event including the\nmoment when DST begins or ends.\n",
      "properties": {
        "utc_time": {
          "type": "string",
          "description": "UTC timestamp when the DST transition occurs."
        },
        "duration": {
          "type": "string",
          "description": "Time change applied during the transition."
        },
        "gap": {
          "type": "boolean",
          "description": "Indicates whether an hour is skipped during the transition."
        },
        "date_time_after": {
          "type": "string",
          "description": "Local date and time immediately after the DST change."
        },
        "date_time_before": {
          "type": "string",
          "description": "Local date and time immediately before the DST change."
        },
        "overlap": {
          "type": "boolean",
          "description": "Indicates whether clock time overlaps during the transition."
        }
      }
    },
    "Location": {
      "type": "object",
      "description": "Geolocation information associated with the requested IP address\nor location query.\n\nThis object appears when the timezone lookup is performed using\nthe `ip` or `location` parameters.\n\nIt provides geographic details such as continent, country,\nadministrative regions, and coordinates used to determine the\ncorresponding timezone.\n",
      "properties": {
        "location_string": {
          "type": "string",
          "description": "Original location string provided in the request."
        },
        "continent_code": {
          "type": "string",
          "description": "Two-letter continent code."
        },
        "continent_name": {
          "type": "string",
          "description": "Full name of the continent."
        },
        "country_code2": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code."
        },
        "country_code3": {
          "type": "string",
          "description": "ISO 3166-1 alpha-3 country code."
        },
        "country_name": {
          "type": "string",
          "description": "Common name of the country."
        },
        "country_name_official": {
          "type": "string",
          "description": "Official name of the country."
        },
        "is_eu": {
          "type": "boolean",
          "description": "Indicates whether the country is a member of the European Union."
        },
        "state_prov": {
          "type": "string",
          "description": "State, province, or region name."
        },
        "state_code": {
          "type": "string",
          "description": "Standardized state or region code."
        },
        "district": {
          "type": "string",
          "description": "District or administrative subdivision."
        },
        "city": {
          "type": "string",
          "description": "City name of the location."
        },
        "locality": {
          "type": "string",
          "description": "Smaller locality or neighborhood within the city."
        },
        "zipcode": {
          "type": "string",
          "description": "ZIP or postal code of the location."
        },
        "latitude": {
          "type": "string",
          "description": "Latitude coordinate of the location."
        },
        "longitude": {
          "type": "string",
          "description": "Longitude coordinate of the location."
        }
      }
    },
    "LocodeDetails": {
      "type": "object",
      "description": "City or logistics location information returned when the timezone\nlookup is performed using a UN/LOCODE.\n\nUN/LOCODE is a five-character identifier consisting of a two-letter\ncountry code followed by a three-character location identifier.\n",
      "properties": {
        "lo_code": {
          "type": "string",
          "description": "UN/LOCODE representing the city or logistics location."
        },
        "city": {
          "type": "string",
          "description": "Name of the city associated with the UN/LOCODE."
        },
        "state_code": {
          "type": "string",
          "description": "State or region code of the location."
        },
        "country_code": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code."
        },
        "country_name": {
          "type": "string",
          "description": "Name of the country where the location exists."
        },
        "location_type": {
          "type": "string",
          "description": "Type of facilities available at the location such as port,\nrail terminal, road terminal, airport, or postal exchange.\n"
        },
        "latitude": {
          "type": "string",
          "description": "Latitude coordinate of the location."
        },
        "longitude": {
          "type": "string",
          "description": "Longitude coordinate of the location."
        }
      }
    },
    "Timezone": {
      "type": "object",
      "description": "Detailed timezone information for the requested location or identifier.\n\nContains timezone metadata such as UTC offset, daylight saving time (DST)\nstatus, formatted timestamps, and DST transition information.\n",
      "properties": {
        "name": {
          "type": "string",
          "description": "IANA timezone identifier for the location."
        },
        "offset": {
          "format": "float",
          "description": "Standard timezone offset from UTC in hours."
        },
        "offset_with_dst": {
          "format": "float",
          "description": "Timezone offset from UTC including daylight saving time."
        },
        "date": {
          "type": "string",
          "description": "Current date in `YYYY-MM-DD` format."
        },
        "date_time": {
          "type": "string",
          "description": "Current date and time in `YYYY-MM-DD HH:mm:ss` format."
        },
        "date_time_txt": {
          "type": "string",
          "description": "Human-readable date and time string."
        },
        "date_time_wti": {
          "type": "string",
          "description": "Date and time with timezone information."
        },
        "date_time_ymd": {
          "type": "string",
          "description": "ISO-8601 formatted date and time with timezone offset."
        },
        "current_time_unix": {
          "type": "number",
          "format": "float",
          "description": "Unix timestamp representing the current date and time."
        },
        "time_24": {
          "type": "string",
          "description": "Current local time in 24-hour format."
        },
        "time_12": {
          "type": "string",
          "description": "Current local time in 12-hour format."
        },
        "week": {
          "type": "number",
          "description": "Week number of the current year."
        },
        "month": {
          "type": "number",
          "description": "Current month number."
        },
        "year": {
          "type": "number",
          "description": "Four-digit year."
        },
        "year_abbr": {
          "type": "string",
          "description": "Two-digit abbreviated year."
        },
        "current_tz_abbreviation": {
          "type": "string",
          "description": "Abbreviation of the timezone currently in effect."
        },
        "current_tz_full_name": {
          "type": "string",
          "description": "Full name of the timezone currently in effect."
        },
        "standard_tz_abbreviation": {
          "type": "string",
          "description": "Standard (non-DST) timezone abbreviation."
        },
        "standard_tz_full_name": {
          "type": "string",
          "description": "Full name of the standard timezone."
        },
        "is_dst": {
          "type": "boolean",
          "description": "Indicates whether daylight saving time is currently active."
        },
        "dst_savings": {
          "type": "number",
          "format": "float",
          "description": "Number of hours added during daylight saving time."
        },
        "dst_exists": {
          "type": "boolean",
          "description": "Indicates whether the region observes daylight saving time."
        },
        "dst_tz_abbreviation": {
          "type": "string",
          "description": "Abbreviation used during daylight saving time."
        },
        "dst_tz_full_name": {
          "type": "string",
          "description": "Full name used during daylight saving time."
        },
        "dst_start": {
          "$ref": "#/$defs/DSTTransition"
        },
        "dst_end": {
          "$ref": "#/$defs/DSTTransition"
        }
      }
    }
  }
}