Tutorial

6 min read

How to Get All Waze Alerts in an Area

For most areas, one API call returns every alert. For a large, busy area that would run past the per-call limit, you split it into smaller pieces.

June 1, 2026By Adam Benayoun

Waze · Traffic Alerts · Python

Small areas: one call

The Waze API returns every alert in an area in a single request. Define the area either as a bounding box, with bottom_left and top_right corners (each a lat,lng pair), or as a center point plus a radius and radius_units (KM or MI).

Python

# every alert within 3 km of Times Square
import requests

resp = requests.get(
    "https://api.openwebninja.com/waze/alerts-and-jams",
    params={
        "center": "40.7549,-73.9840",
        "radius": 3,
        "radius_units": "KM",   # or MI
        "max_alerts": 200,
        "max_jams": 0,
    },
    headers={"x-api-key": "YOUR_API_KEY"},
)
alerts = resp.json()["data"]["alerts"]
print(len(alerts), "alerts")
# -> 198 alerts

Each item in data.alerts looks like this, a live police report on the Verrazzano Bridge:

{
  "alert_id": "alert-1613260595/6d24e29b-7dc9-43c4-87fc-efa089927424",
  "type": "POLICE",
  "subtype": null,
  "reported_by": "Google Maps driver",
  "publish_datetime_utc": "2026-06-01T18:39:45.000Z",
  "city": "New York",
  "street": "I-278 E • Verrazzano Br / Lower Level",
  "latitude": 40.601547,
  "longitude": -74.062138,
  "num_thumbs_up": 0,
  "alert_reliability": 0,
  "num_comments": 0
}

If that call comes back with well under 200 alerts, you have them all and you are done. The rest of this guide is only for areas big or busy enough to cross that limit.

Large or busy areas: split into tiles

A large area divided into a grid of smaller bounding-box tiles, each queried separately to stay under the Waze API per-call alert limit

One call returns at most about 200 alerts, with no page 2. We confirmed it on a box over greater NYC: it returned exactly 200 whether we asked for max_alerts=200 or max_alerts=1000. So if your area can exceed 200 alerts, divide it into a grid of smaller boxes, query each, and merge.

Two things make that reliable. Size the tiles for peak. A tile holding 120 alerts at a calm hour can cross 200 in a storm, so pick your tile size during the busiest conditions you expect and aim for a busiest tile around 150. Treat 200 as a tripwire. If a tile still returns the ceiling, split it into four and re-query. Deduplicate by alert_id, since overlapping tiles return some alerts twice.

Python

import requests, time

API_KEY = "YOUR_API_KEY"
BASE = "https://api.openwebninja.com/waze/alerts-and-jams"
CAP = 200  # most alerts one call returns

def fetch_alerts(sw, ne):
    r = requests.get(BASE, params={
        "bottom_left": f"{sw[0]},{sw[1]}",
        "top_right":   f"{ne[0]},{ne[1]}",
        "max_alerts": CAP, "max_jams": 0,
    }, headers={"x-api-key": API_KEY})
    return r.json().get("data", {}).get("alerts", [])

def collect(sw, ne, seen, out, depth=0):
    alerts = fetch_alerts(sw, ne)
    if len(alerts) >= CAP and depth < 3:          # capped -> split into 4 and recurse
        mlat, mlng = (sw[0] + ne[0]) / 2, (sw[1] + ne[1]) / 2
        collect((sw[0], sw[1]), (mlat, mlng), seen, out, depth + 1)
        collect((sw[0], mlng), (mlat, ne[1]), seen, out, depth + 1)
        collect((mlat, sw[1]), (ne[0], mlng), seen, out, depth + 1)
        collect((mlat, mlng), (ne[0], ne[1]), seen, out, depth + 1)
        return
    for a in alerts:                              # dedupe by alert_id
        if a["alert_id"] not in seen:
            seen.add(a["alert_id"])
            out.append(a)
    time.sleep(0.2)                               # pace to stay under your rate limit

# greater NYC, split into a 3x3 grid of tiles
sw, ne = (40.4774, -74.2591), (40.9176, -73.7004)
rows = cols = 3
lat_step, lng_step = (ne[0] - sw[0]) / rows, (ne[1] - sw[1]) / cols

seen, out = set(), []
for r in range(rows):
    for c in range(cols):
        t_sw = (sw[0] + r * lat_step, sw[1] + c * lng_step)
        t_ne = (t_sw[0] + lat_step, t_sw[1] + lng_step)
        collect(t_sw, t_ne, seen, out)

print(f"Collected {len(out)} unique alerts")

In one sweep over greater NYC, this made 57 calls and collected 2,063 unique alerts, where a single box capped at 200. Lower the grid resolution or the depth guard for fewer calls, raise them for more coverage. The same bounding-box tiling works for other capped area queries, like getting every business in a city.

Note: filtering with alert_types (for example POLICE,ACCIDENT) does not let you use bigger tiles. The filter is applied after the ~200 cap, so it trims what you already fetched. Tile first, then filter.

FAQ

Most common questions and answers

How many alerts does one Waze API call return?

When do I need to split an area into tiles?

Why am I getting duplicate alerts?

Does filtering by alert_types let me use bigger tiles?

Get live traffic alerts for any area

The Waze API returns live accidents, hazards, police, road closures, and traffic jams by bounding box or center and radius. The free plan needs no credit card.