The endpoint provides the user the ability to check the current weather based on geographical coordinates.
Authentication is achieved by passing a custom header named X-Api-Key containing the API key.
https://api.nubila.ai/api/v1/weather
Parameters
Example Request
Example Response (success)
Example response (error)
ok (boolean): Indicates whether the request was successful. true indiciates successful request
message (string): In case of unsuccessful request, a message explaining why the request failed
id (string): Unique identifier for the weather data record.
created_at (string, ISO 8601): Timestamp when the record was created.
updated_at
latitude (number): Latitude of the location.
longitude (number): Longitude of the location.
location_name (
temperature (number): Current temperature in degrees Celsius.
temperature_min (number): Minimum recorded temperature in degrees Celsius.
temperature_max
wind_speed (number): Wind speed in meters per second.
wind_scale (number): Wind scale (e.g., Beaufort scale).
wind_speed_list
condition (string): General weather condition (e.g., “Clouds”, “Rain”).
condition_desc (string): Detailed weather description (e.g., “overcast clouds”).
timestamp (number): Unix timestamp (seconds since epoch) representing the data retrieval time.
timezone (number): Timezone offset in seconds from UTC.
tag (string): Custom tag (if applicable).
is_online (boolean): Indicates whether the weather station or source is online.
is_malfunction
error_code (number): System error code representing the errordata (object): Contains the weather information object
stringstringaddress (string): Address of the location (if available).
elevation (number): Elevation of the location in meters.
numberfeels_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).
array|nullwind_scale_list (array|null): List of wind scale values over time (if available).
wind_direction (number): Wind direction in degrees (0-360, where 0 represents north).
numbercondition_icon (string): Icon identifier for the weather condition.
booleanlat
Yes
Latitude value for the requested area
37.2144
lon
Yes
Longitude value for the requested area
-121.8574
curl -X GET \
--location "https://api.nubila.ai/api/v1/weather?lat=37.2144&lon=-121.8574" \
-H "X-Api-Key: 13...5c"curl -X GET --location "https://api.nubila.ai/api/v1/weather?lat=37.2144&lon=-121.8574" \
-H "X-Api-Key: 13...5c"{
"id": "0",
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0001-01-01T00:00:00Z",
"latitude": 37.2144,
"longitude": -121.8574,
"temperature": 9.7,
"temperature_min": 8.16,
"temperature_max": 10.66,
"feels_like": 7.36,
"pressure": 1016,
"humidity": 61,
"wind_speed": 4.63,
"wind_scale": 0,
"wind_speed_list": null,
"wind_scale_list": null,
"wind_direction": 0,
"condition": "Clouds",
"condition_desc": "overcast clouds",
"condition_code": 804,
"condition_icon": "04n",
"uv": 0,
"luminance": 0,
"elevation": 1016,
"rain": 0,
"wet_bulb": 0,
"timestamp": 1739325314,
"timezone": -28800,
"location_name": "Cambrian Park",
"address": "",
"tag": "",
"is_online": false,
"is_malfunction": false
}{
"ok": false,
"message": "Invalid longitude",
"error_code": 40000
}