{
  "openapi": "3.0.1",
  "info": {
    "title": "US EPA ECHO Environmental Compliance, Violations & Fines MCP",
    "description": "Extract zero-key US EPA ECHO environmental compliance, Clean Air (CAA), Clean Water (CWA) & RCRA hazardous waste violations, Significant Noncompliance (SNC) flags, inspections, formal enforcement actions, and civil penalties.",
    "version": "0.1",
    "x-build-id": "a2fsXQslok7et7KV9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zertax~us-epa-echo-enforcement-mcp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zertax-us-epa-echo-enforcement-mcp",
        "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/zertax~us-epa-echo-enforcement-mcp/runs": {
      "post": {
        "operationId": "runs-sync-zertax-us-epa-echo-enforcement-mcp",
        "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/zertax~us-epa-echo-enforcement-mcp/run-sync": {
      "post": {
        "operationId": "run-sync-zertax-us-epa-echo-enforcement-mcp",
        "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": {
          "state": {
            "title": "US State Code(s)",
            "type": "string",
            "description": "Two-letter USPS state abbreviation(s), comma-separated (e.g. 'TX', 'CA', 'LA,TX'). Defaults to 'TX' when no geographic or facility name filter is provided."
          },
          "facilityName": {
            "title": "Facility Name",
            "type": "string",
            "description": "Optional case-insensitive facility name filter (e.g. 'EXXON', 'CHEVRON', 'REFINERY'). Multiple comma-separated terms supported."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Optional case-insensitive city name filter (e.g. 'HOUSTON', 'BATON ROUGE')."
          },
          "zipCode": {
            "title": "5-Digit ZIP Code(s)",
            "type": "string",
            "description": "Optional 5-digit US ZIP code(s), comma-separated (e.g. '77002' or '77002,77520')."
          },
          "naicsCode": {
            "title": "NAICS Industry Code",
            "type": "string",
            "description": "Optional 2- to 6-digit NAICS code prefix (e.g. '324110' for Petroleum Refineries, '325' for Chemical Manufacturing, '211' for Oil & Gas Extraction)."
          },
          "sicCode": {
            "title": "SIC Industry Code",
            "type": "string",
            "description": "Optional 2- to 4-digit SIC code (e.g. '2911' for Petroleum Refining, '28' for Chemicals)."
          },
          "program": {
            "title": "Environmental Program / Statute",
            "enum": [
              "ALL",
              "CAA",
              "CWA",
              "RCRA"
            ],
            "type": "string",
            "description": "Filter facilities regulated under a specific federal EPA media program.",
            "default": "ALL"
          },
          "minQuartersNoncompliance": {
            "title": "Min Quarters in Noncompliance (3-Year Window)",
            "minimum": 0,
            "maximum": 12,
            "type": "integer",
            "description": "Minimum number of quarters in noncompliance over the past 12 quarters (0–12). Defaults to 1 when no other compliance, enforcement, penalty, or facility name filter is provided. Set to 0 to include fully compliant facilities."
          },
          "significantViolationOnly": {
            "title": "Significant Violation / SNC Only",
            "type": "boolean",
            "description": "Return only facilities currently flagged with Significant Noncompliance (SNC) or High-Priority Violations (HPV).",
            "default": false
          },
          "hasFormalAction": {
            "title": "Has Formal Enforcement Action (5-Year)",
            "type": "boolean",
            "description": "Return only facilities that have received at least one formal EPA or state enforcement action within the last 5 years.",
            "default": false
          },
          "minPenaltiesUsd": {
            "title": "Minimum Total Penalties (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Optional minimum cumulative 5-year civil/administrative penalties in USD (e.g. 50000 for $50,000+)."
          },
          "activeOnly": {
            "title": "Active Permits / Facilities Only",
            "type": "boolean",
            "description": "Restrict results to facilities with active permits/operating status (recommended to stay within EPA query limits).",
            "default": true
          },
          "maxItems": {
            "title": "Max Facility Records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of facility enforcement records to extract (sorted by total penalties descending).",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}