Weather API

This section contains all the endpoints related to weather data, including current weather, forecasts, and historical weather information.

GET /v1/weather/current
Rate Limit: 1000/min Cost: ₦0.0050

Current Weather

Get current weather data for a specific location.

Example API Call

curl -X GET "https://api.riwe.io/v1/weather/current" \
  -H "X-API-KEY: your_api_key_here"

Parameters

Name Type Required Description

Example Response

{
    "humidity": 65,
    "pressure": 1012,
    "uv_index": 5,
    "timestamp": "2023-08-01T12:00:00Z",
    "conditions": "Partly Cloudy",
    "visibility": 10,
    "wind_speed": 10.2,
    "temperature": 25.5
}
GET /v1/weather/historical
Rate Limit: 500/min Cost: ₦0.0200

Historical Weather

Get historical weather data for a specific location.

Example API Call

curl -X GET "https://api.riwe.io/v1/weather/historical" \
  -H "X-API-KEY: your_api_key_here"

Parameters

Name Type Required Description

Example Response

{
    "data": [
        {
            "date": "2023-07-01",
            "humidity": 68,
            "conditions": "Clear",
            "precipitation": 0,
            "temperature_max": 29.5,
            "temperature_min": 19.2
        },
        {
            "date": "2023-07-02",
            "humidity": 72,
            "conditions": "Rain",
            "precipitation": 5.2,
            "temperature_max": 30.1,
            "temperature_min": 20.5
        }
    ],
    "location": {
        "name": "Abuja, Nigeria",
        "latitude": 9.0765,
        "longitude": 7.3986
    }
}
GET /v1/weather/alerts
Rate Limit: 1000/min Cost: ₦0.0050

Weather Alerts

Get weather alerts for a specific location.

Example API Call

curl -X GET "https://api.riwe.io/v1/weather/alerts" \
  -H "X-API-KEY: your_api_key_here"
GET /v1/weather/forecast
Rate Limit: 1000/min Cost: ₦0.0100

Weather Forecast

Get weather forecast for a specific location.

Example API Call

curl -X GET "https://api.riwe.io/v1/weather/forecast" \
  -H "X-API-KEY: your_api_key_here"

Parameters

Name Type Required Description

Example Response

{
    "daily": [
        {
            "date": "2023-08-01",
            "humidity": 65,
            "conditions": "Sunny",
            "temperature_max": 28.5,
            "temperature_min": 18.2,
            "precipitation_probability": 20
        },
        {
            "date": "2023-08-02",
            "humidity": 70,
            "conditions": "Partly Cloudy",
            "temperature_max": 26.8,
            "temperature_min": 17.5,
            "precipitation_probability": 40
        }
    ],
    "location": {
        "name": "Abuja, Nigeria",
        "latitude": 9.0765,
        "longitude": 7.3986
    }
}