Batch Request

This provides current conditions and the hourly and daily forecast to 10 days at a set of locations. Each location is defined by a latitude/longitude pair, a city and state, a city and country, an IATA airport code, an ICAO station code, or a United States Postal Service zip code.

GET /batch?locations={latitude1},{longitude1},{latitude2},{longitude2},...
GET /batch?cities={city1},{state1},{city2},{state2},...
GET /batch?cities={city1},{country1},{city2},{country2},...
GET /batch?airports={iata1},{iata2},{iata3},...
GET /batch?stations={icao1},{icao2},{icao3},...
GET /batch?zipcodes={zip1},{zip2},{zip3},...

Optional Parameters

The default response uses English units.

Name Type Description Accepted Values / Range Example
units string unit of measure english or metric metric

Request Example

See Headers for request header details.

$ curl -n https://current-and-forecast.api.wdtinc.com/batch?locations=35.482,-97.535,39.052,-94.481 \
-H "Accept: application/vnd.wdt+json; version=1"

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
[
  {
    "language": "en-US",
    "location": {
      "latitude": 35.482,
      "longitude": -97.535,
      "city": "Oklahoma City",
      "state": "OK",
      "zipCode": 73106,
      "country": "United States",
      "iataCode": null,
      "icaoCode": null,
      "timezone": "CDT",
      "timezoneOffset": -5
    },
    "units": {
      "temperature": "F",
      "pressure": "in",
      "speed": "mph",
      "distance": "mi"
    },
    "currentConditions": {
      "temperature": 72,
      "dewpoint": 55,
      "relativeHumidity": 56,
      "apparentTemperature": 72,
      "windDirection": "SSE",
      "windSpeed": 21,
      "windGust": 25,
      "pressure": 30.26,
      "weatherText": "Clear",
      "weatherCode": 100,
      "iconLink": "http://icons.api.wdtinc.com/daytime/clear.png",
      "cloudCoverPercent": 0,
      "visibility": 10,
      "moonPhase": "New Moon",
      "sunrise": "06:30",
      "sunset": "20:05"
    },
    "dailyForecasts": [
      {
        "date": "2016-09-01",
        "dayOfWeek": "Thursday",
        "highTemperature": 76,
        "lowTemperature": 59,
        "windDirection": "SSE",
        "windSpeed": 21,
        "windGust": 25,
        "probabilityOfPrecipitation": 0,
        "weatherText": "Clear",
        "weatherCode": 100,
        "iconLink": "http://icons.api.wdtinc.com/daytime/clear.png",
        "sunrise": "06:30",
        "sunset": "20:05"
      },
      {
        "date": "2016-09-02",
        "dayOfWeek": "Friday",
        "highTemperature": 76,
        "lowTemperature": 59,
        "windDirection": "SSE",
        "windSpeed": 21,
        "windGust": 25,
        "probabilityOfPrecipitation": 0,
        "weatherText": "Clear",
        "weatherCode": 100,
        "iconLink": "http://icons.api.wdtinc.com/daytime/clear.png",
        "sunrise": "06:31",
        "sunset": "20:04"
      },
      :
      :
    ],
    "hourlyForecasts": [
      {
        "time": "2016-09-01T16:00:00Z",
        "temperature": 72,
        "dewpoint": 55,
        "relativeHumidity": 56,
        "apparentTemperature": 72,
        "windDirection": "SSE",
        "windSpeed": 21,
        "windGust": 25,
        "probabilityOfPrecipitation": 0,
        "weatherText": "Clear",
        "weatherCode": 100,
        "iconLink": "http://icons.api.wdtinc.com/daytime/clear.png",
        "cloudCoverPercent": 0
      },
      {
        "time": "2016-09-01T17:00:00Z",
        "temperature": 72,
        "dewpoint": 55,
        "relativeHumidity": 56,
        "apparentTemperature": 72,
        "windDirection": "SSE",
        "windSpeed": 21,
        "windGust": 25,
        "probabilityOfPrecipitation": 0,
        "weatherText": "Clear",
        "weatherCode": 100,
        "iconLink": "http://icons.api.wdtinc.com/daytime/clear.png",
        "cloudCoverPercent": 0
      },
      :
      :
    ]
  },
  {
    "language": "en-US",
    "location": {
      "latitude": 39.052,
      "longitude": -94.481,
      "city": "Kansas City",
      "state": "MO",
      "zipCode": 64129,
      "country": "United States",
      "iataCode": null,
      "icaoCode": null,
      "timezone": "CDT",
      "timezoneOffset": -5
    },
    "units": {
      "temperature": "F",
      "pressure": "in",
      "speed": "mph",
      "distance": "mi"
    },
    "currentConditions": {
      "temperature": 72,
      "dewpoint": 55,
      "relativeHumidity": 56,
      "apparentTemperature": 72,
      "windDirection": "SSE",
      "windSpeed": 21,
      "windGust": 25,
      "pressure": 30.26,
      "weatherText": "Clear",
      "weatherCode": 100,
      "iconLink": "http://icons.api.wdtinc.com/daytime/clear.png",
      "cloudCoverPercent": 0,
      "visibility": 10,
      "moonPhase": "New Moon",
      "sunrise": "06:30",
      "sunset": "20:05"
    },
    "dailyForecasts": [
      {
        "date": "2016-09-01",
        "dayOfWeek": "Thursday",
        "highTemperature": 76,
        "lowTemperature": 59,
        "windDirection": "SSE",
        "windSpeed": 21,
        "windGust": 25,
        "probabilityOfPrecipitation": 0,
        "weatherText": "Clear",
        "weatherCode": 100,
        "iconLink": "http://icons.api.wdtinc.com/daytime/clear.png",
        "sunrise": "06:30",
        "sunset": "20:05"
      },
      {
        "date": "2016-09-02",
        "dayOfWeek": "Friday",
        "highTemperature": 76,
        "lowTemperature": 59,
        "windDirection": "SSE",
        "windSpeed": 21,
        "windGust": 25,
        "probabilityOfPrecipitation": 0,
        "weatherText": "Clear",
        "weatherCode": 100,
        "iconLink": "http://icons.api.wdtinc.com/daytime/clear.png",
        "sunrise": "06:31",
        "sunset": "20:04"
      },
      :
      :
    ],
    "hourlyForecasts": [
      {
        "time": "2016-09-01T16:00:00Z",
        "temperature": 72,
        "dewpoint": 55,
        "relativeHumidity": 56,
        "apparentTemperature": 72,
        "windDirection": "SSE",
        "windSpeed": 21,
        "windGust": 25,
        "probabilityOfPrecipitation": 0,
        "weatherText": "Clear",
        "weatherCode": 100,
        "iconLink": "http://icons.api.wdtinc.com/daytime/clear.png",
        "cloudCoverPercent": 0
      },
      {
        "time": "2016-09-01T17:00:00Z",
        "temperature": 72,
        "dewpoint": 55,
        "relativeHumidity": 56,
        "apparentTemperature": 72,
        "windDirection": "SSE",
        "windSpeed": 21,
        "windGust": 25,
        "probabilityOfPrecipitation": 0,
        "weatherText": "Clear",
        "weatherCode": 100,
        "iconLink": "http://icons.api.wdtinc.com/daytime/clear.png",
        "cloudCoverPercent": 0
      },
      :
      :
    ]
  }
]