Forecast API
Introduction
The endpoint provides the user the ability to check the forecast of a location based on geographical coordinates.
Authentication
Authentication is achieved by passing a custom header named X-Api-Key
containing the API key.
Endpoint
https://api.nubila.ai/api/v1/forecast
Parameters
lat
Yes
number
Latitude value for the requested area
37.2144
lon
Yes
number
Longitude value for the requested area
-121.8574
Example Request
Example Response (success)
Example response (error)
Response Fields description
Root Fields
ok
(boolean
): Indicates whether the request was successful.message
(string
): In case of unsuccessful request, a message explaining why the request failederror_code
(number
): System error code representing the errordata
(array
): Contains an array of objects, representing forecast for a given timestamp, at hourly intervals
data
objects’ fields
data
objects’ fieldsMetadata
id
(string
): Unique identifier for the weather data record.created_at
(string
, ISO 8601): Timestamp when the record was created.updated_at
(string
, ISO 8601): Timestamp when the record was last updated.tag
(string
): Custom tag (if applicable).
Location Information
latitude
(number
): Latitude of the location.longitude
(number
): Longitude of the location.location_name
(string
): Name of the location.sea_level
(number
): Elevation of the location in meters.
Weather Conditions
temperature
(number
): Current temperature in degrees Celsius.temperature_min
(number
): Minimum recorded temperature in degrees Celsius.temperature_max
(number
): Maximum recorded temperature in degrees Celsius.feels_like
(number
): Perceived temperature in degrees Celsius (considering wind and humidity).pressure
(number
): Atmospheric pressure in hPa (hectopascals).humidity
(number
): Humidity percentage.uv
(number
): Ultraviolet (UV) index.luminance
(number
): Luminance level (exact unit depends on the source).rain
(number
): Precipitation level in millimeters.wet_bulb
(number
): Wet-bulb temperature in degrees Celsius (a measure of temperature considering humidity).
Wind Data
wind_speed
(number
): Wind speed in meters per second.wind_direction
(number
): Wind direction in degrees (0-360, where 0 represents north).
Weather Condition Details
condition
(string
): General weather condition (e.g., “Clouds”, “Rain”).condition_desc
(string
): Detailed weather description (e.g., “overcast clouds”).condition_code
(number
): Numeric code representing the weather condition.condition_icon
(string
): Icon identifier for the weather condition.
Time & Source Information
timestamp
(number
): Unix timestamp (seconds since epoch) representing the time for which the weather is predicted.timezone
(number
): Timezone offset in seconds from UTC.
Last updated