{
  "openapi": "3.0.1",
  "info": {
    "title": "City Crime & Safety Watch Scraper - 311, EPA, NHTSA, NOAA, USGS",
    "description": "Scrape Boston 311 requests, EPA ECHO compliance, USGS stream gauges, NHTSA vehicle complaints and NOAA storm events in one run. Export to CSV, JSON, Excel or XML.",
    "version": "0.2",
    "x-build-id": "9MTplchqK9YbhwfTZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~city-crime-safety-watch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-city-crime-safety-watch-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/parseforge~city-crime-safety-watch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-city-crime-safety-watch-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/parseforge~city-crime-safety-watch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-city-crime-safety-watch-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",
        "properties": {
          "sources": {
            "title": "Sources",
            "uniqueItems": true,
            "type": "array",
            "description": "Which public agencies to query. Records are collected round-robin across the selected sources until Max Items is reached.",
            "items": {
              "type": "string",
              "enum": [
                "boston-311-complaints",
                "epa-echo-violations",
                "usgs-streamflow",
                "nhtsa-vehicle-complaints",
                "noaa-storm-events"
              ],
              "enumTitles": [
                "Boston 311 service requests",
                "EPA ECHO facility compliance",
                "USGS streamflow gauges",
                "NHTSA vehicle complaints",
                "NOAA storm events"
              ]
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
          },
          "state": {
            "title": "U.S. state",
            "enum": [
              "AL",
              "AK",
              "AZ",
              "AR",
              "CA",
              "CO",
              "CT",
              "DE",
              "DC",
              "FL",
              "GA",
              "HI",
              "ID",
              "IL",
              "IN",
              "IA",
              "KS",
              "KY",
              "LA",
              "ME",
              "MD",
              "MA",
              "MI",
              "MN",
              "MS",
              "MO",
              "MT",
              "NE",
              "NV",
              "NH",
              "NJ",
              "NM",
              "NY",
              "NC",
              "ND",
              "OH",
              "OK",
              "OR",
              "PA",
              "RI",
              "SC",
              "SD",
              "TN",
              "TX",
              "UT",
              "VT",
              "VA",
              "WA",
              "WV",
              "WI",
              "WY",
              "PR"
            ],
            "type": "string",
            "description": "State for EPA ECHO facilities, USGS gauges and NOAA storm events. Boston 311 is always Massachusetts and NHTSA complaints are not filed by state."
          },
          "zipCode": {
            "title": "ZIP code (EPA ECHO)",
            "type": "string",
            "description": "EPA ECHO needs a ZIP code to keep the facility query within its row limit. Leave empty to use a large-city ZIP of the selected state."
          },
          "year": {
            "title": "Year",
            "enum": [
              "current",
              "2026",
              "2025",
              "2024",
              "2023",
              "2022",
              "2021",
              "2020",
              "2019",
              "2018",
              "2017"
            ],
            "type": "string",
            "description": "Boston 311 dataset year and NOAA Storm Events year. \"Current\" reads the live Boston 311 system and the most recent NOAA file.",
            "default": "current"
          },
          "query": {
            "title": "Search text (Boston 311)",
            "type": "string",
            "description": "Full-text search across Boston 311 requests, for example \"rodent\", \"pothole\" or a street name. Other sources ignore it."
          },
          "caseStatus": {
            "title": "Case status (Boston 311)",
            "enum": [
              "any",
              "Closed",
              "In progress"
            ],
            "type": "string",
            "description": "Keep only requests in this state.",
            "default": "any"
          },
          "vehicleMake": {
            "title": "Vehicle make (NHTSA)",
            "type": "string",
            "description": "Manufacturer as spelled on nhtsa.gov, for example Honda, Ford or Toyota."
          },
          "vehicleModel": {
            "title": "Vehicle model (NHTSA)",
            "type": "string",
            "description": "Model name, for example Civic, Focus or Camry."
          },
          "vehicleModelYear": {
            "title": "Model year (NHTSA)",
            "minimum": 1949,
            "maximum": 2027,
            "type": "integer",
            "description": "Model year of the vehicle, for example 2020."
          },
          "eventType": {
            "title": "Event type (NOAA)",
            "enum": [
              "All",
              "Thunderstorm Wind",
              "Hail",
              "Flash Flood",
              "High Wind",
              "Winter Weather",
              "Drought",
              "Winter Storm",
              "Heat",
              "Flood",
              "Marine Thunderstorm Wind",
              "Heavy Snow",
              "Extreme Cold/Wind Chill",
              "Tornado",
              "Excessive Heat",
              "Strong Wind",
              "Cold/Wind Chill",
              "Heavy Rain",
              "Dense Fog",
              "Blizzard",
              "Wildfire",
              "Dust Storm",
              "Lightning",
              "Frost/Freeze",
              "Coastal Flood",
              "Funnel Cloud",
              "Debris Flow",
              "Lake-Effect Snow",
              "Ice Storm",
              "Waterspout",
              "Marine High Wind",
              "Rip Current",
              "High Surf",
              "Astronomical Low Tide",
              "Avalanche",
              "Marine Hail",
              "Marine Tropical Storm",
              "Sneakerwave",
              "Sleet",
              "Freezing Fog",
              "Tropical Storm",
              "Tsunami",
              "Marine Strong Wind",
              "Storm Surge/Tide",
              "Marine Dense Fog",
              "Tropical Depression",
              "Dust Devil",
              "Seiche",
              "Lakeshore Flood"
            ],
            "type": "string",
            "description": "Keep only storm events of this type. \"All\" keeps every type.",
            "default": "All"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "All five sources are open government APIs and answer direct requests. Switch Apify Proxy on only if your runs start seeing HTTP 403 or 429.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}