{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Traffic API — Live Accidents, Closures & Incidents",
    "description": "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.",
    "version": "1.0",
    "x-build-id": "VhoUJoiobXC9s1ojw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~google-maps-traffic-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-google-maps-traffic-alerts",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/sian.agency~google-maps-traffic-alerts/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-google-maps-traffic-alerts",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/sian.agency~google-maps-traffic-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-google-maps-traffic-alerts",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "bottomLeft": {
            "title": "↙️ Bottom-Left Corner (lat,lng)",
            "type": "string",
            "description": "📍 **MAP AREA:** South-west corner of the box you want scanned, written as `latitude,longitude`.\n\n🗺️ **HOW IT WORKS:** This corner and the top-right one define the rectangle. Everything Google Maps reports inside it comes back as rows.\n\n💡 **TIP:** Grab a corner from Google Maps by right-clicking the map — it copies as `lat,lng`, ready to paste.\n\n✅ The default covers New York City.",
            "default": "40.66615,-74.13732"
          },
          "topRight": {
            "title": "↗️ Top-Right Corner (lat,lng)",
            "type": "string",
            "description": "📍 **MAP AREA:** North-east corner of the box, written as `latitude,longitude`.\n\n⚠️ **IMPORTANT:** It must sit north and east of the bottom-left corner. Swapped corners are rejected with a clear message rather than silently corrected.\n\n✅ The default covers New York City.",
            "default": "40.77278,-73.76818"
          },
          "zoom": {
            "title": "🔍 Detail Level",
            "minimum": 11,
            "maximum": 16,
            "type": "integer",
            "description": "🔍 **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.\n\n📐 **GROUND COVERED PER QUERY:**\n- **11** — 8000 km²\n- **12** — 2000 km²\n- **13** — 500 km² *(default, balanced)*\n- **14** — 125 km²\n- **15** — 30 km²\n- **16** — 8 km²\n\n⚠️ **AVOID 11:** It is so coarse it can return nothing at all in a busy city. Prefer 12 or higher.",
            "default": 13
          },
          "incidentTypes": {
            "title": "🏷️ Incident Types",
            "uniqueItems": true,
            "type": "array",
            "description": "🏷️ **FILTER:** Keep only the incident types you tick. Leave it empty to get all of them.\n\n🚦 **AVAILABLE TYPES:**\n- 💥 **Accident** — collisions and crashes\n- ⛔ **Road closed** — full closures\n- 🚧 **Construction** — roadworks and work zones\n- ⚠️ **Other incident** — anything else Google flags\n\n💡 **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.",
            "items": {
              "type": "string",
              "enum": [
                "accident",
                "road_closed",
                "construction",
                "incident"
              ],
              "enumTitles": [
                "💥 Accident",
                "⛔ Road closed",
                "🚧 Construction",
                "⚠️ Other incident"
              ]
            },
            "default": []
          },
          "maxAreaQueries": {
            "title": "🛡️ Max Area Queries Per Run",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "🛡️ **SPEND GUARD:** The most queries one run may make, so an oversized box can never bill more than you expect.\n\n💰 **BILLING:** You are charged per area query, never per row. A busy city and a quiet suburb cost the same.\n\n🧩 **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.\n\n🚀 **PAID PLANS:** Up to 200 queries per run. Free runs are capped at 3.",
            "default": 12
          },
          "language": {
            "title": "🌐 Language",
            "enum": [
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "nl",
              "pl",
              "tr",
              "ja",
              "ko",
              "zh"
            ],
            "type": "string",
            "description": "🌐 **OUTPUT LANGUAGE:** The language Google Maps should use for the results.\n\n✅ Leave it on English unless you are scanning a region where local-language labels are more useful.",
            "default": "en"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}