Empty API

Weather API

1.0.0OAS 3.1

API for retrieving weather information, including current conditions, forecasts, and historical data.

API Base URL
  • Server 1:https://api.example.com/weather/v1

    Main API server

Additional Information

Weather

Operations related to weather data

Get current weather

Retrieves current weather conditions for a specified location.

get
https://api.example.com/weather/v1/current-weather

Query Parameters

locationstringrequired

Location for which to retrieve weather data.

Response

application/json

Successful operation

CurrentWeather

locationstring

Location of the weather data.

temperaturenumber(float)

Current temperature in Celsius.

humidityinteger

Current humidity percentage.

wind_speednumber(float)

Current wind speed in km/h.

descriptionstring

Description of the current weather conditions.

get/current-weather
 
application/json

Get 7-day forecast

Provides a 7-day weather forecast for a given location.

get
https://api.example.com/weather/v1/forecast

Query Parameters

locationstringrequired

Location for which to retrieve the forecast.

limitinteger(int32)

Maximum number of items to return

Default:7

>= 1<= 7

offsetinteger(int32)

Number of items to skip

Default:0

>= 0

Response

application/json

Successful operation

ForecastList

dataarray[object]

Example:{"date":"2024-07-08","high_temperature":22,"low_temperature":14,"condition":"Sunny"}

Show Child Parameters
metaobject
Show Child Parameters
get/forecast
 
application/json

Get historical weather data

Fetches historical weather data for a specific location and date range.

get
https://api.example.com/weather/v1/historical-weather

Query Parameters

locationstringrequired

Location for which to retrieve historical weather data.

start_datestring(date)required

Start date for the historical data (YYYY-MM-DD).

end_datestring(date)required

End date for the historical data (YYYY-MM-DD).

limitinteger(int32)

Maximum number of items to return

Default:20

>= 1<= 100

offsetinteger(int32)

Number of items to skip

Default:0

>= 0

Response

application/json

Successful operation

HistoricalWeatherList

dataarray[object]

Example:{"date":"2024-07-01","temperature":20,"humidity":75,"wind_speed":10,"description":"Sunny"}

Show Child Parameters
metaobject
Show Child Parameters
get/historical-weather
 
application/json