<< Back to Docs Index

GET /forecast/:point v1

GET (Version 1)

Get a forecast at any location on earth (on land).

Return the current, hourly, daily, and rolled up (multi-hourly) for the geo point and elevation provided.

Example Requests

Retrieve current conditions (forecast) for Flagstaff, Arizona.

curl -X GET https://api.opensnow.com/forecast/-111.6518,35.1987?v=1&api_key=XYZ123&elev=6906

Retrieve 5 day forecast for the summit of Denali, Alaska.

curl -X GET https://api.opensnow.com/forecast/-151.0062,63.0693?v=1&api_key=XYZ123&elev=20320&days=5&current=false

⛈ Schema ⛈


Route Params

/forecast/:point

Route Params Schema

Name Type Description
point
array An x,y array of lng,lat values, represented as a comma separated string. Values will be rounded to 4 points of precision.
Example: -105.2705,40.015
point[0]
number Longitude
Min: -180   Max: 180
point[1]
number Latitude
Min: -90   Max: 90

Query String Parameters

Query String Parameters Sample

{
  "elev": 0,
  "units": "imperial",
  "current": true,
  "hours": 0,
  "days": 0,
  "rollup": 3,
  "rollup_duration": 24,
  "rollup_current": false,
  "v": 1,
  "api_key": "string"
}

Query String Parameters Schema

Name Type Description
elev
integer
Required
Elevation at forecast point. To be specified in feet if units are set to imperial, or meters if units are set to metric.
Examples: 0,5280
units
string Units to return data values in.
Default: imperial   Enum: imperial,metric
current
boolean Whether or not the current hour forecast should be returned.
Default: true
hours
integer The number of hourly forecast periods to be returned.
Default: 0   Min: 0   Max: 6
days
integer The number of daily forecast periods to be returned.
Default: 0   Min: 0   Max: 5
rollup
integer The number of hourly forecast periods to be rolled up.
Enum: 3,4,6,12
rollup_duration
integer The duration of hourly forecast periods to roll up... specified in hours. Ignored if rollup_hours is not set.
Default: 24   Min: 3   Max: 24
rollup_current
boolean Should the rollup period start with the current hour (true), or should it always evenly fall at 6a and 6p local time (false) to keep rollup periods consistent.
Default: false
v
integer
Required
Integer version number == 1
api_key
string
Required
API Access Token

Response 200

Response 200 Sample

{
  "forecast_current": {
    "display_at": "2019-08-24T14:15:22Z",
    "forecast_duration": 0,
    "conditions_id": 0,
    "conditions_label": "string",
    "conditions_icon_url": "http://example.com",
    "temp": 0,
    "wind_dir": 0,
    "wind_dir_label": "N",
    "wind_speed": 0,
    "wind_gust_speed": 0,
    "pop": 0,
    "precip_type": 0
  },
  "forecast_daily": [
    {
      "display_at": "2019-08-24T14:15:22Z",
      "forecast_duration": 0,
      "conditions_id": 0,
      "conditions_label": "string",
      "conditions_icon_url": "http://example.com",
      "temp": 0,
      "temp_min": 0,
      "temp_max": 0,
      "wind_dir": 0,
      "wind_dir_label": "N",
      "wind_speed": 0,
      "wind_gust_speed": 0,
      "pop": 0,
      "precip_type": 0
    }
  ],
  "forecast_hourly": [
    {
      "display_at": "2019-08-24T14:15:22Z",
      "forecast_duration": 0,
      "conditions_id": 0,
      "conditions_label": "string",
      "conditions_icon_url": "http://example.com",
      "temp": 0,
      "wind_dir": 0,
      "wind_dir_label": "N",
      "wind_speed": 0,
      "wind_gust_speed": 0,
      "pop": 0,
      "precip_type": 0
    }
  ],
  "forecast_rollup": [
    {
      "display_at": "2019-08-24T14:15:22Z",
      "forecast_duration": 0,
      "conditions_id": 0,
      "conditions_label": "string",
      "conditions_icon_url": "http://example.com",
      "temp": 0,
      "temp_min": 0,
      "temp_max": 0,
      "wind_dir": 0,
      "wind_dir_label": "N",
      "wind_speed": 0,
      "wind_gust_speed": 0,
      "pop": 0,
      "precip_type": 0
    }
  ],
  "timezone": "America/Denver",
  "attribution": {
    "link_url": "http://example.com",
    "link_text": "string",
    "description": "string",
    "image_light_url": "http://example.com",
    "image_dark_url": "http://example.com"
  }
}

Response 200 Schema

Name Type Description
forecast_current
object
nullable
The current forecast for the requested location, if the current query parameter is set to true.
forecast_current.
  display_at
date-time string
Required
Display time for forecast period, in UTC. Convert to local time using location IANA timezone name. This is typically the START of the forecast period, though in the case of forecast_snow_*, it is the end of the period representing total snow accumulation up until this time.
forecast_current.
  forecast_duration
integer
Required
Forecast duration in hours (metric: h, imperial: no conversion)
forecast_current.
  conditions_id
integer
Required
A unique identifier for each weather conditions status, where
-1 = --
0 = Snow & Wind
1 = Snow
2 = Snow Showers
3 = Rain
4 = Rain Showers
5 = Rain/Snow
6 = Light Rain/Snow
7 = Windy
8 = Cold
9 = Hot
10 = Cloudy
11 = day Mostly Sunny night Mostly Clear
12 = Partly Cloudy
13 = Mostly Cloudy
14 = day Sunny night Clear
15 = Thunderstorms
16 = Scattered T-Storms
17 = Thundersnow
forecast_current.
  conditions_label
string
Required
Conditions label
forecast_current.
  conditions_icon_url
uri string
Required
A URL to the icon for the forecast conditions.
forecast_current.
  temp
number
nullable
Temperature (metric: degC, imperial: degF)
forecast_current.
  wind_dir
integer
nullable
Wind direction (degrees of arc)
Min: 0   Max: 360
forecast_current.
  wind_dir_label
string
nullable
Wind direction label
Examples: N,NNW,SE
forecast_current.
  wind_speed
number
nullable
Wind speed (metric: km/h, imperial: mi/h)
forecast_current.
  wind_gust_speed
number
nullable
Wind gust speed (metric: km/h, imperial: mi/h)
forecast_current.
  pop
number
nullable
Probability of precipitation (%)
Min: 0   Max: 1
forecast_current.
  precip_type
integer
nullable
Preciptation type, where 0 = none, 1 = Snow, 2 = Rain/Snow Mixed, 3 = Rain
forecast_daily
array
forecast_daily[0]
object
nullable
Daily forecast periods if the days query parameter is passed, otherwise omitted.
forecast_daily[0].
  display_at
date-time string
Required
Display time for forecast period, in UTC. Convert to local time using location IANA timezone name. This is typically the START of the forecast period, though in the case of forecast_snow_*, it is the end of the period representing total snow accumulation up until this time.
forecast_daily[0].
  forecast_duration
integer
Required
Forecast duration in hours (metric: h, imperial: no conversion)
forecast_daily[0].
  conditions_id
integer
Required
A unique identifier for each weather conditions status, where
-1 = --
0 = Snow & Wind
1 = Snow
2 = Snow Showers
3 = Rain
4 = Rain Showers
5 = Rain/Snow
6 = Light Rain/Snow
7 = Windy
8 = Cold
9 = Hot
10 = Cloudy
11 = day Mostly Sunny night Mostly Clear
12 = Partly Cloudy
13 = Mostly Cloudy
14 = day Sunny night Clear
15 = Thunderstorms
16 = Scattered T-Storms
17 = Thundersnow
forecast_daily[0].
  conditions_label
string
Required
Conditions label
forecast_daily[0].
  conditions_icon_url
uri string
Required
A URL to the icon for the forecast conditions.
forecast_daily[0].
  temp
number
nullable
Temperature (metric: degC, imperial: degF)
forecast_daily[0].
  temp_min
number
nullable
Temperature min (metric: degC, imperial: degF)
forecast_daily[0].
  temp_max
number
nullable
Temperature maximum (metric: degC, imperial: degF)
forecast_daily[0].
  wind_dir
integer
nullable
Wind direction (degrees of arc)
Min: 0   Max: 360
forecast_daily[0].
  wind_dir_label
string
nullable
Wind direction label
Examples: N,NNW,SE
forecast_daily[0].
  wind_speed
number
nullable
Wind speed (metric: km/h, imperial: mi/h)
forecast_daily[0].
  wind_gust_speed
number
nullable
Wind gust speed (metric: km/h, imperial: mi/h)
forecast_daily[0].
  pop
number
nullable
Probability of precipitation (%)
Min: 0   Max: 1
forecast_daily[0].
  precip_type
integer
nullable
Preciptation type, where 0 = none, 1 = Snow, 2 = Rain/Snow Mixed, 3 = Rain
forecast_hourly
array
forecast_hourly[0]
object
nullable
Hourly forecast periods if the hours query parameter is passed, otherwise omitted.
forecast_hourly[0].
  display_at
date-time string
Required
Display time for forecast period, in UTC. Convert to local time using location IANA timezone name. This is typically the START of the forecast period, though in the case of forecast_snow_*, it is the end of the period representing total snow accumulation up until this time.
forecast_hourly[0].
  forecast_duration
integer
Required
Forecast duration in hours (metric: h, imperial: no conversion)
forecast_hourly[0].
  conditions_id
integer
Required
A unique identifier for each weather conditions status, where
-1 = --
0 = Snow & Wind
1 = Snow
2 = Snow Showers
3 = Rain
4 = Rain Showers
5 = Rain/Snow
6 = Light Rain/Snow
7 = Windy
8 = Cold
9 = Hot
10 = Cloudy
11 = day Mostly Sunny night Mostly Clear
12 = Partly Cloudy
13 = Mostly Cloudy
14 = day Sunny night Clear
15 = Thunderstorms
16 = Scattered T-Storms
17 = Thundersnow
forecast_hourly[0].
  conditions_label
string
Required
Conditions label
forecast_hourly[0].
  conditions_icon_url
uri string
Required
A URL to the icon for the forecast conditions.
forecast_hourly[0].
  temp
number
nullable
Temperature (metric: degC, imperial: degF)
forecast_hourly[0].
  wind_dir
integer
nullable
Wind direction (degrees of arc)
Min: 0   Max: 360
forecast_hourly[0].
  wind_dir_label
string
nullable
Wind direction label
Examples: N,NNW,SE
forecast_hourly[0].
  wind_speed
number
nullable
Wind speed (metric: km/h, imperial: mi/h)
forecast_hourly[0].
  wind_gust_speed
number
nullable
Wind gust speed (metric: km/h, imperial: mi/h)
forecast_hourly[0].
  pop
number
nullable
Probability of precipitation (%)
Min: 0   Max: 1
forecast_hourly[0].
  precip_type
integer
nullable
Preciptation type, where 0 = none, 1 = Snow, 2 = Rain/Snow Mixed, 3 = Rain
forecast_rollup
array
forecast_rollup[0]
object
nullable
Rollup forecast periods if the rollup query parameter is passed, otherwise omitted.
forecast_rollup[0].
  display_at
date-time string
Required
Display time for forecast period, in UTC. Convert to local time using location IANA timezone name. This is typically the START of the forecast period, though in the case of forecast_snow_*, it is the end of the period representing total snow accumulation up until this time.
forecast_rollup[0].
  forecast_duration
integer
Required
Forecast duration in hours (metric: h, imperial: no conversion)
forecast_rollup[0].
  conditions_id
integer
Required
A unique identifier for each weather conditions status, where
-1 = --
0 = Snow & Wind
1 = Snow
2 = Snow Showers
3 = Rain
4 = Rain Showers
5 = Rain/Snow
6 = Light Rain/Snow
7 = Windy
8 = Cold
9 = Hot
10 = Cloudy
11 = day Mostly Sunny night Mostly Clear
12 = Partly Cloudy
13 = Mostly Cloudy
14 = day Sunny night Clear
15 = Thunderstorms
16 = Scattered T-Storms
17 = Thundersnow
forecast_rollup[0].
  conditions_label
string
Required
Conditions label
forecast_rollup[0].
  conditions_icon_url
uri string
Required
A URL to the icon for the forecast conditions.
forecast_rollup[0].
  temp
number
nullable
Temperature (metric: degC, imperial: degF)
forecast_rollup[0].
  temp_min
number
nullable
Temperature min (metric: degC, imperial: degF)
forecast_rollup[0].
  temp_max
number
nullable
Temperature maximum (metric: degC, imperial: degF)
forecast_rollup[0].
  wind_dir
integer
nullable
Wind direction (degrees of arc)
Min: 0   Max: 360
forecast_rollup[0].
  wind_dir_label
string
nullable
Wind direction label
Examples: N,NNW,SE
forecast_rollup[0].
  wind_speed
number
nullable
Wind speed (metric: km/h, imperial: mi/h)
forecast_rollup[0].
  wind_gust_speed
number
nullable
Wind gust speed (metric: km/h, imperial: mi/h)
forecast_rollup[0].
  pop
number
nullable
Probability of precipitation (%)
Min: 0   Max: 1
forecast_rollup[0].
  precip_type
integer
nullable
Preciptation type, where 0 = none, 1 = Snow, 2 = Rain/Snow Mixed, 3 = Rain
timezone
string
Required
IANA timezone name
Examples: America/Denver,America/Los_Angeles,Asia/Hong_Kong
attribution
object
Required
Attribution details for data crediting and links back to source content.
attribution.
  link_url
uri string
nullable
URL to additional content on OpenSnow or OpenSummit platform.
attribution.
  link_text
string
nullable
Text to display for the additional content link.
attribution.
  description
string
Required
Fine print disclaimer for attribution of source content.
attribution.
  image_light_url
uri string
Required
URL OpenSnow or OpenSummit logo image, for use in light mode themes.
attribution.
  image_dark_url
uri string
Required
URL OpenSnow or OpenSummit logo image, for use in dark mode themes.

Response 4xx

Response 4xx Sample

{
  "status_code": 400,
  "error": "Bad Request",
  "messages": [
    "string"
  ]
}

Response 4xx Schema

Name Type Description
status_code
integer
Required
HTTP status code
Min: 400   Max: 499
error
string
Required
Error description
Examples: Bad Request,Unauthorized,Forbidden,Not Found
messages
array
Required
More detailed error message. This may be less-detailed/sanitized in production environments so as not to reveal any potentially sensitive information.
messages[0]
string

Response 5xx

Response 5xx Sample

{
  "status_code": 500,
  "error": "Internal Server Error",
  "messages": [
    "string"
  ]
}

Response 5xx Schema

Name Type Description
status_code
integer
Required
HTTP status code
Min: 500   Max: 599
error
string
Required
Error description
Example: Internal Server Error
messages
array
Required
More detailed error message. This may be less-detailed/sanitized in production environments so as not to reveal any potentially sensitive information.
messages[0]
string