# Google Maps Traffic API — Live Accidents, Closures & Incidents (`sian.agency/google-maps-traffic-alerts`) Actor

Pull live road incidents from Google Maps for any map area: accidents, construction, closures and other slowdowns, each with a type and exact coordinates. Give it a bounding box and get clean geo-coded JSON for dispatch, fleet routing and incident dashboards. No Google account needed.

- **URL**: https://apify.com/sian.agency/google-maps-traffic-alerts.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Travel, Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $13.20 / 1,000 traffic alerts by areas

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Maps Traffic API — Live Accidents, Closures & Incidents

Live road incidents from Google Maps for any map area you define with a bounding box: accidents,
construction, closures and other slowdowns, each geo-coded and returned as flat JSON.

### What you get

| Operation | Returns | Billed as | Notes |
|---|---|---|---|
| `trafficAlerts` | Traffic Alerts by Area | 1 area query | every live traffic incident in a map area |

One area query returns as many incidents as the area currently has. Live test runs came back with
4 to 30 incidents each: 30 across New York at detail level 13, 11 across London, 4 in downtown Los
Angeles. You are billed for the query, not for the incidents in it, so a busy city and a quiet
suburb cost the same.

### Coverage

Global. Verified live against the United States (New York, Los Angeles, Chicago), the United
Kingdom (London) and Brazil (São Paulo). Coverage density follows Google Maps itself, so it is
dense in metros and sparse on rural roads.

### Use cases

#### Fleet & Dispatch Routing

Poll the corridors your vehicles run and reroute around accidents and closures before drivers reach them. Pair it with a Waze feed to catch accidents neither source reports on its own.

#### Incident Monitoring Dashboards

Filter to accidents and closures only and drive a live map for dispatchers or a newsroom. Every row carries a Google Maps deep link so an operator can open the scene in one click.

#### Traffic & Mobility Analytics

Run the same bounding box on a schedule to build a time series of incident density by area, and compare construction and closure load across neighbourhoods or cities.

#### Insurance & Risk Signals

Track accident density in defined zones over time as an underwriting and claims-triage signal, with each row geo-coded to a coordinate pair.

#### Navigation Product Enrichment

Layer Google Maps incident points onto a routing or mapping product as a second opinion alongside whatever primary incident source it already consumes.

### FAQ

**Does this return the same incidents as a Waze feed?**

Largely not, which is the point. In a Los Angeles test both sources reported four accidents at the same moment and none of them matched: the nearest Waze counterpart to each Google accident was between 3 and 16 km away. If you need to catch as many incidents as possible, run both.

**Can I get the time an incident was reported?**

No. Google returns only an incident type and a coordinate pair. Each row carries a scrapedAt stamp recording when this actor fetched it, which is not the same as when the incident began. If you need report times, descriptions and reliability scores, use a Waze-sourced feed.

**Why did my city-sized bounding box get split into several queries?**

Google caps the area per query by detail level: 500 km² at level 13, and less at higher levels. Anything larger is rejected outright upstream, so this actor splits the area into tiles, queries each, and merges the results. Each tile counts as one query for billing, and the run log states the tile count before any charge.

**How do I keep costs predictable when polling continuously?**

Set Max area queries per run to the tile count you expect. The run stops there and the report states how much of the area it covered, so a mistyped bounding box cannot quietly multiply your bill.

**Can I track the same incident across repeated runs?**

Approximately. Google publishes no incident ID, so each row carries a derived incidentId fingerprinted from its type and position. It held stable across about 90% of rows in back-to-back polls; Google occasionally nudges a coordinate by a few metres, which changes the fingerprint. Treat it as a best-effort correlation key, not a durable identifier.

### Output

Every row is flat JSON, exportable as CSV, JSON, Excel or via the API. A run report is saved to
the key-value store with the numbers, any failed items and what they cost.

Google Maps is a trademark of Google LLC. This actor is not affiliated with, endorsed by, or sponsored by Google.

# Actor input Schema

## `bottomLeft` (type: `string`):

📍 **MAP AREA:** South-west corner of the box you want scanned, written as `latitude,longitude`.

🗺️ **HOW IT WORKS:** This corner and the top-right one define the rectangle. Everything Google Maps reports inside it comes back as rows.

💡 **TIP:** Grab a corner from Google Maps by right-clicking the map — it copies as `lat,lng`, ready to paste.

✅ The default covers New York City.

## `topRight` (type: `string`):

📍 **MAP AREA:** North-east corner of the box, written as `latitude,longitude`.

⚠️ **IMPORTANT:** It must sit north and east of the bottom-left corner. Swapped corners are rejected with a clear message rather than silently corrected.

✅ The default covers New York City.

## `zoom` (type: `integer`):

🔍 **HOW FINELY TO SCAN:** From 11 (coarse) to 16 (fine). A finer level finds more incidents but covers less ground per query, so a large area needs more queries.

📐 **GROUND COVERED PER QUERY:**

- **11** — 8000 km²
- **12** — 2000 km²
- **13** — 500 km² *(default, balanced)*
- **14** — 125 km²
- **15** — 30 km²
- **16** — 8 km²

⚠️ **AVOID 11:** It is so coarse it can return nothing at all in a busy city. Prefer 12 or higher.

## `incidentTypes` (type: `array`):

🏷️ **FILTER:** Keep only the incident types you tick. Leave it empty to get all of them.

🚦 **AVAILABLE TYPES:**

- 💥 **Accident** — collisions and crashes
- ⛔ **Road closed** — full closures
- 🚧 **Construction** — roadworks and work zones
- ⚠️ **Other incident** — anything else Google flags

💡 **TIP:** Dispatch and alerting dashboards usually want accidents and closures only. Construction is the most common type by volume and will dominate an unfiltered feed.

## `maxAreaQueries` (type: `integer`):

🛡️ **SPEND GUARD:** The most queries one run may make, so an oversized box can never bill more than you expect.

💰 **BILLING:** You are charged per area query, never per row. A busy city and a quiet suburb cost the same.

🧩 **WHY:** Google caps the ground one query covers, so a large box is split into several. The run stops here and the report says how much it covered.

🚀 **PAID PLANS:** Up to 200 queries per run. Free runs are capped at 3.

## `language` (type: `string`):

🌐 **OUTPUT LANGUAGE:** The language Google Maps should use for the results.

✅ Leave it on English unless you are scanning a region where local-language labels are more useful.

## Actor input object example

```json
{
  "bottomLeft": "40.66615,-74.13732",
  "topRight": "40.77278,-73.76818",
  "zoom": 13,
  "incidentTypes": [],
  "maxAreaQueries": 12,
  "language": "en"
}
```

# Actor output Schema

## `output` (type: `string`):

One row per incident: type and category, latitude and longitude, a Google Maps deep link, the derived incidentId, and the map area and detail level it was found at.

## `report` (type: `string`):

HTML report with the incident count, area queries charged, incident types found and any areas that failed — written even on a fatal crash.

# 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 = {
    "bottomLeft": "40.66615,-74.13732",
    "topRight": "40.77278,-73.76818",
    "zoom": 13,
    "incidentTypes": [],
    "maxAreaQueries": 12,
    "language": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/google-maps-traffic-alerts").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 = {
    "bottomLeft": "40.66615,-74.13732",
    "topRight": "40.77278,-73.76818",
    "zoom": 13,
    "incidentTypes": [],
    "maxAreaQueries": 12,
    "language": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/google-maps-traffic-alerts").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 '{
  "bottomLeft": "40.66615,-74.13732",
  "topRight": "40.77278,-73.76818",
  "zoom": 13,
  "incidentTypes": [],
  "maxAreaQueries": 12,
  "language": "en"
}' |
apify call sian.agency/google-maps-traffic-alerts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sian.agency/google-maps-traffic-alerts"
        }
    }
}

```

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/Qi4iJVZdSGx9iFPa9/builds/VhoUJoiobXC9s1ojw/openapi.json
