Your team needs Waze-grade incident alerts and live traffic jams in a specific area, and you need an endpoint you can ship against this week. By the end of this article, you will query a real API that returns Waze alerts and jams for a bounding box, parse the response, and understand how to use it both from your backend and from AI agents via MCP.
What you can build with this API
The Waze Data API exposes two capabilities developers commonly ask for:
- Real-time alerts and jams in a geographic rectangle (accidents, road closures, hazards, police, traffic jams, and more) so you can flag incidents on a map, trigger rerouting, or alert field teams.
- Driving directions with alerts along the candidate routes, enabling route choice and ETA-sensitive workflows.
You will call these endpoints through a single Zyla API Hub subscription and API key. No direct Waze integration required.
Getting started on Zyla API Hub
Open the Waze Data API listing on Zyla API Hub and subscribe. The hub uses a subscription + quota model (not pay-per-call). For first access on this API, you can start a 7-day trial or up to 50 requests—check the item page for current access options and pricing. After subscribing, copy your API key and use it in the Authorization header as shown below.
Start 7-day trial on Waze Data API
Alerts and Jams endpoint
This endpoint returns real-time alerts and jams within a rectangular area 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
- Required params:
- bottom_left (string): 51.2800,-0.5100
- top_right (string): 51.5000,-0.0800
- Optional params:
- max_alerts (string): 100
- max_jams (string): 0
- Auth: Authorization: Bearer YOUR_API_KEY
cURL you can copy
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 in most apps:
- status and request_id for request tracking.
- parameters to confirm your bounding box and caps were applied.
- data.alerts[] to iterate and extract fields like type, subtype, latitude, longitude, publish_datetime_utc (UTC timestamp), city, street, and provider.
Notes that save time:
- Coordinates are decimal degrees with the order latitude,longitude in strings (e.g., "51.2800,-0.5100").
- publish_datetime_utc is in UTC. Convert at the edge if your UI shows local times.
- When max_jams=0 you will not receive jams; set a positive value to include them if needed.
- If you’re polling, cache by bounding box and add a short TTL to control quota use.
Python example: fetch alerts and map them
This sample calls the Alerts and Jams endpoint, parses the response, and prints a compact line per alert. Replace YOUR_API_KEY with your key from Zyla API Hub.
import os
import requests
API_KEY = os.getenv("Zyla_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, params=params, headers=headers, timeout=30)
resp.raise_for_status()
payload = resp.json()
if payload.get("status") != "OK":
raise RuntimeError(f"API returned non-OK status: {payload}")
alerts = (payload.get("data") or {}).get("alerts", [])
print(f"received {len(alerts)} alerts")
for a in alerts:
alert_id = a.get("alert_id")
typ = a.get("type")
sub = a.get("subtype")
lat = a.get("latitude")
lng = a.get("longitude")
city = a.get("city")
published_utc = a.get("publish_datetime_utc")
print(f"{published_utc} {typ}/{sub or 'NO_SUBTYPE'} {lat},{lng} {city or '-'} id={alert_id}")
Driving Directions endpoint
Use this when you need Waze routes and the alerts along each route.
- Method: GET
- URL: https://zylalabs.com/api/4814/waze-data-api/6004/driving-directions
- Required params:
- source_coordinates (string): 32.0852999,34.78176759999999
- destination_coordinates (string): 32.7940463,34.989571
- Auth: Authorization: Bearer YOUR_API_KEY
What it returns at a high level: an array of candidate routes with metadata such as route_name, length_meters, duration_seconds, and a list of alerts with type, subtype, latitude, and longitude for each route. The endpoint supports setting the wanted arrival time as per the description; consult the API page for parameter options currently exposed in the Hub.
Real-world patterns that ship
- Incident overlays for operations dashboards: Poll the Alerts and Jams endpoint on a fixed grid around your service area. De-duplicate alerts by alert_id and expire them by publish_datetime_utc.
- Geo-fenced alerts: When vehicles or couriers enter a bounding box near a closure, call the endpoint once and push a concise notification using type/subtype and street (when available).
- Route validation before dispatch: Call Driving Directions to fetch candidate routes and inspect the embedded alerts list to choose the fastest route that avoids hazards or closures.
- Change detection: Compare consecutive responses by alert_id and num_thumbs_up to detect newly confirmed incidents without recomputing your full map layer.
Working with coordinates and bounding boxes
- bottom_left and top_right are strings "lat,lon". Keep the order as latitude first, longitude second.
- Ensure your box isn’t inverted; latitude increases northward, longitude increases eastward.
- For large cities, divide the area into tiles to keep result sizes predictable and to parallelize polling.
- Persist the parameters you used (the API echoes them under parameters) to audit your ingestion pipeline.
Calling the API from AI agents via MCP
If you are orchestrating with an MCP-compatible client (e.g., Claude Code, Cursor, Windsurf), you can invoke the same HTTPS endpoints through the marketplace’s MCP gateway. Provide your Zyla API key and have the agent call the endpoint URLs documented above. The gateway is available at:
Practical tips:
- Keep the Authorization: Bearer YOUR_API_KEY header in the tool definition or per-call headers.
- Pass query parameters exactly as shown (strings for coordinate pairs).
- When building an autonomous loop, enforce a backoff or TTL to respect your quota.
Operational guidance
- Auth header format is strict: Authorization: Bearer YOUR_API_KEY.
- Timestamps are UTC. Convert client-side as needed.
- Max caps: Use max_alerts and max_jams to bound payload sizes for mobile clients or serverless functions with small memory.
- Error handling: Always check the top-level status and keep request_id for logs. On non-OK results, log the full payload for support.
- Caching: For map tiles, a short TTL (e.g., 30–90 seconds) balances freshness and quota efficiency.
End-to-end example flow
- Pick a bounding box that covers your target corridor (e.g., a delivery route’s 5 km buffer).
- Call Alerts and Jams with your box and caps for alerts and jams.
- Render markers colored by alert type/subtype. Show publish_datetime_utc in the UI with local conversion and a relative “age”.
- If a critical type (ROAD_CLOSED) appears ahead, optionally call Driving Directions to re-evaluate the path.
- Repeat on a timed loop with ETag-like caching in your layer, keyed by alert_id.
Troubleshooting checklist
- 401 Unauthorized: Verify the Authorization header is set and the key is from the subscribed Waze Data API in Zyla Hub.
- Empty alerts array: Confirm your bounding box actually intersects road networks; try expanding the area or removing tight caps.
- Time display off: Remember publish_datetime_utc is in UTC; convert on the client.
- Large payloads: Lower max_alerts and enable pagination-like tiling by splitting the bounding box.
FAQ
What authentication does this API use?
Use the HTTP header Authorization: Bearer YOUR_API_KEY on every request.
How do I set the geographic area?
Provide two strings: bottom_left and top_right, each as "lat,lon" (latitude first, longitude second). The API returns alerts and jams within the rectangle.
Can I limit the number of results?
Yes. Use max_alerts and max_jams to cap the number of items returned.
Does the Driving Directions endpoint include incidents?
Yes. It includes alerts along each possible route in the response, alongside route metadata such as length_meters and duration_seconds.
Is there a free plan?
No free plan. This API uses a subscription + quota model. You can start a 7-day trial or up to 50 requests on the item page; check the listing for current access options.
Ready to plug in Waze-grade alerts and jams without building a data pipeline from scratch? Subscribe and get your key on the marketplace listing: Start 7-day trial on Waze Data API. Build with one key across thousands of APIs on Zyla API Hub and ship your integration this week.