{
  "openapi": "3.0.1",
  "info": {
    "title": "EPA Contaminated Site Screener — Superfund/NPL Proximity Check",
    "description": "Multi-database Phase I ESA regulatory-records screen. Screen a US address or coordinate for nearby EPA sites across Superfund/NPL, RCRA, TRI, UST, LUST, Brownfields, plus optional ASTM E1527-21 search-distance verdicts. Keyless EPA Envirofacts + ECHO + ArcGIS + Census geocoder.",
    "version": "1.0",
    "x-build-id": "4maG5FC1xkwzJc0Le"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~epa-contaminated-site-screener/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-epa-contaminated-site-screener",
        "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/malonestar~epa-contaminated-site-screener/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-epa-contaminated-site-screener",
        "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/malonestar~epa-contaminated-site-screener/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-epa-contaminated-site-screener",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "assets",
              "inventory"
            ],
            "type": "string",
            "description": "\"assets\" (default) runs a multi-database Phase I ESA-style regulatory-records screen on your addresses/coordinates — one billable row per nearby EPA-listed site (across Superfund, RCRA, TRI, UST, LUST and Brownfields). \"inventory\" instead dumps the raw list of EPA SEMS/Superfund sites for the states you pick — one billable row per site.",
            "default": "assets"
          },
          "assets": {
            "title": "Assets to screen (assets mode)",
            "type": "array",
            "description": "Locations to screen against EPA contaminated-site databases. Each item is EITHER {\"address\": \"...\", \"label\": \"...\"} (geocoded via the free Census geocoder) OR {\"lat\": <number>, \"lon\": <number>, \"state\": \"<2-letter, required with lat/lon>\", \"label\": \"...\"}. One dataset row (one billable check) is produced per site hit found within the radius; assets with no hits still return a single \"clear\" row. Bad input (unreadable address, missing state, out-of-range coordinates) yields an \"error\" row instead of failing the run."
          },
          "radiusMiles": {
            "title": "Screening radius (miles)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Distance from each asset within which EPA-listed sites are counted and reported across all selected programs. Default 1 mile follows the ASTM E1527 Phase I ESA approximate minimum search-distance convention for NPL/Superfund sites (nearer thresholds apply to RCRA/UST/LUST in a full report). Console accepts 1-50 whole miles; fractional radii down to 0.1 are accepted via the API.",
            "default": 1
          },
          "programs": {
            "title": "Programs / databases to screen (assets mode)",
            "type": "array",
            "description": "Which EPA program databases to include. Any of: SUPERFUND (NPL/SEMS), RCRA (hazardous-waste handlers/corrective action), TRI (Toxic Release Inventory), UST (underground storage tanks), LUST (leaking USTs), BROWNFIELD (ACRES/FRS). Leave empty to screen ALL six. Ignored in inventory mode (which is SEMS/Superfund only).",
            "items": {
              "type": "string"
            }
          },
          "maxHitsPerProgram": {
            "title": "Max hits per program per asset",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Assets mode only: cap on the number of nearest site hits reported per program per asset (keeps output and billing bounded near dense industrial areas). The nearest sites are kept. Default 50. Range 1-1000.",
            "default": 50
          },
          "states": {
            "title": "States (inventory mode)",
            "type": "array",
            "description": "2-letter US state codes (e.g. [\"CO\", \"NJ\"]) whose EPA SEMS/Superfund site records to list. Required when Mode = inventory. Ignored in assets mode (state is derived automatically per-asset).",
            "items": {
              "type": "string"
            }
          },
          "onlyNpl": {
            "title": "Only NPL/Superfund sites (inventory mode)",
            "type": "boolean",
            "description": "Inventory mode only: when true, keep only sites currently on (or part of) the National Priorities List — the actual Superfund program sites. When false, include all SEMS site statuses. Default false.",
            "default": false
          },
          "onlyWithCoords": {
            "title": "Only sites with coordinates (inventory mode)",
            "type": "boolean",
            "description": "Inventory mode only: when true (recommended, default), drop SEMS records with no latitude/longitude — roughly 85-90% of records nationwide, mostly old archived/NFRAP sites never geocoded. Set false to see the full raw roster including un-mappable rows.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Safety cap on total dataset rows produced across the run: max site hits emitted (assets mode) or max SEMS site rows (inventory mode).",
            "default": 1000
          },
          "astmMode": {
            "title": "ASTM E1527-21 search-distance summary (assets mode)",
            "type": "boolean",
            "description": "Assets mode only. When true, adds ONE extra 'astm_summary' row after each asset's normal listing/clear rows, applying the ASTM E1527-21 standard search distances (NPL 1.0 mi, delisted-NPL/SEMS-CERCLIS 0.5 mi, RCRA 1.0 mi, LUST 0.5 mi, UST 0.25 mi, Brownfields 0.5 mi — TRI has no ASTM search distance and is excluded) per selected program, with a nearest-distance and REC-potential verdict. Automatically widens the underlying data fetch to 1 mile so the summary sees hits beyond a smaller radiusMiles; your normal per-hit rows still respect radiusMiles unchanged. Screening aid only — not a substitute for an ASTM E1527-21 Phase I ESA. Default false (no summary rows, output unchanged).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}