{
  "openapi": "3.0.1",
  "info": {
    "title": "Victoria Road Crash Data (Australia) - Crashes & Hotspots",
    "description": "Every police-reported road crash in Victoria, Australia since 2012: severity, location, speed zone, road users and vehicles. Search by council, road, radius or date, or find crash hotspots. Official open data (CC BY 4.0), updated monthly.",
    "version": "1.0",
    "x-build-id": "tH7hS5quJfDVxHgki"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mollydancer~victoria-road-crash-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mollydancer-victoria-road-crash-data",
        "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/mollydancer~victoria-road-crash-data/runs": {
      "post": {
        "operationId": "runs-sync-mollydancer-victoria-road-crash-data",
        "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/mollydancer~victoria-road-crash-data/run-sync": {
      "post": {
        "operationId": "run-sync-mollydancer-victoria-road-crash-data",
        "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": {
          "outputMode": {
            "title": "What do you want back?",
            "enum": [
              "crashes",
              "summary"
            ],
            "type": "string",
            "description": "Individual crashes (one row per crash), or a summary (one row per council, road, year, hotspot etc.) with crash and casualty counts.",
            "default": "crashes"
          },
          "summaryGroupBy": {
            "title": "Summarise by",
            "enum": [
              "council",
              "road",
              "hotspot",
              "year",
              "month",
              "severity",
              "crashType",
              "speedZone",
              "dayOfWeek",
              "hourOfDay",
              "lightCondition",
              "region"
            ],
            "type": "string",
            "description": "Only used in summary mode. 'Hotspot' groups crashes into small map squares and ranks the worst locations.",
            "default": "council"
          },
          "hotspotSizeMetres": {
            "title": "Hotspot size (metres)",
            "minimum": 50,
            "maximum": 5000,
            "type": "integer",
            "description": "Width of each hotspot map square. 250 m suits intersections and short road sections.",
            "default": 250
          },
          "minCrashesPerGroup": {
            "title": "Minimum crashes per summary row",
            "minimum": 1,
            "type": "integer",
            "description": "Summary mode only: leave out groups with fewer crashes than this (handy for hotspots)."
          },
          "councils": {
            "title": "Councils",
            "type": "array",
            "description": "Council (local government area) names, e.g. Wyndham, Casey, Greater Geelong, Melbourne. Leave empty for all of Victoria.",
            "items": {
              "type": "string"
            }
          },
          "roadContains": {
            "title": "Road name contains",
            "type": "string",
            "description": "Text to match in the road name, e.g. 'Princes' or 'Hoppers Lane'."
          },
          "nearLatitude": {
            "title": "Near latitude",
            "type": "number",
            "description": "Find crashes within a radius of a point. Example: -37.9001 (Werribee). Use with Near longitude."
          },
          "nearLongitude": {
            "title": "Near longitude",
            "type": "number",
            "description": "Example: 144.6610 (Werribee). Use with Near latitude."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "type": "number",
            "description": "Used with Near latitude / longitude.",
            "default": 1
          },
          "dateFrom": {
            "title": "Crashes from",
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "dateTo": {
            "title": "Crashes to",
            "type": "string",
            "description": "YYYY-MM-DD (inclusive)"
          },
          "daysOfWeek": {
            "title": "Days of week",
            "type": "array",
            "description": "Leave empty for every day.",
            "items": {
              "type": "string",
              "enum": [
                "Monday",
                "Tuesday",
                "Wednesday",
                "Thursday",
                "Friday",
                "Saturday",
                "Sunday"
              ]
            }
          },
          "hourFrom": {
            "title": "From hour (0-23)",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Time-of-day window. Overnight works too, e.g. from 22 to 4."
          },
          "hourTo": {
            "title": "To hour (0-23)",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Inclusive, e.g. 9 means up to 9:59."
          },
          "severities": {
            "title": "Severity",
            "type": "array",
            "description": "Leave empty for all crashes.",
            "items": {
              "type": "string",
              "enum": [
                "Fatal",
                "Serious injury",
                "Other injury",
                "Non-injury"
              ]
            }
          },
          "minFatalities": {
            "title": "Minimum deaths",
            "minimum": 1,
            "type": "integer",
            "description": "e.g. 2 for multi-fatality crashes."
          },
          "roadUsers": {
            "title": "Involving",
            "type": "array",
            "description": "Only crashes that involve ALL of the selected road users.",
            "items": {
              "type": "string",
              "enum": [
                "motorcyclist",
                "pillion",
                "pedestrian",
                "bicyclist",
                "heavyVehicle",
                "publicTransport",
                "youngDriver",
                "olderDriver",
                "olderPedestrian",
                "child"
              ],
              "enumTitles": [
                "Motorcycle",
                "Pillion passenger",
                "Pedestrian",
                "Bicycle",
                "Heavy vehicle (truck)",
                "Tram, bus or train",
                "Young driver (18-25)",
                "Older driver (75+)",
                "Older pedestrian (65+)",
                "Child or teen pedestrian/cyclist (5-18)"
              ]
            }
          },
          "crashTypes": {
            "title": "Crash types",
            "type": "array",
            "description": "Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "Collision with vehicle",
                "Collision with a fixed object",
                "Struck Pedestrian",
                "Vehicle overturned (no collision)",
                "No collision and no object struck",
                "Struck animal",
                "collision with some other object",
                "Fall from or in moving vehicle",
                "Other accident"
              ]
            }
          },
          "speedZones": {
            "title": "Speed zones (km/h)",
            "type": "array",
            "description": "Leave empty for all speed zones.",
            "items": {
              "type": "string",
              "enum": [
                "30",
                "40",
                "50",
                "60",
                "70",
                "75",
                "80",
                "90",
                "100",
                "110"
              ]
            }
          },
          "lightConditions": {
            "title": "Light conditions",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Day",
                "Dusk/Dawn",
                "Dark Street lights on",
                "Dark No street lights",
                "Dark Street lights off",
                "Dark Street lights unknown",
                "Unk."
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "dateDesc",
              "dateAsc",
              "severity",
              "distance"
            ],
            "type": "string",
            "description": "Crashes: newest, oldest, most severe, or nearest (radius searches sort nearest first by default). Summaries: 'Most severe' ranks by fatal then serious crashes instead of total crashes."
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 250000,
            "type": "integer",
            "description": "Stop after this many rows. You are charged per row returned.",
            "default": 1000
          },
          "useBundledData": {
            "title": "Use the bundled data copy",
            "type": "boolean",
            "description": "By default each run fetches the latest official file. Tick to skip that and use the copy built into the Actor (slightly faster, may be a month or two older).",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}