Skip to content
Docs navigation
Guides

Find out when rain reaches a job site

One call to /v1/weather returns the radar nowcast for the next 60 minutes and the hourly chance of precipitation after that. Ask for both and you can say when rain starts and how likely it is over the next hours.

The request

GET/v1/weather

ParameterValueWhat it does
locationBuffalo, NYFree-text location name.
includecurrent,hourly,nowcast,alertsComma-separated list of sections to include.
hourly_hours24Number of hours for the hourly forecast.

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/weather?location=Buffalo,%20NY&include=current,hourly,nowcast,alerts&hourly_hours=24" \
  -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/weather?location=Buffalo,%20NY&include=current,hourly,nowcast,alerts&hourly_hours=24",
  { 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/weather?location=Buffalo,%20NY&include=current,hourly,nowcast,alerts&hourly_hours=24",
    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/weather?location=Buffalo,%20NY&include=current,hourly,nowcast,alerts&hourly_hours=24", 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_forecast_distribution",
  "arguments": {
    "location": "Buffalo, NY",
    "aspect": "precip",
    "hours": 24
  }
}

Your agent can ask a close version of this question through the hosted weather MCP (36 tools).

The tool returns the NBM precipitation odds by hour, not the radar nowcast.

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 16, 2026 · Buffalo, NY

Nothing on radar for the next 60 minutes.

Precipitation chance reaches 34% at 12 AM Friday and peaks at 77% at 3 AM Friday.

  • Radar nownonenowcast.summary.type
  • First hour at 30% or more34%hourly[3].precip_probability
  • Peak chance77%hourly[6].precip_probability
  • Active alertsNonealerts

NBM, GFS, HRRR, RTMA and MRMS via NOAA/NWS · NBM issued Oct 15, 6 PM EDT (2 h 6 min before this response)

Fields it reads:

  • nowcast.summary.type
  • nowcast.interval_seconds
  • hourly[].precip_probability
  • hourly[].time
  • location.timezone
  • alerts

Gotchas

  • include replaces the default sections. Name every section you read.
  • The nowcast covers the next 60 minutes in 5-minute steps. After that, use the hourly chance.
  • Times are UTC. Use location.timezone to show local time.
Run it in the playground