Tomorrow.io · JSON Structure

Historical Request Structure

Historical Timelines request body.

Type: object Properties: 7 Required: 4
WeatherClimateForecastHistorical WeatherAir QualityPollenFireFloodRoutesMap TilesAviationMaritimePublic APIs

HistoricalRequest is a JSON Structure definition published by Tomorrow.io, describing 7 properties, of which 4 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

location fields units timesteps startTime endTime timezone

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/tomorrow/refs/heads/main/json-structure/historical-request-structure.json",
  "name": "HistoricalRequest",
  "description": "Historical Timelines request body.",
  "type": "object",
  "properties": {
    "location": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "description": "GeoJSON geometry \u2014 Point, LineString, or Polygon.",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "Point",
                "LineString",
                "Polygon"
              ],
              "example": "Point"
            },
            "coordinates": {
              "type": "array",
              "items": {},
              "example": [
                -71.0466,
                42.3478
              ]
            }
          },
          "required": [
            "type",
            "coordinates"
          ]
        }
      ]
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "temperature",
        "precipitationIntensity"
      ]
    },
    "units": {
      "type": "string",
      "enum": [
        "metric",
        "imperial"
      ],
      "default": "metric"
    },
    "timesteps": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "1h",
          "1d"
        ]
      },
      "example": [
        "1d"
      ]
    },
    "startTime": {
      "type": "datetime",
      "example": "2024-01-01T00:00:00Z"
    },
    "endTime": {
      "type": "datetime",
      "example": "2024-01-31T23:59:59Z"
    },
    "timezone": {
      "type": "string",
      "default": "UTC"
    }
  },
  "required": [
    "location",
    "fields",
    "startTime",
    "endTime"
  ]
}