Current Weather API
Weather
Current Weather API
Get current weather conditions for a coordinate, powered by Apple WeatherKit
GET
Current Weather API
Overview
Returns the current weather for a latitude/longitude pair. The server fetches Apple WeatherKit’scurrentWeather data set and converts it to imperial units — this contract powers the live weather UI (useWeather / CityWeatherBanner) and is also written (converted to metric) onto helloapp_routehistory rows by the same function’s webhook path.
Responses are cached for 10 minutes (Cache-Control: public, max-age=600); calling more often returns the same data.
Authentication
Any authenticated caller (user session, publishable key, or service key):Query Parameters
number
required
Latitude in decimal degrees,
-90 to 90. lat is accepted as an alias.number
required
Longitude in decimal degrees,
-180 to 180. lon is accepted as an alias.Response
number
Current temperature in degrees Fahrenheit, rounded to one decimal. (WeatherKit returns Celsius; the server converts. Clients converting for metric riders must treat °F as the source unit.)
number
Apparent temperature in degrees Fahrenheit, rounded to one decimal.
string[]
WeatherKit condition codes.
conditions[0] is the primary condition — one of WeatherKit’s conditionCode values (Clear, MostlyClear, PartlyCloudy, Cloudy, Drizzle, Rain, HeavyRain, Thunderstorms, Snow, Foggy, …). The server may append temperature modifiers after it: Cold (below 40 °F) or Hot (above 85 °F).Map codes to display strings with getHumanReadableWeather in packages/shared/lib/weatherText.ts — don’t show the raw code.number
Wind speed in miles per hour, rounded to one decimal.
number | null
Direction the wind is blowing from, in degrees
[0, 360) (0 = north), or null when WeatherKit omits it.number
Relative humidity as an integer percentage,
0–100.Example
packages/shared/__fixtures__/weather-london.json — reuse it in tests instead of hand-crafting the shape.