{
  "openapi": "3.0.1",
  "info": {
    "title": "EPA ECHO Facility Compliance Evidence",
    "description": "Look up an exact EPA FRS ID or bounded facility query and receive EPA-published compliance, inspection, and enforcement evidence with source hashes and reproducible receipts. Environmental safety remains UNKNOWN.",
    "version": "0.1",
    "x-build-id": "eG1bxlqhLK5ReZhDw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/civicdataforge~epa-echo-facility-compliance/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-civicdataforge-epa-echo-facility-compliance",
        "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/civicdataforge~epa-echo-facility-compliance/runs": {
      "post": {
        "operationId": "runs-sync-civicdataforge-epa-echo-facility-compliance",
        "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/civicdataforge~epa-echo-facility-compliance/run-sync": {
      "post": {
        "operationId": "run-sync-civicdataforge-epa-echo-facility-compliance",
        "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": {
          "queries": {
            "title": "Facility portfolio",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "Optional batch of one to ten bounded facility queries. When present, query-level fields override the shared defaults below.",
            "items": {
              "type": "object",
              "properties": {
                "facilityId": {
                  "title": "EPA FRS Registry ID",
                  "type": "string",
                  "description": "Exact 12-digit EPA FRS Registry ID."
                },
                "facilityName": {
                  "title": "Facility name",
                  "type": "string",
                  "description": "Published facility name used for this portfolio query."
                },
                "streetAddress": {
                  "title": "Street address",
                  "type": "string",
                  "description": "Published street address used to narrow this portfolio query."
                },
                "city": {
                  "title": "City",
                  "type": "string",
                  "description": "City used to narrow this portfolio query."
                },
                "state": {
                  "title": "State",
                  "type": "string",
                  "description": "Two-letter state or territory code used to narrow this portfolio query."
                },
                "zip": {
                  "title": "ZIP code",
                  "type": "string",
                  "description": "ZIP or ZIP+4 code used to narrow this portfolio query."
                },
                "nameMatchMode": {
                  "title": "Name matching",
                  "type": "string",
                  "description": "Exact is the responsible default; broader modes may require review.",
                  "enum": [
                    "exact",
                    "contains",
                    "begins"
                  ]
                },
                "maxCandidates": {
                  "title": "Maximum candidates",
                  "type": "integer",
                  "description": "Hard response cap for this portfolio query.",
                  "minimum": 1,
                  "maximum": 10
                },
                "includeProgramDetails": {
                  "title": "Retrieve program details",
                  "type": "boolean",
                  "description": "Retrieve EPA compliance, inspection, and enforcement summaries when one facility resolves."
                },
                "previousRecordFingerprint": {
                  "title": "Previous record fingerprint",
                  "type": "string",
                  "description": "Optional prior material fingerprint for change monitoring."
                },
                "previousDecision": {
                  "title": "Previous decision",
                  "type": "string",
                  "description": "Optional prior bounded decision for change monitoring.",
                  "enum": [
                    "EVIDENCE_FOUND",
                    "NO_PUBLISHED_MATCH",
                    "REVIEW_REQUIRED",
                    "SOURCE_UNAVAILABLE",
                    "SCOPE_INCOMPLETE"
                  ]
                },
                "previousDecisionReceiptHash": {
                  "title": "Previous decision receipt",
                  "type": "string",
                  "description": "Optional prior decision receipt hash bound into change monitoring."
                },
                "reviewDisposition": {
                  "title": "Review disposition",
                  "type": "string",
                  "description": "Caller-supplied human review state; never an autonomous legal or safety verdict.",
                  "enum": [
                    "NOT_REVIEWED",
                    "CLEARED",
                    "CONFIRMED_FOR_FOLLOW_UP",
                    "ESCALATED"
                  ]
                },
                "reviewReference": {
                  "title": "Review reference",
                  "type": "string",
                  "maxLength": 200,
                  "description": "Optional non-sensitive caller case reference."
                }
              }
            }
          },
          "batchReference": {
            "title": "Batch reference",
            "maxLength": 200,
            "type": "string",
            "description": "Optional non-sensitive caller reference bound into the batch receipt."
          },
          "facilityId": {
            "title": "EPA FRS Registry ID",
            "pattern": "^[0-9]{12}$",
            "type": "string",
            "description": "Exact 12-digit Facility Registry Service ID, for example 110000367567."
          },
          "facilityName": {
            "title": "Facility name",
            "minLength": 3,
            "maxLength": 200,
            "type": "string",
            "description": "Published facility name. Add location fields to reduce ambiguity."
          },
          "nameMatchMode": {
            "title": "Name matching",
            "enum": [
              "exact",
              "contains",
              "begins"
            ],
            "type": "string",
            "description": "Exact is the responsible default. Contains is discovery-only and may require review.",
            "default": "exact"
          },
          "streetAddress": {
            "title": "Street address",
            "minLength": 5,
            "maxLength": 200,
            "type": "string",
            "description": "Full or partial published street address. Address-only searches also require city, state, or ZIP."
          },
          "city": {
            "title": "City",
            "maxLength": 100,
            "type": "string",
            "description": "Single city used to narrow the selected EPA query."
          },
          "state": {
            "title": "State",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter USPS state or territory code."
          },
          "zip": {
            "title": "ZIP code",
            "pattern": "^[0-9]{5}(-[0-9]{4})?$",
            "type": "string",
            "description": "Five-digit or ZIP+4 code used to narrow the selected EPA query."
          },
          "maxCandidates": {
            "title": "Maximum candidates",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Hard response cap. Queries with more matches return SCOPE_INCOMPLETE instead of implying a complete result.",
            "default": 5
          },
          "includeProgramDetails": {
            "title": "Retrieve program details",
            "type": "boolean",
            "description": "For one resolved facility, retrieve EPA DFR compliance, inspection, and enforcement summaries.",
            "default": true
          },
          "previousRecordFingerprint": {
            "title": "Previous record fingerprint",
            "type": "string",
            "description": "Optional prior material-record SHA-256 used for single-facility change classification."
          },
          "previousDecision": {
            "title": "Previous decision",
            "enum": [
              "EVIDENCE_FOUND",
              "NO_PUBLISHED_MATCH",
              "REVIEW_REQUIRED",
              "SOURCE_UNAVAILABLE",
              "SCOPE_INCOMPLETE"
            ],
            "type": "string",
            "description": "Optional prior bounded decision used only for change classification."
          },
          "previousDecisionReceiptHash": {
            "title": "Previous decision receipt",
            "type": "string",
            "description": "Optional prior decision receipt hash bound into change monitoring."
          },
          "reviewDisposition": {
            "title": "Caller review disposition",
            "enum": [
              "NOT_REVIEWED",
              "CLEARED",
              "CONFIRMED_FOR_FOLLOW_UP",
              "ESCALATED"
            ],
            "type": "string",
            "description": "Caller-asserted workflow state. It never changes the EPA evidence decision.",
            "default": "NOT_REVIEWED"
          },
          "reviewReference": {
            "title": "Review reference",
            "maxLength": 200,
            "type": "string",
            "description": "Optional non-sensitive case reference. Do not submit confidential notes or personal data."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}