# OpenWeather API Proxies the OpenWeather Data 2.5 API. Current weather and 5-day/3-hour forecast — no separate OpenWeather key. ## Prerequisites Provision this resource before use. Edge requests without provisioning will error. ### Provision curl -s -X POST https://cohesivity.ai/api/resources/openweather-api \ -H "Authorization: Bearer " ### Delete curl -s -X DELETE https://cohesivity.ai/api/resources/openweather-api \ -H "Authorization: Bearer " **Important:** Provision this resource now, before building or running the application. Provisioning is the agent's job, not the application's. ## Official Docs https://openweathermap.org/current and https://openweathermap.org/forecast5 — read before coding. ## Edge Usage - **Base URL:** https://cohesivity.ai/edge/openweather-api - **Auth:** `coh_application_key` as the **key** query parameter - **Format:** same as OpenWeather — same paths, same response shapes - **Units are forced to `metric`** (Celsius, m/s) and **`mode` is forced to `json`**. Any `units=`/`mode=` you pass is ignored. The default OpenWeather unit is Kelvin; this prevents accidental Kelvin temperatures in your UI. ## Three input modes (same endpoint) OpenWeather resolves places internally — no separate geocoding step needed. - By city: `GET https://cohesivity.ai/edge/openweather-api/data/2.5/weather?q=London&key=` - By city, country: `GET https://cohesivity.ai/edge/openweather-api/data/2.5/weather?q=New+Delhi,IN&key=` - By coordinates: `GET https://cohesivity.ai/edge/openweather-api/data/2.5/weather?lat=51.5074&lon=-0.1278&key=` - By ZIP code: `GET https://cohesivity.ai/edge/openweather-api/data/2.5/weather?zip=94040,US&key=` - 5-day / 3-hour forecast: `GET https://cohesivity.ai/edge/openweather-api/data/2.5/forecast?q=London&key=` ## Response Shape (current weather) { "coord": { "lon": -0.1278, "lat": 51.5074 }, "weather": [ { "id": 804, "main": "Clouds", "description": "overcast clouds", "icon": "04n" } ], "main": { "temp": 11.51, // Celsius (units forced to metric) "feels_like": 10.73, "temp_min": 10.88, "temp_max": 12.79, "pressure": 1012, // hPa "humidity": 77 // percent }, "visibility": 10000, // meters "wind": { "speed": 2.57, "deg": 70 }, // m/s, degrees (no cardinal) "clouds": { "all": 100 }, // percent "rain": { "1h": 0.5 }, // ONLY present when raining "snow": { "1h": 0.2 }, // ONLY present when snowing "dt": 1778019904, // Unix seconds (UTC) "sys": { "country": "GB", "sunrise": 1777955116, "sunset": 1778009345 }, "timezone": 3600, // shift in seconds from UTC "name": "London", "cod": 200 } **Common access patterns:** - Temperature: `data.main.temp` (Celsius) - Feels-like: `data.main.feels_like` - Description: `data.weather[0].description` (e.g. `"overcast clouds"`) - Icon: `https://openweathermap.org/img/wn/${data.weather[0].icon}@2x.png` - Wind speed (m/s): `data.wind.speed`; direction (degrees): `data.wind.deg` - Rain in last hour (mm): `data.rain?.["1h"] ?? 0` ## Place-name grammar Use real gazetteer names with optional `,STATE,COUNTRY` (ISO 3166). Informal regional terms (e.g. `delhi ncr`, `the Bay Area`, `downtown LA`) and street addresses do NOT resolve. If `q=` returns 404, try a more canonical name — `New Delhi` instead of `delhi ncr`. ## Launch Rate Limits Ephemeral tenants pause as a whole if any authoritative hard cap below is exceeded. Claimed tiers use account-scoped buckets shared across every project owned by the Cohesivity user; Gemini and Exa are fluid-only except for Gemini Live concurrency. **Ephemeral** - requests: 2000 per ephemeral tenant lifetime before claim or expiry - requests: 10 per minute **Claimed Free** - requests: 30 per minute - requests: 10000 per month **Claimed Plus** - requests: 120 per minute - requests: 100000 per month **Claimed Pro** - requests: 600 per minute - requests: 500000 per month