{
  "openapi": "3.0.1",
  "info": {
    "title": "EPA ECHO Scraper - Compliance, Violations & Enforcement Data",
    "description": "EPA ECHO scraper and API for US environmental compliance and enforcement data. Get facility violations, penalties, inspections, formal actions, per-program compliance, TRI releases, Superfund flags and enforcement cases across all 50 states. For ESG, KYB and due diligence. JSON, CSV, Excel export.",
    "version": "0.1",
    "x-build-id": "BMy46QfrGtwzwsDPo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~epa-echo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-epa-echo-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/scrapers_lat~epa-echo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-epa-echo-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/scrapers_lat~epa-echo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-epa-echo-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": {
          "maxFacilities": {
            "title": "Max Facilities",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of facilities to collect. Optional. A single ECHO query returns at most a few hundred thousand rows, so narrow your filters for focused pulls."
          },
          "withDetails": {
            "title": "Fetch facility detail report",
            "type": "boolean",
            "description": "When enabled, each facility is enriched with its Detailed Facility Report (DFR): a per-program (Clean Air, Clean Water, RCRA, SDWA) compliance breakdown and the list of formal enforcement actions with penalty amounts and dates. Disable for a faster, list-only pull.",
            "default": true
          },
          "state": {
            "title": "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",
              "AS",
              "GU",
              "MP",
              "PR",
              "VI"
            ],
            "type": "string",
            "description": "Two-letter US state or territory code, for example CA, NY, TX, PR. The most reliable primary filter.",
            "default": ""
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "County name, for example ALAMEDA, HARRIS, COOK. Combine with State."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City name, for example BERKELEY, HOUSTON. Combine with State."
          },
          "zipCode": {
            "title": "ZIP Code",
            "type": "string",
            "description": "5-digit US ZIP code, for example 94704."
          },
          "facilityName": {
            "title": "Facility Name",
            "type": "string",
            "description": "Facility name to match, for example CHEVRON, US STEEL. Partial matches are supported."
          },
          "registryId": {
            "title": "FRS Registry ID",
            "type": "string",
            "description": "Look up one exact facility by its EPA FRS Registry ID (the unique 12-digit facility id, for example 110033527805). Ignores the other search filters and returns that single facility with full compliance and enforcement detail."
          },
          "naicsCode": {
            "title": "NAICS Code",
            "type": "string",
            "description": "Industry NAICS code, full or partial prefix, for example 3254 (pharmaceutical) or 324 (petroleum)."
          },
          "sicCode": {
            "title": "SIC Code",
            "type": "string",
            "description": "Industry SIC code, for example 2911 (petroleum refining)."
          },
          "activeOnly": {
            "title": "Active facilities only",
            "type": "boolean",
            "description": "Restrict to facilities currently flagged active in EPA program systems.",
            "default": false
          },
          "majorOnly": {
            "title": "Major facilities only",
            "type": "boolean",
            "description": "Restrict to facilities classified as major under Clean Air or Clean Water programs (larger emitters and dischargers).",
            "default": false
          },
          "program": {
            "title": "Program / statute",
            "enum": [
              "",
              "A",
              "W",
              "R",
              "S",
              "T",
              "G",
              "E"
            ],
            "type": "string",
            "description": "Restrict to facilities regulated under a single EPA program: Clean Air, Clean Water (NPDES), RCRA hazardous waste, Safe Drinking Water, Toxics Release Inventory, Greenhouse Gas or EPCRA.",
            "default": ""
          },
          "epaRegion": {
            "title": "EPA Region",
            "enum": [
              "",
              "01",
              "02",
              "03",
              "04",
              "05",
              "06",
              "07",
              "08",
              "09",
              "10"
            ],
            "type": "string",
            "description": "Restrict to a single EPA Region (01 through 10). Optional; usually only needed for multi-state pulls.",
            "default": ""
          },
          "federalFacilitiesOnly": {
            "title": "Federal facilities only",
            "type": "boolean",
            "description": "Restrict to federally owned or operated facilities (military bases, federal agencies).",
            "default": false
          },
          "tribalLandOnly": {
            "title": "Tribal land only",
            "type": "boolean",
            "description": "Restrict to facilities located in Indian country / tribal land.",
            "default": false
          },
          "latitude": {
            "title": "Latitude (radius search)",
            "type": "string",
            "description": "Center-point latitude for a radius search, for example 29.7604. Provide with Longitude and Radius to find facilities near a point."
          },
          "longitude": {
            "title": "Longitude (radius search)",
            "type": "string",
            "description": "Center-point longitude for a radius search, for example -95.3698."
          },
          "radiusMiles": {
            "title": "Radius (miles)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Search radius in miles around the Latitude/Longitude point, for example 5."
          },
          "onlyWithViolations": {
            "title": "Only facilities with current violations",
            "type": "boolean",
            "description": "Keep only facilities flagged with a current violation in any program (Clean Air, Clean Water, RCRA or SDWA).",
            "default": false
          },
          "onlyWithEnforcement": {
            "title": "Only facilities with formal enforcement actions",
            "type": "boolean",
            "description": "Keep only facilities with at least one formal enforcement action in the last 5 years.",
            "default": false
          },
          "onlySignificantViolators": {
            "title": "Only significant / high-priority violators",
            "type": "boolean",
            "description": "Keep only facilities currently flagged as significant non-compliers or high-priority violators.",
            "default": false
          },
          "minPenaltyUsd": {
            "title": "Minimum total penalties (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only facilities whose total assessed penalties are at least this amount, for example 100000."
          },
          "inspectedSince": {
            "title": "Inspected on or after",
            "type": "string",
            "description": "Keep only facilities whose last inspection was on or after this date (YYYY-MM-DD), for example 2023-01-01."
          },
          "enforcedSince": {
            "title": "Enforced on or after",
            "type": "string",
            "description": "Keep only facilities whose most recent formal enforcement action was on or after this date (YYYY-MM-DD), for example 2022-01-01. Use with the compliance-signal filters to surface recent enforcement."
          },
          "withSummary": {
            "title": "AI compliance summary (paid add-on)",
            "type": "boolean",
            "description": "Optional paid AI add-on, off by default. Adds a plain-language summary of each facility's environmental-compliance profile. Billed only when produced. Requires a paid Apify plan.",
            "default": false
          },
          "withRisk": {
            "title": "AI compliance risk score (paid add-on)",
            "type": "boolean",
            "description": "Optional paid AI add-on, off by default. Rates each facility's regulatory risk (low/medium/high/severe) with a 0-100 score, red flags and rationale. Billed only when produced. Requires a paid Apify plan.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}