{
  "openapi": "3.0.1",
  "info": {
    "title": "EPA Enforcement Actions Feed - Penalties & Consent Decrees",
    "description": "Feed of new US EPA and state environmental enforcement cases from official EPA ECHO data: company/facility, statute (CAA, CWA, RCRA, SDWA...), violations, federal and state penalties, SEPs, milestones, links. Filter by state, law, penalty, company. New-since-last-run alerts.",
    "version": "0.1",
    "x-build-id": "yVesK3M5NUgxdURFJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moment-data~epa-enforcement-actions-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moment-data-epa-enforcement-actions-feed",
        "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/moment-data~epa-enforcement-actions-feed/runs": {
      "post": {
        "operationId": "runs-sync-moment-data-epa-enforcement-actions-feed",
        "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/moment-data~epa-enforcement-actions-feed/run-sync": {
      "post": {
        "operationId": "run-sync-moment-data-epa-enforcement-actions-feed",
        "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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "Optional. Two-letter codes of the case location, e.g. TX, CA, CO, PR. Empty = all states and territories.",
            "items": {
              "type": "string"
            }
          },
          "statutes": {
            "title": "Statutes (laws)",
            "type": "array",
            "description": "Optional. Keep cases under any of these laws (primary or secondary). Empty = all laws.",
            "items": {
              "type": "string",
              "enum": [
                "CAA",
                "CWA",
                "RCRA",
                "SDWA",
                "EPCRA",
                "FIFRA",
                "CERCLA",
                "TSCA"
              ],
              "enumTitles": [
                "Clean Air Act (CAA)",
                "Clean Water Act (CWA)",
                "Hazardous waste / USTs (RCRA)",
                "Safe Drinking Water Act (SDWA)",
                "Chemical reporting (EPCRA)",
                "Pesticides (FIFRA)",
                "Superfund (CERCLA)",
                "Toxic substances / lead paint (TSCA)"
              ]
            }
          },
          "minPenalty": {
            "title": "Minimum penalty (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only cases whose federal + state/local penalty is at least this amount, e.g. 100000. 0 = include non-penalty orders too."
          },
          "companyKeyword": {
            "title": "Company / case name contains",
            "type": "string",
            "description": "Optional. Case-name text match, e.g. 'Exxon', 'Tyson', 'City of'. ECHO case names normally contain the company or facility name."
          },
          "daysBack": {
            "title": "Actions within (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Cases with an enforcement milestone (complaint filed, settlement lodged, final order issued/entered, case closed) in the last N days. ECHO publishes case data weekly with a 1-2 week lag, so keep this at 30 or more.",
            "default": 30
          },
          "maxItems": {
            "title": "Max cases per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on delivered cases (also caps your spend). Newest action first, larger penalties first on the same day.",
            "default": 40
          },
          "caseCategories": {
            "title": "Case types",
            "type": "array",
            "description": "Formal administrative orders (penalty orders, CAFOs, compliance orders) and judicial cases (consent decrees). Informal actions (notices of violation, warning letters) are optional.",
            "items": {
              "type": "string",
              "enum": [
                "AFR",
                "JDC",
                "AIF"
              ],
              "enumTitles": [
                "Administrative - formal",
                "Judicial (civil court cases)",
                "Administrative - informal (NOVs, warnings)"
              ]
            },
            "default": [
              "AFR",
              "JDC"
            ]
          },
          "leads": {
            "title": "Case lead",
            "type": "array",
            "description": "Optional. EPA-led, state-led or local-agency-led cases. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "EPA",
                "State",
                "Local"
              ],
              "enumTitles": [
                "EPA",
                "State agency",
                "Local agency"
              ]
            }
          },
          "includeCriminal": {
            "title": "Include criminal cases",
            "type": "boolean",
            "description": "Also include federal environmental criminal cases (company defendants only; no detailed report).",
            "default": false
          },
          "enrichDetails": {
            "title": "Full case details",
            "type": "boolean",
            "description": "Fetch each case's ECHO case report: facility name and address, company defendants, violation types, milestones, SEPs, complying actions, pollutants and case summary. Turn off for very large, faster pulls with list fields only.",
            "default": true
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "window",
              "sinceLastRun"
            ],
            "type": "string",
            "description": "window (default): every case in the time window, no saved state. sinceLastRun: only cases (or new milestones of a case) not delivered before for this State key. Use for schedules and alerts.",
            "default": "window"
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the saved feed for sinceLastRun mode. Use one key per schedule.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}