You need live traffic data you can ship this week: alerts for accidents, hazards, police, road closures, and the exact jams affecting your service area. By the end of this guide, you’ll query a real endpoint that returns Waze alerts and jams for a bounding box, parse the results, and be ready to integrate them into routing, ETAs, and incident dashboards.
What this API gives you
The Waze Data API on Zyla API Hub returns real-time traffic intelligence straight from Waze, focused on:
- Alerts: accidents, road closures, hazards, police, and more.
- Jams: congestion events within your selected rectangle.
- Routing: optional endpoint for driving directions with alerts along candidate routes.
Typical uses include service dispatch, dynamic ETAs, traffic-aware notifications, driver routing UIs, and city operations dashboards. Everything runs on a single Zyla account and API key, with subscription + quota billing (not pay-per-call). You can start a 7-day trial of this API from its marketplace page.
Getting started on Zyla API Hub
To get an API key and make your first call:
- Open the API listing and start your trial: Start 7-day trial on Waze Data API.
- Click Subscribe or Start Free Trial (when available) and copy your API key.
- Call the endpoints documented below using Authorization: Bearer YOUR_API_KEY.
Zyla API Hub hosts more than 10,000 public APIs under one subscription model and one API key. You can add other traffic, mapping, or utility APIs later without changing your auth setup.
Endpoint: Alerts and Jams
Use this endpoint to fetch real-time alerts and jams for a geographic rectangle defined by bottom-left and top-right latitude/longitude pairs.
- Method: GET
- URL: https://zylalabs.com/api/4814/waze-data-api/6003/alerts-and-jams
- Description: Get real-time alerts data and jams information from Waze in a geographic rectangular area by bottom-left and top-right latitude, longitude pairs. Supports all Waze alert types including accidents, road blocks, hazards, traffic jams, police, and more.
Required query parameters
- bottom_left (string, required): 51.2800,-0.5100
- top_right (string, required): 51.5000,-0.0800
Optional query parameters
- max_alerts (string, optional): 100
- max_jams (string, optional): 0
cURL example (copy-paste)
curl -s -X GET "https://zylalabs.com/api/4814/waze-data-api/6003/alerts-and-jams?bottom_left=51.2800%2C-0.5100&top_right=51.5000%2C-0.0800&max_alerts=100&max_jams=0" \
-H "Authorization: Bearer YOUR_API_KEY"
Official sample response
{
"status": "OK",
"request_id": "86b7f40f-b386-4aee-af95-274974d93184",
"parameters": {
"bottom_left": [
"51.2800",
"-0.5100"
],
"top_right": [
"51.5000",
"-0.0800"
],
"max_alerts": 100,
"max_jams": 0
},
"data": {
"alerts": [
{
"alert_id": "alert-1851823848/7b5e52cb-9549-4955-a117-ce19dd01fe9b",
"type": "HAZARD",
"subtype": "HAZARD_ON_ROAD_CONSTRUCTION",
"reported_by": "Causeway one.network",
"description": ".",
"image": null,
"publish_datetime_utc": "2026-07-22T08:30:00.000Z",
"country": "GB",
"city": "Mole Valley",
"street": null,
"latitude": 51.281508,
"longitude": -0.369863,
"num_thumbs_up": 7,
"alert_reliability": 0,
"alert_confidence": 0,
"near_by": null,
"provider": "Elgin (Road works)",
"provider_id": "151505923",
"comments": [],
"num_comments": 0
},
{
"alert_id": "alert-1191763163/60f6957d-0668-49d6-b43f-710177584187",
"type": "HAZARD",
"subtype": "HAZARD_ON_ROAD_CONSTRUCTION",
"reported_by": "Causeway one.network",
"description": ".",
"image": null,
"publish_datetime_utc": "2026-05-15T13:00:00.000Z",
"country": "GB",
"city": "Mole Valley",
"street": "Durleston Park Dr",
"latitude": 51.280691,
"longitude": -0.365612,
"num_thumbs_up": 39,
"alert_reliability": 0,
"alert_confidence": 0,
"near_by": null,
"provider": "Elgin (Road works)",
"provider_id": "149944301",
"comments": [],
"num_comments": 0
},
{
"alert_id": "alert-1618880859/60722796-8030-486e-913c-4e683837b754",
"type": "ROAD_CLOSED",
"subtype": null,
"reported_by": "ClosureMonitor",
"description": "Closed until Jul 31 for roadworks. Ref #151583431",
"image": null,
"publish_…
What you’ll actually use:
- status and request_id for request tracking and error handling.
- parameters to confirm the query rectangle and any caps applied.
- data.alerts[n] fields for mapping and notifications:
- alert_id: unique identifier for de-duplication.
- type and subtype: classify incidents (e.g., HAZARD, ROAD_CLOSED).
- publish_datetime_utc: ISO 8601 UTC timestamp for alert recency.
- latitude, longitude: WGS84 coordinates for your map layers.
- city, street, country: text labels for UI.
- num_thumbs_up: quick community confidence signal.
Python example: fetch and filter alerts
The snippet below queries the same Alerts and Jams endpoint, extracts core fields, and filters for closures and hazards. Replace YOUR_API_KEY before running.
import os
import requests
from datetime import datetime, timezone
API_KEY = os.getenv("ZYLALABS_API_KEY", "YOUR_API_KEY")
URL = "https://zylalabs.com/api/4814/waze-data-api/6003/alerts-and-jams"
params = {
"bottom_left": "51.2800,-0.5100",
"top_right": "51.5000,-0.0800",
"max_alerts": "100",
"max_jams": "0",
}
headers = {"Authorization": f"Bearer {API_KEY}"}
resp = requests.get(URL, headers=headers, params=params, timeout=30)
resp.raise_for_status()
payload = resp.json()
if payload.get("status") != "OK":
raise SystemExit(f"API error: {payload}")
alerts = payload.get("data", {}).get("alerts", [])
def parse_iso_utc(ts):
# publish_datetime_utc is ISO 8601 with Z
try:
return datetime.fromisoformat(ts.replace("Z", "+00:00"))
except Exception:
return None
# Example: focus on closures and hazards from the last 24 hours
now = datetime.now(timezone.utc)
recent = []
for a in alerts:
ts = parse_iso_utc(a.get("publish_datetime_utc"))
if ts and (now - ts).total_seconds() <= 24 * 3600:
if a.get("type") in {"ROAD_CLOSED", "HAZARD"}:
recent.append({
"alert_id": a.get("alert_id"),
"type": a.get("type"),
"subtype": a.get("subtype"),
"city": a.get("city"),
"street": a.get("street"),
"lat": a.get("latitude"),
"lon": a.get("longitude"),
"published": a.get("publish_datetime_utc"),
"thumbs": a.get("num_thumbs_up"),
})
for r in recent:
print(f"[{r['published']}] {r['type']} ({r['subtype']}) at {r['lat']},{r['lon']} - {r['city']} {r['street'] or ''} (id={r['alert_id']}, 👍{r['thumbs']})")
Parameter and data handling notes
- Coordinates are latitude,longitude pairs (WGS84). The API expects bottom_left and top_right forming a valid rectangle.
- max_alerts and max_jams let you cap results if you’re rendering on a dense map. Set to 0 to disable a category when supported by the listing docs (e.g., max_jams=0 in the sample).
- Timestamps are returned as UTC (Z-suffix). Parse as ISO 8601.
- For dashboards, cache responses briefly (e.g., 30–60 seconds) to reduce flicker while staying fresh. Always display the request_id somewhere in logs to trace issues.
Endpoint: Driving Directions (with alerts along the route)
Optionally, fetch potential routes between two coordinates and the alerts that affect each route. This is useful when you’re building traffic-aware routing or ETAs and need to surface jams and incidents along candidate paths.
- Method: GET
- URL: https://zylalabs.com/api/4814/waze-data-api/6004/driving-directions
- Description: Get routes / driving directions from Waze, including alerts along each possible route. Supports setting the wanted arrival time.
Required query parameters
- source_coordinates (string, required): 32.0852999,34.78176759999999
- destination_coordinates (string, required): 32.7940463,34.989571
cURL example
Responses include route metadata like length_meters and duration_seconds, and an alerts array with items such as type=JAM and subtypes like JAM_STAND_STILL_TRAFFIC. Use those to flag risky or slow segments in your UI and to compute traffic-adjusted ETAs.
Practical use cases you can ship this week
- Service area incident feed: Poll the Alerts and Jams endpoint for your delivery/field ops rectangle. Push ROAD_CLOSED and HAZARD alerts to Slack with coordinates and city/street.
- Traffic-aware ETAs: Combine Driving Directions duration_seconds with alert density to decide when to reroute or buffer ETAs. Annotate routes with route alerts for driver apps.
- Map overlays: Draw alerts as points with icons by type/subtype and display num_thumbs_up as a quick confidence hint. Color-code jams differently from hazards.
- Ops metrics: Track alert counts by hour and type within your rectangle to understand recurring bottlenecks (e.g., construction hotspots).
Call the API from AI agents via MCP
You can also orchestrate live traffic calls from AI coding assistants or autonomous agents using Zyla’s MCP endpoint. Any MCP-compatible client (e.g., Claude Code, Cursor, Windsurf) can access the marketplace tools via:
- Configure your client with the MCP endpoint and your Zyla API key (as provided in your account).
- Have the agent invoke the Waze Data API’s Alerts and Jams or Driving Directions tools, passing the same query parameters shown above.
- MCP centralizes auth and tool discovery so you can script traffic checks inside coding sessions or CI jobs without re-implementing HTTP plumbing.
Integration pointers that save time
- Bounding boxes: Store your service rectangles by market or depot, and validate that bottom_left.lat < top_right.lat and bottom_left.lon < top_right.lon before calling.
- De-duplication: Use alert_id as a stable key in your database or cache. If you poll frequently, upsert rather than append.
- Refresh cadence: Incidents evolve quickly; 30–120 second intervals balance freshness and quota. Tune per market density.
- Map UX: Convert type/subtype into iconography. For hazards like HAZARD_ON_ROAD_CONSTRUCTION, tie into scheduled work calendars when available in your org.
- Error handling: Log status and request_id. If status is not OK, back off and retry with jitter.
Security and pricing notes
- Auth: Send Authorization: Bearer YOUR_API_KEY on every request.
- Billing: subscription + quota, not pay-per-call. There is no Free Plan; check the API page for current access options and pricing.
- Trial: the Waze Data API listing offers a 7-day trial you can start from the item page.
Next steps
If you need an API to get alerts and jams, you can implement the rectangle query today and render your first incidents in minutes. Create your account, subscribe, and call the endpoints from your service or agent workflow. Start here: Start 7-day trial on Waze Data API.
FAQ
What coordinate format does the API expect?
Latitude,Longitude pairs (WGS84) as strings, for both bottom_left and top_right. Example: 51.2800,-0.5100.
How do I limit results if a rectangle is dense?
Use max_alerts and max_jams to cap returned items, as shown in the cURL example.
What time zone are timestamps in?
publish_datetime_utc is in UTC and formatted as ISO 8601 (e.g., 2026-07-22T08:30:00.000Z). Parse accordingly.
Can I retrieve alerts along a route instead of a rectangle?
Yes. Use the Driving Directions endpoint to get routes and alerts associated with those routes between source and destination coordinates.
Where do I manage my API key and plan?
On the Zyla API Hub listing and your account dashboard. Use the listing page to start the 7-day trial, review quotas, and retrieve your key.