Skip to main content
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

Successful response with weather forecast data

ForecastDay
object[]

A list of forecasted weather conditions for the next 7 days.

WeatherResponse
object

The current weather conditions for the city.