Weather Intel API
National Weather Service data collapsed into single-call, agent-optimized JSON with activity recommendations and severity scoring.
GET
/api/weather/forecast
3 sats
Get structured weather forecast for a location. Collapses the NWS multi-step lookup (points → gridpoints → forecast) into a single call.
| Parameter | Type | Description |
|---|---|---|
latitude | double | Latitude (-90 to 90) |
longitude | double | Longitude (-180 to 180) |
# Direct call (no L402) curl "https://agent-commerce.store/api/weather/forecast?latitude=40.71&longitude=-74.00" # Via L402 proxy (paid) curl "https://api.lightningenable.com/l402/proxy/{proxyId}/forecast?latitude=40.71&longitude=-74.00"
Response includes outdoorSuitable (bool) and outdoorReason per forecast period.
GET
/api/weather/alerts
2 sats
Get active weather alerts for a US state with severity scoring (0-100).
| Parameter | Type | Description |
|---|---|---|
state | string | 2-letter US state code (e.g., NY, CA) |
curl "https://agent-commerce.store/api/weather/alerts?state=TX"
GET
/api/weather/conditions
2 sats
Get current weather conditions from nearest observation station.
| Parameter | Type | Description |
|---|---|---|
latitude | double | Latitude (-90 to 90) |
longitude | double | Longitude (-180 to 180) |
curl "https://agent-commerce.store/api/weather/conditions?latitude=40.71&longitude=-74.00"
Usage tips: US locations only. Use decimal coordinates (e.g., 40.7128, -74.0060 for NYC). The NWS API can intermittently return errors on certain grid points — retry if you get an error. Alerts require a 2-letter state code (NY, CA, TX). Test your coordinates free at
agent-commerce.store/api/weather/forecast?latitude=...&longitude=... before using the paid L402 proxy.
Value-Add
- Single-call interface (NWS requires 2-3 sequential API calls)
- Activity recommendations per forecast period (
outdoorSuitable,outdoorReason) - Severity scoring on alerts (0-100 composite score)
- Structured JSON instead of GeoJSON
- Temperature in both Fahrenheit and Celsius for conditions
- Automatic server-side retry on NWS transient failures
Upstream Source
National Weather Service API — public domain, no API key required. NWS is known for intermittent 404 errors on the /points endpoint; we retry automatically.