GET
/
forecast
Get current 1-7 day forecast by city or ZIP Code.
curl --request GET \
  --url https://weather.io/forecast/forecast \
  --header 'X-API-Key: <api-key>'
{
  "ForecastDay": [
    {
      "date": "2023-10-01",
      "highTemperature": 28,
      "lowTemperature": 15,
      "description": "Sunny with a chance of rain"
    }
  ],
  "WeatherResponse": {
    "city": "Las Cruces",
    "zipCode": "88001",
    "temperature": 23.5,
    "unit": "Metric",
    "description": "Partly cloudy"
  }
}

Authorizations

X-API-Key
string
header
required

Query Parameters

city
string

Name of the city (e.g., 'Albuquerque'). If a ZIP Code is provided, the city will be derived from the ZIP Code.

zipCode
string

Optional ZIP Code for the city. If provided, it will be used to derive the city name.

unit
enum<string>
default:Metric

The unit of temperature measurement. Can be either 'Metric' or 'Imperial'. Default is 'Metric'.

Available options:
Metric,
Imperial
forecast length
integer
default:1

The number of days for the forecast. Default is 1 day, maximum is 7 days.

Required range: 1 <= x <= 7

Response

200
application/json

Successful response with weather forecast data

The response is of type object.