{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-maps/json-schema/microsoft-azure-maps-daily-historical-records-result-schema.json",
  "title": "DailyHistoricalRecordsResult",
  "description": "The response returned by the Get Daily Historical Records operation,\ncontaining one all-time record summary per calendar day for the queried\nlocation across the requested date range. The range is set by the\ncaller's requested start and end dates (up to 31 days), so `results`\ncarries one entry per calendar day in chronological order - for\nexample, a 3-day request spanning *2012-01-20* through *2012-01-22*\nreturns three entries with `date` values *2012-01-20T00:00:00-04:00*,\n*2012-01-21T00:00:00-04:00*, and *2012-01-22T00:00:00-04:00*. Each\nentry reports the most extreme values ever recorded at the location\nfor that calendar day across the full historical archive (record\nhigh and low temperature, plus record-setting precipitation and\nsnowfall), each tagged with the year the record was set - useful for\ncomparing today's conditions against the all-time benchmarks for the\nsame date.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-maps-weather-api-openapi.yml#/components/schemas/DailyHistoricalRecordsResult",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "The list of all-time record summaries for the queried location, one\nentry per calendar day, in chronological order starting with the\nearliest day in the requested range. The number of entries matches\nthe number of days from the requested start date through the\nrequested end date (up to 31 days). Each entry reports the day's\nrecord `temperature` (`maximum`, `minimum`, and the long-term\n`average`), record `precipitation`, and record `snowfall`, each\npaired with the `year` the extreme was observed - for example, the\nrecord low on *2012-01-22* is *-21.7 °C* set in *1984*.",
      "items": {
        "$ref": "#/$defs/DailyHistoricalRecords"
      }
    },
    "nextLink": {
      "type": "string",
      "description": "The URL to retrieve the next page of results when the response is\npaginated, suitable for navigating through result sets too large to\nreturn in a single call. Empty when there are no further pages."
    }
  },
  "$defs": {
    "DailyHistoricalRecords": {
      "type": "object",
      "description": "The all-time record summary for a single calendar day at the queried\nlocation, returned as one entry in `DailyHistoricalRecordsResult.results`.\nEach entry reports the most extreme values ever recorded at the location\nfor that calendar day across the full historical archive: the record\nhigh and low `temperature` (each tagged with the `year` it was set, plus\nthe long-term average for the date), the record `precipitation` total,\nand the record `snowfall` total. Across the entries in a single response\nthe records vary by date - in the example response the record high\ntemperature climbs *18.3 °C* (set in *1951*) on *2012-01-20*, then\n*16.7 °C* (*1959*) on *2012-01-21*, then *21.1 °C* (*1906*) on\n*2012-01-22*, while the record lows fall *-19.4 °C* (*1984*),\n*-21.1 °C* (*1985*), and *-21.7 °C* (*1984*) on the same three days.",
      "properties": {
        "date": {
          "type": "string",
          "format": "date-time",
          "description": "The calendar day this record summary covers, in [ISO\n8601](https://www.iso.org/iso-8601-date-and-time-format.html) format\n(yyyy-mm-ddThh:mm:ss+hh:mm) - for example,\n*2012-01-20T00:00:00-04:00*. Only the month and day are meaningful\nfor record lookups; the year on `date` is the year of the request,\nwhile the year of each individual record is carried on the\n`WeatherValueYear.year` field."
        },
        "temperature": {
          "$ref": "#/$defs/WeatherValueYearMaxMinAvg",
          "description": "The record-setting `maximum` and `minimum` temperatures ever\nobserved at the queried location for this calendar day - each\ntagged with the year the record was set - together with the\nlong-term `average` temperature for the date, in degrees Celsius\n(°C) or Fahrenheit (°F) depending on the unit specified in the\nrequest. For example, on *2012-01-20* the record high is\n*18.3 °C* (set in *1951*), the record low is *-19.4 °C*\n(*1984*), and the long-term average is *-0.6 °C*."
        },
        "precipitation": {
          "$ref": "#/$defs/WeatherValueYearMax",
          "description": "The largest single-day precipitation total ever observed at the\nqueried location for this calendar day, tagged with the year it\nwas set, in millimeters (mm) or inches (in) depending on the unit\nspecified in the request - for example, *48 mm* set in *1978* on\n*2012-01-20*. Only the record `maximum` is reported because\nminimum precipitation for any calendar day is trivially zero."
        },
        "snowfall": {
          "$ref": "#/$defs/WeatherValueYearMax",
          "description": "The largest single-day snowfall total ever observed at the queried\nlocation for this calendar day, tagged with the year it was set,\nin centimeters (cm) or inches (in) depending on the unit specified\nin the request - for example, *12.19 cm* set in *1978* on\n*2012-01-20*, or *34.29 cm* set in *2014* on *2012-01-21*. Only\nthe record `maximum` is reported because minimum snowfall for any\ncalendar day is trivially zero."
        }
      }
    },
    "UnitType": {
      "type": "number",
      "description": "An integer value associated with the type of unit being displayed.\nFor example, 17 for Celsius, 18 for Fahrenheit. Can be used for unit\ntranslation. For more information, see [Weather services in\nAzure Maps](/azure/azure-maps/weather-services-concepts#unit-types).",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        16,
        17,
        18,
        19,
        20,
        21,
        22,
        31
      ],
      "x-ms-enum": {
        "name": "UnitType",
        "modelAsString": true,
        "values": [
          {
            "name": "Feet",
            "value": 0,
            "description": "feet"
          },
          {
            "name": "Inches",
            "value": 1,
            "description": "inches"
          },
          {
            "name": "Miles",
            "value": 2,
            "description": "miles"
          },
          {
            "name": "Millimeter",
            "value": 3,
            "description": "millimeter"
          },
          {
            "name": "Centimeter",
            "value": 4,
            "description": "centimeter"
          },
          {
            "name": "Meter",
            "value": 5,
            "description": "meter"
          },
          {
            "name": "Kilometer",
            "value": 6,
            "description": "kilometer"
          },
          {
            "name": "KilometersPerHour",
            "value": 7,
            "description": "kilometersPerHour"
          },
          {
            "name": "Knots",
            "value": 8,
            "description": "knots"
          },
          {
            "name": "MilesPerHour",
            "value": 9,
            "description": "milesPerHour"
          },
          {
            "name": "MetersPerSecond",
            "value": 10,
            "description": "metersPerSecond"
          },
          {
            "name": "HectoPascals",
            "value": 11,
            "description": "hectoPascals"
          },
          {
            "name": "InchesOfMercury",
            "value": 12,
            "description": "inchesOfMercury"
          },
          {
            "name": "KiloPascals",
            "value": 13,
            "description": "kiloPascals"
          },
          {
            "name": "Millibars",
            "value": 14,
            "description": "millibars"
          },
          {
            "name": "MillimetersOfMercury",
            "value": 15,
            "description": "millimetersOfMercury"
          },
          {
            "name": "PoundsPerSquareInch",
            "value": 16,
            "description": "poundsPerSquareInch"
          },
          {
            "name": "Celsius",
            "value": 17,
            "description": "Celsius"
          },
          {
            "name": "Fahrenheit",
            "value": 18,
            "description": "Fahrenheit"
          },
          {
            "name": "Kelvin",
            "value": 19,
            "description": "kelvin"
          },
          {
            "name": "Percent",
            "value": 20,
            "description": "percent"
          },
          {
            "name": "Float",
            "value": 21,
            "description": "float"
          },
          {
            "name": "Integer",
            "value": 22,
            "description": "integer"
          },
          {
            "name": "MicrogramsPerCubicMeterOfAir",
            "value": 31,
            "description": "MicrogramsPerCubicMeterOfAir"
          }
        ]
      }
    },
    "WeatherValue": {
      "type": "object",
      "description": "Values for weather-related metrics such as temperature, dew point, and wind\nspeed, presented in either metric or imperial units, as specified in the unit\nURI parameter. For more information, see [Unit\ntypes](/azure/azure-maps/weather-services-concepts#unit-types) in the article\nWeather services in Azure Maps.",
      "properties": {
        "value": {
          "type": "number",
          "format": "float",
          "description": "The measured value expressed in the specified unit."
        },
        "unit": {
          "type": "string",
          "description": "The unit of measurement used in the return value, such as \"C\" for Celsius,\n\"F\" for Fahrenheit."
        },
        "unitType": {
          "$ref": "#/$defs/UnitType",
          "description": "An integer representing the type of unit. For example, 0 for feet, 1 for\ninches, 2 for miles. For a complete list, see [Unit\ntypes](/azure/azure-maps/weather-services-concepts#unit-types) in the\narticle Weather services in Azure Maps."
        }
      }
    },
    "WeatherValueYear": {
      "type": "object",
      "description": "A single record-setting measurement tagged with the year the record was\nset, used as a building block for the all-time daily extremes returned\non `DailyHistoricalRecords` - specifically the record `maximum` and\nrecord `minimum` of `WeatherValueYearMaxMinAvg` (record-high and\nrecord-low temperature) and the record `maximum` of\n`WeatherValueYearMax` (greatest precipitation, snowfall, and similar\naccumulated metrics). Each entry pairs the `value` and its `unit`/\n`unitType` with the `year` in which that value was observed at the\nqueried location for the calendar day in question - for example,\n*21.1 °C* set in *1906* (record high on *2012-01-22*), *-21.7 °C* set\nin *1984* (record low on *2012-01-22*), or *48 mm* of precipitation\nset in *1978*.",
      "properties": {
        "value": {
          "type": "number",
          "format": "float",
          "description": "The numeric record value, in the unit specified by `unit` /\n`unitType` - for example, *21.1* for the *21.1 °C* record high on\n*2012-01-22*, *-21.7* for the *-21.7 °C* record low on the same\nday, or *48* for the *48 mm* precipitation record set in *1978*.\nThe metric this value represents (record-high temperature,\nrecord-low temperature, greatest precipitation, greatest snowfall,\nand so on) is determined by which `WeatherValueYearMaxMinAvg` or\n`WeatherValueYearMax` field this entry appears under."
        },
        "unit": {
          "type": "string",
          "description": "Short string label for the unit of `value` - for example, *C* for\nCelsius or *F* for Fahrenheit on temperature records, *mm* or *in*\non precipitation records, and *cm* or *in* on snowfall records.\nWhich unit is used depends on the unit specified in the request."
        },
        "unitType": {
          "type": "integer",
          "format": "int32",
          "description": "An integer representing the type of unit. For a complete list, see\n[Unit types](/azure/azure-maps/weather-services-concepts#unit-types)\nin the article Weather services in Azure Maps."
        },
        "year": {
          "type": "integer",
          "format": "int32",
          "description": "The four-digit calendar year in which `value` was observed at the\nqueried location for this calendar day, identifying when the record\nwas set - for example, *1906* for the record high on *2012-01-22*,\n*1984* for the record low on the same day, and *1978* for the\nrecord precipitation. Note that the `year` of the surrounding\n`DailyHistoricalRecords.date` is just the year from the request\nwindow and is unrelated to the record year reported here; only the\nmonth and day of `date` identify the calendar day whose all-time\nrecord is being returned."
        }
      }
    },
    "WeatherValueYearMax": {
      "type": "object",
      "description": "A single-value record-high summary for a calendar day at the queried\nlocation: only `maximum` (tagged with the year the record was set\nvia `WeatherValueYear`). Used by `DailyHistoricalRecords.precipitation`\nand `DailyHistoricalRecords.snowfall` to report the greatest amount\never observed on that calendar day. Carries no minimum because the\nlowest amount of precipitation or snowfall for any given calendar\nday is trivially zero and therefore uninformative; symmetric metrics\nlike temperature use `WeatherValueYearMaxMinAvg` instead.",
      "properties": {
        "maximum": {
          "$ref": "#/$defs/WeatherValueYear",
          "description": "The all-time greatest amount ever observed at the queried location\nfor this calendar day, tagged with the year the record was set.\nUnits depend on which `DailyHistoricalRecords` field this entry\nappears under - precipitation values are in millimeters (mm) or\ninches (in), and snowfall values are in centimeters (cm) or inches\n(in), each according to the unit specified in the request. For\nexample, *48 mm* of precipitation set in *1978*, or *12.19 cm* of\nsnowfall set in *1978* (with *34.29 cm* set in *2014* on a\ndifferent calendar day)."
        }
      }
    },
    "WeatherValueYearMaxMinAvg": {
      "type": "object",
      "description": "The record-temperature triple for a single calendar day at a location -\nrecord `maximum` and `minimum` (each tagged with the year the record was\nset) plus the long-term `average` for that calendar date. Used as the\n`temperature` field on `DailyHistoricalRecords`. Values are in degrees\nCelsius (°C) or Fahrenheit (°F) depending on the unit specified in the\nrequest. For example, on *2012-01-20* the record high is *18.3 °C* set\nin *1951*, the record low is *-19.4 °C* set in *1984*, and the\nlong-term average for the date is *-0.6 °C*.",
      "properties": {
        "maximum": {
          "$ref": "#/$defs/WeatherValueYear",
          "description": "The all-time highest temperature ever observed at the queried\nlocation for this calendar day, tagged with the year the record was\nset, in degrees Celsius (°C) or Fahrenheit (°F) depending on the\nunit specified in the request - for example, *18.3 °C* set in\n*1951* on *2012-01-20*. Always greater than or equal to `minimum`."
        },
        "minimum": {
          "$ref": "#/$defs/WeatherValueYear",
          "description": "The all-time lowest temperature ever observed at the queried\nlocation for this calendar day, tagged with the year the record was\nset, in degrees Celsius (°C) or Fahrenheit (°F) depending on the\nunit specified in the request - for example, *-19.4 °C* set in\n*1984* on *2012-01-20*. Always less than or equal to `maximum`."
        },
        "average": {
          "$ref": "#/$defs/WeatherValue",
          "description": "The long-term average temperature for this calendar day at the\nqueried location, in degrees Celsius (°C) or Fahrenheit (°F)\ndepending on the unit specified in the request - for example,\n*-0.6 °C* on *2012-01-20*. The average is a multi-year climate\nvalue tied to the calendar date rather than to any single year, so\nunlike `maximum` and `minimum` it is a `WeatherValue` and carries\nno `year` field."
        }
      }
    }
  }
}