# Waze Traffic Alerts Scraper (`romy/waze-traffic-alerts-scraper`) Actor

Get crowd-sourced road closures, hazards, and events from Waze. Talks directly to Waze's own protocol, no login needed. Split from the mature, published waze-all-in-one-api for a focused, single-purpose workflow.

- **URL**: https://apify.com/romy/waze-traffic-alerts-scraper.md
- **Developed by:** [Romy](https://apify.com/romy) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.10 / 1,000 alert chargeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Waze Traffic Alerts Scraper do?

**Waze Traffic Alerts Scraper** takes one or more geographic bounding boxes and pushes every real-time crowd-sourced road event (closures, contraflow lanes, hazards) found within them — one dataset row per event.

It talks directly to the same internal protocol the official [Waze](https://www.waze.com/) Android app uses (`rt.waze.com`), reverse-engineered by live MITM capture against a real device and cross-referenced against the app's own decompiled protobuf schema (see `proto/waze_rt.proto` in the source repo — field names and numbers are the real app's, not guesses). No Waze account, no API key, no scraping setup. This is the `/alerts` slice of [Waze All-in-One API](https://apify.com/romy/waze-all-in-one-api), split out as its own focused Actor.

### Why use Waze Traffic Alerts Scraper?

- **Real crowd-sourced road events** — closures, contraflow lanes, and hazards with geometry, the same data rendered as dashed lines and pins in the Waze app
- **Batch multiple areas in one run** — pass many bounding boxes and get every event across all of them in a single dataset
- **No account needed** — every request authenticates itself with a fresh anonymous session
- **Confirmed working worldwide** — the underlying protocol was tested live in Indonesia, the UK, the US, and Israel during development, not just one market
- **Use cases:** traffic monitoring dashboards, road-closure alerting, urban mobility research, logistics/routing risk analysis

### Input

| Field           | Type  | Description                                                                                |
| --------------- | ----- | ------------------------------------------------------------------------------------------ |
| `boundingBoxes` | array | **Required.** One or more `{ north, south, east, west }` bounding boxes (decimal degrees). |

Example:

```json
{
    "boundingBoxes": [{ "north": -6.15, "south": -6.18, "east": 106.83, "west": 106.82 }]
}
```

### Output

One dataset row per road event, tagged with the bounding box it came from:

```json
{
    "boundingBox": { "north": -6.15, "south": -6.18, "east": 106.83, "west": 106.82 },
    "id": "750503858",
    "version": 0,
    "typeCode": 5,
    "street": "Contra Flow Hayam Wuruk",
    "city": "Jakarta Pusat",
    "crossStreet": "Gajah Mada",
    "points": [
        { "lon": 106.820862, "lat": -6.167265 },
        { "lon": 106.819936, "lat": -6.163168 }
    ],
    "roadSegmentIds": ["516284383", "516266383"],
    "raw": [
        "AddRoadInfo",
        "750503858",
        "0",
        "5",
        "0",
        "Contra Flow Hayam Wuruk",
        "Jakarta Pusat",
        "",
        "Gajah Mada",
        "F",
        "F",
        "0",
        "0",
        "2",
        "0",
        "-1",
        "T",
        "-1",
        "-1",
        "12",
        "-1",
        "F",
        "0",
        "0",
        "465",
        "",
        "1164106498",
        "1"
    ]
}
```

### Data table

| Field                             | Description                                                                                               |
| --------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `boundingBox`                     | The bounding box this event was found in (echoes back the input)                                          |
| `id`                              | Stable event id, unchanged across live updates                                                            |
| `version`                         | Update/sequence number for this event                                                                     |
| `typeCode`                        | Numeric event type (not yet mapped to a name — see Known limitations)                                     |
| `street` / `city` / `crossStreet` | Location context, as reported                                                                             |
| `points`                          | Event geometry (polyline), decoded lon/lat                                                                |
| `roadSegmentIds`                  | Underlying Waze road-graph segment ids the event is linked to                                             |
| `raw`                             | The unparsed `AddRoadInfo` CSV fields, for the handful of positions not yet mapped to a named field above |

### How it connects to the parent

This Actor is a narrow, batch-run spin-off of [Waze All-in-One API](https://apify.com/romy/waze-all-in-one-api), a Standby REST API exposing eight Waze endpoints. It reuses that Actor's exact session-handshake and CSV-parsing logic for the `/alerts` endpoint only, restructured as a normal input-in/dataset-out batch Actor instead of an always-on HTTP API. If you need routing, search, nearby POI, reverse geocoding, walking distance, batch ETA, or SOS providers too, use the parent Actor instead.

### Known limitations

- **`typeCode`, and a handful of other numeric fields, aren't mapped to human-readable names.** `AddRoadInfo` is parsed entirely natively (no Java-side protobuf class to cross-reference, unlike the parent's other endpoints) — confirmed by decompiling the actual native parser function. That decompile did surface two verified wire-format facts not yet correlated to an exact field position: one numeric field is a float scaled ×10 (not a plain int), and one field supports a `|`-delimited sub-list of up to 20 integers — never populated in any sample captured so far. The unmapped positions are returned under `raw` rather than guessed at.
- This is an unofficial, reverse-engineered integration, not affiliated with or endorsed by Waze / Google. Behavior may change if Waze changes its protocol.

### Pricing

Pay per event: **$0.004** per `alert` — charged once for each road event returned within a bounding box (Free plan price; lower on paid Apify plans). See the Actor's Pricing tab for current tiered rates.

Found a bug or have a feature request? Use the Issues tab on this Actor's page.

# Actor input Schema

## `boundingBoxes` (type: `array`):

One or more bounding boxes to query, each with north/south/east/west corners (decimal degrees).

## Actor input object example

```json
{
  "boundingBoxes": [
    {
      "north": -6.15,
      "south": -6.18,
      "east": 106.83,
      "west": 106.82
    }
  ]
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "boundingBoxes": [
        {
            "north": -6.15,
            "south": -6.18,
            "east": 106.83,
            "west": 106.82
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("romy/waze-traffic-alerts-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "boundingBoxes": [{
            "north": -6.15,
            "south": -6.18,
            "east": 106.83,
            "west": 106.82,
        }] }

# Run the Actor and wait for it to finish
run = client.actor("romy/waze-traffic-alerts-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "boundingBoxes": [
    {
      "north": -6.15,
      "south": -6.18,
      "east": 106.83,
      "west": 106.82
    }
  ]
}' |
apify call romy/waze-traffic-alerts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,romy/waze-traffic-alerts-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/OCz7543fkk0aySIXd/builds/2QTyS2Db3wzuqQJlD/openapi.json
