v1
latestOpenAPI 3.0.22026-07-132450182.6 KBWeather
Retrieve forecast values within given GeoJSON polygon for all requested weather elements and time periods.
Retrieve forecast values located within given area for requested weather elements and time period. Request body parameters are:
- poly: GeoJSON Polygon defining the area. Max allowed area is 1000 km^2.
- wxtypes: list of one or more weather forecast elements you wish to retrieve. Allowed values are "CIG", "DEWPT", "SKY", "TEMP", "VIS", "WINDDIR", "WINDGUST", "WINDSPEED".
- hours: number of hourly forecasts to return (1-24). For current hour only you should enter value of 1. To also retrieve values for each of the next n hours, enter n.
The response will consist of a GeoJSON FeatureCollection with one Feature for each forecast location found within requested area, properties of which will include an ordered list of forecast values for each requested weather element, for each requested hour. Units for each element are as follows:
- CIG: meters AGL
- DEWPT: degrees Celsius
- SKY: % cloud cover
- TEMP: degrees Celsius
- VIS: meters
- WINDDIR: degrees true
- WINDGUST: meters/sec
- WINDSPEED: meters/sec
post/us/v1/wx-forecast/polygon-query
Headers
x-api-keystring
Request body
Example request
{
"poly": {
"type": "Polygon",
"coordinates": [
[
[
-90.621,
41.505
],
[
-90.599,
41.498
],
[
-90.514,
41.508
],
[
-90.501,
41.523
],
[
-90.543,
41.538
],
[
-90.621,
41.505
]
]
]
},
"wxtypes": [
"TEMP",
"DEWPT"
],
"hours": 5
}Response
A GeoJSON FeatureCollection with one Feature for each forecast location found within requested area.
Example response
{
"found": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-90.59314,
41.514363
]
},
"properties": {
"temp": [
-2.91,
-0.52,
2.51,
3.74,
3.8
],
"dewpt": [
-4.91,
-3.86,
-2.4,
-1.54,
-0.81
],
"hour": [
"DEC 31 2022 16:00",
"DEC 31 2022 17:00",
"DEC 31 2022 18:00",
"DEC 31 2022 19:00",
"DEC 31 2022 20:00"
]
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-90.563976,
41.51365
]
},
"properties": {
"temp": [
-2.91,
-0.52,
2.51,
3.74,
3.8
],
"dewpt": [
-4.91,
-3.86,
-2.4,
-1.54,
-0.81
],
"hour": [
"DEC 31 2022 16:00",
"DEC 31 2022 17:00",
"DEC 31 2022 18:00",
"DEC 31 2022 19:00",
"DEC 31 2022 20:00"
]
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-90.534812,
41.512933
]
},
"properties": {
"temp": [
-2.51,
-0.52,
2.51,
3.74,
3.8
],
"dewpt": [
-4.91,
-3.86,
-2.4,
-1.54,
-0.81
],
"hour": [
"DEC 31 2022 16:00",
"DEC 31 2022 17:00",
"DEC 31 2022 18:00",
"DEC 31 2022 19:00",
"DEC 31 2022 20:00"
]
}
}
]
}
}