{
  "openapi": "3.0.1",
  "info": {
    "title": "EPA Enforcement Cases & Penalties Monitor (ECHO)",
    "description": "EPA enforcement cases and penalties from the official EPA ECHO database: case name, law (CAA, CWA, RCRA), federal and state penalties, settlement dates, facility address, NAICS, defendants. New-cases-only monitor mode. No API key.",
    "version": "0.1",
    "x-build-id": "3rUE1O8wK2trucPjC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/quarrylane-data~epa-enforcement-case-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-quarrylane-data-epa-enforcement-case-leads",
        "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/quarrylane-data~epa-enforcement-case-leads/runs": {
      "post": {
        "operationId": "runs-sync-quarrylane-data-epa-enforcement-case-leads",
        "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/quarrylane-data~epa-enforcement-case-leads/run-sync": {
      "post": {
        "operationId": "run-sync-quarrylane-data-epa-enforcement-case-leads",
        "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": {
          "daysBack": {
            "title": "Date window (days back)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Used when startDate is empty. Cases with any milestone (filed, settled, lodged or closed) in the last N days. Default 30.",
            "default": 30
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "First case date to include, as YYYY-MM-DD (inclusive). When set, it overrides \"Days back\"."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Last case date to include, as YYYY-MM-DD (inclusive). Defaults to today."
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two-letter case location states, e.g. TX, LA, CA. Empty = all states.",
            "items": {
              "type": "string"
            }
          },
          "laws": {
            "title": "Environmental laws / programs",
            "type": "array",
            "description": "Only return cases under these environmental laws, e.g. Clean Air Act or Clean Water Act. Leave empty for all statutes.",
            "items": {
              "type": "string",
              "enum": [
                "CAA",
                "CWA",
                "RCRA",
                "SDWA",
                "EPCRA",
                "FIFRA",
                "TSCA",
                "CERCLA"
              ],
              "enumTitles": [
                "Clean Air Act (CAA)",
                "Clean Water Act (CWA)",
                "RCRA hazardous waste",
                "Safe Drinking Water Act",
                "EPCRA",
                "FIFRA pesticides",
                "TSCA chemicals",
                "CERCLA / Superfund"
              ]
            }
          },
          "caseCategories": {
            "title": "Case type",
            "type": "array",
            "description": "Formal administrative orders and/or judicial (DOJ) cases. Default both.",
            "items": {
              "type": "string",
              "enum": [
                "AFR",
                "JDC"
              ],
              "enumTitles": [
                "Administrative - formal",
                "Judicial"
              ]
            }
          },
          "caseLead": {
            "title": "Case lead",
            "enum": [
              "ANY",
              "EPA",
              "STATE"
            ],
            "type": "string",
            "description": "Whether to return cases led by EPA, by a state agency, or both.",
            "default": "ANY"
          },
          "naicsPrefix": {
            "title": "NAICS prefix",
            "type": "string",
            "description": "2 to 6 digits, e.g. 324 (petroleum), 3251 (chemicals), 2211 (utilities)."
          },
          "onlyWithFederalPenalty": {
            "title": "Only cases with a federal penalty",
            "type": "boolean",
            "description": "Keep cases where a federal penalty was assessed. Turn off to include orders without a penalty.",
            "default": true
          },
          "minFederalPenalty": {
            "title": "Minimum total federal penalty (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional, e.g. 50000 for six-figure-ish cases."
          },
          "includeCaseDetails": {
            "title": "Include facility, defendants and milestones",
            "type": "boolean",
            "description": "Loads the ECHO case report for each delivered case: facility address, FRS ID, defendants, law sections and milestones. Included in the per-record price.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new cases since last run (monitor mode)",
            "type": "boolean",
            "description": "Later runs return only case numbers not seen before under this monitor key. The first run bills up to maxItems as case-record events and seeds the rest without charging. Later runs bill new-case events.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Label for this saved monitor (plain text, not a password or API key). When \"Only new\" monitor mode is on, the Actor remembers which records it has already delivered under this name and returns only new ones next time. Use a different name per filter set or client, for example \"client-a-weekly\". Older inputs that use monitorKey still work.",
            "default": "default"
          },
          "maxItems": {
            "title": "Maximum cases",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Default 15 (fast, auto-test safe). Free Apify plans are capped at 15. Paid plans up to 10,000.",
            "default": 15
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}