{
  "openapi": "3.0.1",
  "info": {
    "title": "Waze API — Real-Time Traffic, Alerts & Road Incidents",
    "description": "Pull real-time Waze traffic data via API: accidents, hazards, police reports, road closures and live jams in any map area, plus driving directions with on-route alerts and venue search. Clean geo-coded JSON rows for logistics, routing, fleet and mobility analytics. No Waze account needed.",
    "version": "1.0",
    "x-build-id": "GSpW2gpLDSxIW1TbV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~waze-traffic-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-waze-traffic-scraper",
        "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~waze-traffic-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-waze-traffic-scraper",
        "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~waze-traffic-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-waze-traffic-scraper",
        "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",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "🎯 Operation — what do you want to pull?",
            "enum": [
              "alertsAndJams",
              "drivingDirections",
              "venues"
            ],
            "type": "string",
            "description": "🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.\n\n- **🚦 Alerts & Jams** — all real-time alerts (accidents, hazards, police, road closures) AND traffic jams in a map area (bounding box). One row per incident, tagged `recordType`.\n- **🧭 Driving Directions** — candidate Waze routes between two points, each with on-route alerts, toll/HOV flags and arrival-time support. One row per route.\n- **📍 Venues** — venues / points of interest inside a map area (bounding box). One row per venue.\n\n💡 **TIP:** Alerts & Jams is the core real-time-traffic operation. Use Driving Directions for route-level incident enrichment.",
            "default": "alertsAndJams"
          },
          "bottomLeft": {
            "title": "↙️ Bottom-Left corner (lat,lng)",
            "type": "string",
            "description": "↙️ **Required for `Alerts & Jams` and `Venues`.**\n\nBottom-left corner of the map area (bounding box) as a `latitude,longitude` pair.\n- `40.66615,-74.13732` — lower-left of a New York City box\n\n💡 **TIP:** Keep the box small (a few km across) for dense, fast results. Pair with the top-right corner to define the rectangle.\n\n⚠️ **Ignored** for Driving Directions."
          },
          "topRight": {
            "title": "↗️ Top-Right corner (lat,lng)",
            "type": "string",
            "description": "↗️ **Required for `Alerts & Jams` and `Venues`.**\n\nTop-right corner of the map area (bounding box) as a `latitude,longitude` pair.\n- `40.77278,-73.76818` — upper-right of a New York City box\n\n⚠️ **Ignored** for Driving Directions."
          },
          "maxAlerts": {
            "title": "🚧 Max alerts",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "For `Alerts & Jams` — maximum number of alerts to fetch (accidents, hazards, police, road closures). Set to `0` to fetch jams only. Default 20.",
            "default": 20
          },
          "maxJams": {
            "title": "🐌 Max jams",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "For `Alerts & Jams` — maximum number of traffic jams to fetch. Set to `0` to fetch alerts only. Default 20.",
            "default": 20
          },
          "alertTypes": {
            "title": "🏷️ Alert types filter",
            "type": "string",
            "description": "Optional. For `Alerts & Jams` — only return alerts of specific types, as a comma-separated list. Values: `ACCIDENT`, `HAZARD`, `JAM`, `ROAD_CLOSED`, `POLICE`, `CONSTRUCTION`, `MISC`.\n- `POLICE,HAZARD`\n\nLeave blank for all types."
          },
          "alertSubtypes": {
            "title": "🏷️ Alert subtypes filter",
            "type": "string",
            "description": "Optional. For `Alerts & Jams` — only return alerts of specific subtypes, as a comma-separated list (e.g. `POLICE_HIDING`, `ROAD_CLOSED_EVENT`, `HAZARD_ON_ROAD_CONSTRUCTION`). Leave blank for all subtypes."
          },
          "venueCategories": {
            "title": "🏷️ Venue categories filter",
            "type": "string",
            "description": "Optional. For `Venues` — only return venues in specific categories, as a comma-separated list (e.g. `RESTAURANT,PARKING_LOT,ICE_CREAM`). Leave blank for all categories."
          },
          "zoomLevel": {
            "title": "🔍 Zoom level (Venues)",
            "enum": [
              "1",
              "2",
              "3",
              "4"
            ],
            "type": "string",
            "description": "Optional. For `Venues` — Waze zoom level 1–4 (4 is most zoomed in). Default 1. Higher zoom returns more granular venues.",
            "default": "1"
          },
          "sourceCoordinates": {
            "title": "🟢 Source coordinates (lat,lng)",
            "type": "string",
            "description": "🟢 **Required for `Driving Directions`.**\n\nStarting point as a `latitude,longitude` pair.\n- `32.0853,34.781767`\n\n⚠️ **Ignored** for other operations."
          },
          "destinationCoordinates": {
            "title": "🔴 Destination coordinates (lat,lng)",
            "type": "string",
            "description": "🔴 **Required for `Driving Directions`.**\n\nDestination as a `latitude,longitude` pair.\n- `32.794046,34.989571`\n\n⚠️ **Ignored** for other operations."
          },
          "returnRouteCoordinates": {
            "title": "📐 Return route polyline",
            "type": "boolean",
            "description": "Optional. For `Driving Directions` — when enabled, each route row includes the full route polyline (`routeCoordinates`). Off by default to keep rows compact.",
            "default": false
          },
          "arrivalTimestamp": {
            "title": "🕒 Arrival time (unix seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. For `Driving Directions` — desired arrival time as a Unix timestamp (seconds since epoch). When set, directions are calculated for that arrival time. Leave blank for current time."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}