Skip to content

Weather API 0.35.2

Weather API provides access to weather forecast data.


Servers

Description URL
Production API server https://api.rainbow.ai

Endpoints


GET /weather/v1/forecast/{longitude}/{latitude}

Weather forecast

Description

Returns weather forecast for a given location.

Input parameters

Parameter In Type Default Nullable Description
day_start_hour query 6 No Hour of day (in the given timezone) at which each forecast day begins (0–23, default 6am)
forecast_days query No Number of forecast days
forecast_hours query No Number of forecast hours
latitude path number No Latitude coordinate of the location
longitude path number No Longitude coordinate of the location

Responses

JSON
{
    "timelines": {
        "hourly": null,
        "daily": null
    },
    "location": {
        "lat": 52.2328940965463,
        "lon": 21.0065536398819
    },
    "units": {
        "temperature": "celsius",
        "feelsLikeTemperature": "celsius",
        "temperatureDewPoint": "celsius",
        "precipitationAmount": "millimeters",
        "precipitationChance": "percent",
        "windSpeed": "meter_per_second",
        "windGust": "meter_per_second",
        "windDirection": "degree",
        "visibility": "meter",
        "uvIndex": "index",
        "humidity": "percent",
        "pressure": "hectopascal"
    },
    "generatedAtTimestamp": 1705921200,
    "generatedAtTimeIso": "2024-01-22T13:00:00+00:00"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
JSON
{
    "properties": {
        "timelines": {
            "$ref": "#/components/schemas/Timelines",
            "title": "timelines",
            "description": "Hourly and daily forecast timelines"
        },
        "location": {
            "$ref": "#/components/schemas/ForecastLocation",
            "title": "location",
            "description": "Coordinates of the requested location"
        },
        "units": {
            "$ref": "#/components/schemas/ForecastUnits",
            "title": "units",
            "description": "Units used for all numeric fields in this response"
        },
        "generatedAtTimestamp": {
            "type": "integer",
            "title": "generated_at_timestamp",
            "description": "Forecast generation time as UTC Unix timestamp",
            "example": 1705921200
        },
        "generatedAtTimeIso": {
            "type": "string",
            "title": "generated_at_time_iso",
            "description": "Forecast generation time as ISO 8601 string with timezone offset",
            "example": "2024-01-22T13:00:00+00:00"
        }
    },
    "type": "object",
    "required": [
        "timelines",
        "location",
        "generatedAtTimestamp",
        "generatedAtTimeIso"
    ],
    "title": "ForecastResponse"
}

JSON
{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
JSON
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

DailyItem

Name Type Description
condition WeatherCondition Dominant weather condition for the day. Possible values: Unknown, BlowingDust, Clear, Cloudy, Foggy, Haze, MostlyClear, MostlyCloudy, PartlyCloudy, Smoky, Breezy, Windy, Drizzle, HeavyRain, IsolatedThunderstorms, Rain, SunShowers, ScatteredThunderstorms, StrongStorms, Thunderstorms, Frigid, Hail, Hot, Flurries, Sleet, Snow, SunFlurries, WintryMix, Blizzard, BlowingSnow, FreezingDrizzle, FreezingRain, HeavySnow, Hurricane, TropicalStorm
endTimeIso string End of the forecast day as ISO 8601 string with timezone offset
endTimestamp integer End of the forecast day as UTC Unix timestamp
precipitationAmount number Total precipitation amount for the day
precipitationChance number Peak probability of precipitation during the day (0–100%)
precipitationType ResponsePrecipType Dominant type of precipitation. Possible values: no_precipitation, snow, rain, mixed
startTimeIso string Start of the forecast day as ISO 8601 string with timezone offset
startTimestamp integer Start of the forecast day as UTC Unix timestamp
temperatureMax number Maximum temperature for the day
temperatureMin number Minimum temperature for the day
uvIndexMax integer Maximum UV index for the day
windDirectionAvg integer Average Wind direction in degrees (0–360, clockwise from north)
windSpeedMax number Maximum Wind speed for the day

ForecastLocation

Name Type Description
lat number Latitude of the forecast location
lon number Longitude of the forecast location

ForecastResponse

Name Type Description
generatedAtTimeIso string Forecast generation time as ISO 8601 string with timezone offset
generatedAtTimestamp integer Forecast generation time as UTC Unix timestamp
location ForecastLocation Coordinates of the requested location
timelines Timelines Hourly and daily forecast timelines
units ForecastUnits Units used for all numeric fields in this response

ForecastUnits

Name Type Description
feelsLikeTemperature string Unit for feels-like temperature
humidity string Unit for relative humidity
precipitationAmount string Unit for precipitation amount
precipitationChance string Unit for precipitation probability
pressure string Unit for sea level air pressure
temperature string Unit for temperature
temperatureDewPoint string Unit for dew point temperature
uvIndex string Unit for UV index
visibility string Unit for visibility
windDirection string Unit for wind direction
windGust string Unit for wind gust speed
windSpeed string Unit for wind speed

HourlyItem

Name Type Description
condition WeatherCondition Dominant weather condition for the day. Possible values: Unknown, BlowingDust, Clear, Cloudy, Foggy, Haze, MostlyClear, MostlyCloudy, PartlyCloudy, Smoky, Breezy, Windy, Drizzle, HeavyRain, IsolatedThunderstorms, Rain, SunShowers, ScatteredThunderstorms, StrongStorms, Thunderstorms, Frigid, Hail, Hot, Flurries, Sleet, Snow, SunFlurries, WintryMix, Blizzard, BlowingSnow, FreezingDrizzle, FreezingRain, HeavySnow, Hurricane, TropicalStorm
feelsLikeTemperature number Apparent (feels-like) temperature
humidity integer Relative humidity (0–100%)
precipitationAmount number Total precipitation amount
precipitationChance number Probability of precipitation (0–100%)
precipitationType ResponsePrecipType Type of precipitation. Possible values: no_precipitation, snow, rain, mixed
pressure number Sea level air pressure
startTimeIso string Start of the forecast hour as ISO 8601 string with timezone offset
startTimestamp integer Start of the forecast hour as UTC Unix timestamp
temperature number Air temperature
temperatureDewPoint number Dew point temperature
uvIndex integer UV index
visibility integer Visibility
windDirection integer Wind direction in degrees (0–360, clockwise from north)
windGust number Wind gust speed
windSpeed number Wind speed

HTTPValidationError

Name Type Description
detail Array<ValidationError>

ResponsePrecipType

Type: string

Timelines

Name Type Description
daily Daily forecast items
hourly Hourly forecast items

ValidationError

Name Type Description
loc Array<>
msg string
type string

WeatherCondition

Type: string