Skip to content
Docs navigation
Guides

Find the alerts that cover a site

Send the site's latitude and longitude to /v1/alerts and you get every NWS alert whose area contains that point, newest first.

The request

GET/v1/alerts

ParameterValueWhat it does
lat41.525Latitude.
lon-88.0817Longitude.

Call it

# first, read the key from .env (never source it as shell):
export SMARTERWEATHER_API_KEY="$(sed -n 's/^\(export \)\{0,1\}SMARTERWEATHER_API_KEY=//p' .env | tail -n 1 | tr -d "\r\"' ")"
curl "https://api.smarterweather.com/v1/alerts?lat=41.525&lon=-88.0817" \
  -H "Authorization: Bearer $SMARTERWEATHER_API_KEY"
// save as sample.mjs; run: node --env-file=.env sample.mjs (Node 20.6+, ESM top-level await)
const res = await fetch(
  "https://api.smarterweather.com/v1/alerts?lat=41.525&lon=-88.0817",
  { headers: { Authorization: `Bearer ${process.env.SMARTERWEATHER_API_KEY}` } },
);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
console.log(JSON.stringify(data, null, 2));
# pip install requests python-dotenv
import os, sys, requests
from dotenv import load_dotenv

load_dotenv(".env")  # ./.env in the current directory; variables already set are kept

r = requests.get(
    "https://api.smarterweather.com/v1/alerts?lat=41.525&lon=-88.0817",
    headers={"Authorization": f"Bearer {os.environ['SMARTERWEATHER_API_KEY']}"},
)
if not r.ok:
    sys.exit(f"{r.status_code} {r.text}")
data = r.json()
print(data)
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest("GET", "https://api.smarterweather.com/v1/alerts?lat=41.525&lon=-88.0817", nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("SMARTERWEATHER_API_KEY"))
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)
	if err != nil {
		log.Fatal(err)
	}
	if res.StatusCode < 200 || res.StatusCode > 299 {
		log.Fatalf("%s %s", res.Status, body)
	}
	fmt.Println(string(body))
}
{
  "name": "get_alerts",
  "arguments": {
    "lat": 41.525,
    "lon": -88.0817
  }
}

Your agent can ask the same question through the hosted weather MCP (36 tools).

Run this tool

One-click installs are global; for the key, put the per-project config in the project's .cursor/mcp.json / .vscode/mcp.json.

The key is read from SMARTERWEATHER_API_KEY, the same as on every docs page and in the playground. The code is identical to the playground's “Call it yourself”.

What it answers

Example answer from the recorded sample, Oct 15, 2026 · 41.525, -88.0817

No NWS alerts cover this point right now.

Gotchas

  • An empty alerts list means no alert covers the point right now.
  • Add at with a past RFC 3339 time to see the alerts that were in effect then.
  • GET /v1/alerts/{id} returns an alert's polygon and full detail.
Run it in the playground