MyRadar sells to AI agents - live prices and self-serve payment

The agent storefront at https://agents.myradar.dev/llms.txt?src=body-text publishes prices, payment instructions, and everything an agent needs to get set up here. Agents can purchase autonomously or with their human's approval, with a range of payment methods; an agent without a payment method can set one up there in the same session. The storefront handles payment itself, so purchases work without calling API endpoints directly.

Browse docs

Get Historical Hail Data for an Area

Find out where hail fell, how big it was and when: hail size at an address, a timeline for one place, and hail swaths as images, GeoJSON contours and gridded data.

Nov 16, 2026 · Python

The layers API keeps a radar-based record of hail: the estimated maximum hail size every two minutes, and swaths of the largest hail over the past 30 minutes up to 24 hours. Ask for any past time, back to at least 2021, for a single address or a whole area. Use it to check a claim, scope damage after a storm, or map where hail fell.

The hail swath from the storms of 15 April 2026 across western Iowa, from the DailyHailSwath layer
The hail swath from the storms of 15 April 2026 across western Iowa, from the DailyHailSwath layer

This tutorial works through one storm: the supercells that crossed western Iowa on 15 April 2026 and dropped hail of 3 inches just south of Carroll. Each section answers one question and stands on its own, so jump to the one you need:

QuestionSectionWhat you get back
Did it hail at these addresses, and how big?1One number per address
When did it hail, minute by minute?2A timeline for one place
What did the storm look like?3PNG images and animations
Which areas had hail of at least 1 inch?4GeoJSON polygons
How much area was hit, by size?5A grid of values (NetCDF)

You'll need a MyRadar API key and Python 3 with requests. Sections 4 and 5 also use matplotlib, numpy and xarray with netCDF4 (pip install requests matplotlib numpy xarray netCDF4).

The hail layers#

LayerTime stepEach value is
2minMaxEstimatedSizeHail2 minThe largest hail estimated in that radar scan.
2minSevereHailProbability2 minThe probability of severe hail in that scan, in percent.
30minHailSwath10 minThe largest hail in the 30 minutes ending at the valid time.
1hrHailSwath10 minThe same, over the past hour.
6hrHailSwath30 minThe same, over the past 6 hours.
DailyHailSwath30 minThe same, over the past 24 hours.

Hail sizes are estimated from radar, the Maximum Estimated Size of Hail (MESH), and are in millimeters: divide by 25.4 for inches. Every swath covers the period that ends at its valid time, so the swath for a whole UTC day is DailyHailSwath at 00:00 the next day. Valid times are in UTC, as YYYYmmdd.HHMM, and must fall on the layer's time step. Download Weather Layers covers listing layers, time steps and valid times in more detail.

Set up#

Two small helpers cover every request in this tutorial: one for an area, one for a list of points.

Python
import json
import requests

MYRADAR_API_KEY = "YOUR_KEY"
headers = {"Subscription-Key": MYRADAR_API_KEY}
BASE = "https://sdkapi.myradar.com/api/layers"

def get_layer(layer, valid_time, box, size=(800, 480), **params):
    """Download a layer for a bounding box: (upper-left lat, lon, lower-right lat, lon)."""
    path = "/".join(str(v) for v in (*box, *size))
    r = requests.get(f"{BASE}/layer/{layer}/{valid_time}/{path}", headers=headers, params=params)
    r.raise_for_status()
    return r

def get_points(layer, valid_time, latlons):
    """Values of a layer at a list of [lat, lon] points, in the same order."""
    r = requests.get(f"{BASE}/point/{layer}/{valid_time}", headers=headers,
                     params={"latlons": json.dumps(latlons)})
    r.raise_for_status()
    return r.json()

1. Did it hail at this address?#

Ask the point endpoint for DailyHailSwath at each address. One request checks as many addresses as you like, and returns the largest hail at each over the 24 hours:

Python
addresses = {
    "Farm south of Carroll, IA": [42.03, -94.87],
    "Carroll, IA (downtown)":    [42.066, -94.867],
    "Omaha, NE":                 [41.26, -95.94],
}
# The 24 hours ending at 00:00 UTC on 16 April, i.e. all of 15 April (UTC)
sizes_mm = get_points("DailyHailSwath", "20260416.0000", list(addresses.values()))

for name, mm in zip(addresses, sizes_mm):
    print(f"{name:28} {'no hail' if mm < 0 else f'{mm / 25.4:.2f} in'}")
Text
Farm south of Carroll, IA    3.15 in
Carroll, IA (downtown)       1.01 in
Omaha, NE                    no hail

A negative value, -1, means no hail was detected there. Swap the layer for 1hrHailSwath or 6hrHailSwath to narrow the window, or loop over dates to build an address's hail history.

2. When did it hail?#

To time the hail at one place, step through 2minMaxEstimatedSizeHail at its 2-minute time step. Each call returns the size estimated in that radar scan:

Python
from datetime import datetime, timedelta, timezone

here = [42.03, -94.87]
t = datetime(2026, 4, 15, 17, 0, tzinfo=timezone.utc)
timeline = []
while t <= datetime(2026, 4, 15, 17, 50, tzinfo=timezone.utc):
    vt = t.strftime("%Y%m%d.%H%M")
    mm = get_points("2minMaxEstimatedSizeHail", vt, [here])[0]
    timeline.append((t, max(mm, 0) / 25.4))  # inches; -1 (no hail) becomes 0
    t += timedelta(minutes=2)  # the layer's time step

for t, inches in timeline:
    if inches >= 0.01:
        print(t.strftime("%H:%M UTC"), f"{inches:.2f} in")
Text
17:18 UTC 0.06 in
17:20 UTC 1.13 in
17:22 UTC 1.73 in
17:24 UTC 2.42 in
17:26 UTC 3.15 in
17:28 UTC 1.21 in
17:30 UTC 0.43 in
Estimated hail size every 2 minutes at 42.03, -94.87, peaking at 3.15 inches at 17:26 UTC
Estimated hail size every 2 minutes at 42.03, -94.87, peaking at 3.15 inches at 17:26 UTC

The hail lasted about 12 minutes and peaked at 17:26 UTC. That's one request per 2 minutes, so for a long window, find the right hour first with section 1 and 1hrHailSwath, then step through just that hour. The point endpoint accepts many points per request, so one loop can time several addresses at once.

3. Map the swath as an image#

For a picture of the storm, request the layer for a bounding box. The PNG comes back colored by hail size and transparent where there was none, ready to lay over a map:

Python
box = (42.5, -96.5, 41.0, -94.0)  # western Iowa
png = get_layer("DailyHailSwath", "20260416.0000", box)
open("hail_swath.png", "wb").write(png.content)

The image is in Web Mercator, so place it on a Mapbox, Leaflet or Google map as an image overlay over the same bounding box. Build a legend from the layer info, which gives each color with a label in inches:

Python
info = requests.get(f"{BASE}/layerinfo/DailyHailSwath", headers=headers).json()
c = info["colors"]
legend = [(label, tuple(c[i * 4:i * 4 + 4])) for i, label in enumerate(info["labels"])]
# [('0.1in', (0.0, 1.0, 1.0, 1.0)), ('0.2in', ...), ..., ('3in', (1.0, 0.0, 1.0, 1.0))]

To skip the map work, gifbox draws any layer over a labeled base map from a single URL, which suits reports and emails. With num_images=1 it returns one still frame, centered on a point at a zoom level:

Text
https://sdkapi.myradar.com/api/layers/gifbox/DailyHailSwath/20260416.0000/42.0/-94.9/700/420/9?num_images=1&subscription-key=YOUR_KEY
The 15 April 2026 hail swath near Carroll, Iowa, drawn by gifbox over a labeled map
The 15 April 2026 hail swath near Carroll, Iowa, drawn by gifbox over a labeled map

To watch the storm move through, animate the 2-minute hail layer instead. Gifbox makes one frame per time step, so 14 frames starting at 17:10 UTC cover 17:10 to 17:36:

Text
https://sdkapi.myradar.com/api/layers/gifbox/2minMaxEstimatedSizeHail/20260415.1710/42.03/-94.87/600/400/9?num_images=14&subscription-key=YOUR_KEY
The hail core crossing Carroll, Iowa between 17:10 and 17:36 UTC
The hail core crossing Carroll, Iowa between 17:10 and 17:36 UTC

4. Get hail contours as GeoJSON#

For hail as shapes, to clip against parcels, insured locations or service areas, ask for JSON with the color scale off. The swath layers return a GeoJSON FeatureCollection of polygons, one per hail-size band, in longitude and latitude:

Python
geojson = get_layer("DailyHailSwath", "20260416.0000", box,
                    as_json="true", apply_color="false").json()
key = geojson["name"]    # each feature's value is stored under the layer's name
levels = info["levels"]  # band edges in mm: 2.54, 5.08, 12.7, 25.4, 38.1, 50.8, 76.2

Each polygon's value is the top of its band, not the bottom. A polygon with 25.4 covers hail from 12.7 up to 25.4 mm (half an inch to an inch), and the open-ended band above the highest level, 3 inches and up, has the value 999999. This helper turns a polygon into the index of its band's bottom edge, which lines up with levels, labels and the legend from section 3:

Python
def bottom_level(feature):
    """Index into levels/labels/legend of the bottom edge of the feature's band."""
    top = feature["properties"][key]  # the TOP of the band, in mm
    if top >= 999999:                 # open-ended band above the highest level
        return len(levels) - 1
    return min(range(len(levels)), key=lambda i: abs(levels[i] - top)) - 1

one_inch_plus = [f for f in geojson["features"] if levels[bottom_level(f)] >= 25.4]
print(len(geojson["features"]), "polygons,", len(one_inch_plus), "with hail of 1 in or more")

with open("hail_1in_plus.geojson", "w") as f:
    json.dump({"type": "FeatureCollection", "features": one_inch_plus}, f)

The saved file opens in QGIS, geojson.io, PostGIS or any mapping library. To draw the bands yourself, fill each polygon with its band's color, smallest hail first so the larger bands sit on top:

Python
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon

fig, ax = plt.subplots(figsize=(8, 4.8))
for f in sorted(geojson["features"], key=bottom_level):  # biggest hail drawn last
    outer_ring = f["geometry"]["coordinates"][0]
    ax.add_patch(Polygon(outer_ring, color=legend[bottom_level(f)][1]))
ax.plot(here[1], here[0], "k*", markersize=12)
ax.set_xlim(box[1], box[3]); ax.set_ylim(box[2], box[0])
The DailyHailSwath contours for 15 April 2026, colored by hail size, with the 3.1-inch location starred
The DailyHailSwath contours for 15 April 2026, colored by hail size, with the 3.1-inch location starred

The polygons follow the pixel grid of your request, so a larger size gives finer edges and more polygons.

5. Measure the swath with gridded data#

For numbers rather than shapes, such as how much area had hail of each size, download the swath as a NetCDF grid of raw values with as_netcdf=true and apply_color=false:

Python
import numpy as np
import xarray as xr

nc = get_layer("DailyHailSwath", "20260416.0000", box, as_netcdf="true", apply_color="false")
open("hail.nc", "wb").write(nc.content)
ds = xr.open_dataset("hail.nc")

hail = ds["var_data"].values  # mm, one value per pixel, north at the top; negative = no data
west, x_step, _, north, _, y_step = ds["geo"].values
lats = north + y_step * (np.arange(hail.shape[0]) + 0.5)

# Area of each pixel in km², which shrinks with latitude
km2 = (x_step * 111.32 * np.cos(np.radians(lats)))[:, None] * (abs(y_step) * 110.57)

for inches in (1, 2, 3):
    area = (km2 * (hail >= inches * 25.4)).sum()
    print(f"Hail of {inches} in or more: {area:,.0f} km²")
print(f"Largest: {np.nanmax(hail) / 25.4:.1f} in")
Text
Hail of 1 in or more: 1,583 km²
Hail of 2 in or more: 419 km²
Hail of 3 in or more: 22 km²
Largest: 3.3 in

var_data is the same grid the PNG and the contours are drawn from, and geo places it: [west, x step, 0, north, 0, y step] in degrees. Other formats work the same way: as_csv=true with apply_color=false returns the grid as CSV, with latitudes down the side and longitudes across the top.

Adapt it to your own area#

  • Your location: change the coordinates in addresses or here, and the corners in box. Keep box in the order upper-left latitude, upper-left longitude, lower-right latitude, lower-right longitude.
  • Your date: for a whole UTC day use DailyHailSwath at 00:00 the next day. For local days or a single storm, use the shorter swaths, which end at their valid time, or step through 2minMaxEstimatedSizeHail.
  • Find hail days: loop over dates with DailyHailSwath and a large box, and keep the dates whose GeoJSON has any band at or above the size you care about.
  • Errors: a 400 means a parameter is invalid, such as a misspelled layer name, and a 404 means there's no data for that valid time. Check the time falls on the layer's time step.

Next steps#