{
  "openapi": "3.0.1",
  "info": {
    "title": "Phase I ESA Environmental Database Search — EPA by Address",
    "description": "Environmental database report for any US address: EPA Superfund/NPL, RCRA CORRACTS/TSD/generators, TRI, UST, LUST, Brownfields, NPDES, AIR, TSCA, RMP — scored against ASTM E1527-21 search distances, plus on-site Superfund and institutional-control (AUL) boundary checks. No API key.",
    "version": "1.3",
    "x-build-id": "L5lcZaQMxztJXEizf"
  },
  "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>, \"label\": \"...\", \"state\": \"<2-letter, OPTIONAL>\"}. The \"state\" hint is no longer required with lat/lon — Superfund is now also screened spatially against the EPA FRS SEMS point layers, which need no state. Supplying \"state\" additionally pulls that state's full Envirofacts SEMS roster for wider non-NPL coverage. One dataset row (one billable check) is produced per site hit found within the radius; assets with no hits return a single \"clear\" row. If EVERY asset fails input validation the run FAILS and nothing is billed."
          },
          "radiusMiles": {
            "title": "Screening radius (miles)",
            "minimum": 0.1,
            "maximum": 50,
            "type": "number",
            "description": "Distance from each asset within which EPA-listed sites are counted and reported across all selected programs. Accepts fractional miles (0.1-50) so you can screen at the ASTM E1527-21 standard search distances directly: 1.0 mi (NPL / RCRA CORRACTS), 0.5 mi (SEMS-CERCLIS, RCRA TSD, LUST, Brownfields), 0.25 mi (registered UST, RCRA generators). Default 1 mile covers the widest ASTM distance.",
            "default": 1
          },
          "programs": {
            "title": "Programs / databases to screen (assets mode)",
            "type": "array",
            "description": "Which EPA program databases to include. The six defaults: SUPERFUND (NPL/SEMS), RCRA (hazardous-waste handlers, now classified into CORRACTS / TSD / generator), TRI (Toxics Release Inventory), UST (underground storage tanks), LUST (leaking USTs), BROWNFIELD (ACRES/FRS). Four additional opt-in programs come from the SAME EPA ECHO response at no extra upstream call: NPDES (Clean Water Act discharge permits), AIR (Clean Air Act permitted sources), TSCA (incl. PCB handlers), RMP (Risk Management Plan chemical-accident facilities). Leave EMPTY to screen the original six only — that keeps row counts and cost identical to previous versions. Ignored in inventory mode.",
            "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 (default), drop SEMS records with no latitude/longitude. Coordinate coverage varies sharply by state — measured 2026-07: 3% of Texas SEMS records carry coordinates, 16% California, 48% Colorado, 60% New Jersey, 77% New York, while NPL-track records are ~96-100% geocoded everywhere. 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. Adds ONE extra \"astm_summary\" row after each asset's normal rows, scoring this actor's databases against the ASTM E1527-21 Sec. 8.2.1 standard search distances. The refined table splits RCRA into its three real ASTM line items — CORRACTS 1.0 mi, TSD 0.5 mi, LQG/SQG/VSQG generators 0.25 mi — resolved from EPA ECHO, alongside NPL 1.0 mi, SEMS-CERCLIS 0.5 mi, LUST 0.5 mi, UST 0.25 mi and Brownfields 0.5 mi (TRI has no ASTM search distance and is excluded). Results come as flat CSV-safe columns (astm_npl_flag, astm_rcra_corracts_flag, ...) plus a nested object, with an astm_refined_verdict. Automatically widens the underlying fetch to 1 mile; 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.",
            "default": false
          },
          "includeBoundaries": {
            "title": "Superfund & institutional-control boundary check (assets mode)",
            "type": "boolean",
            "description": "Assets mode only. Runs two extra point-in-polygon queries per asset to answer \"is this property ON a Superfund site?\" (on_superfund_site, superfund_site_name, superfund_epa_url) and \"is it inside a published EPA Superfund institutional-control / activity-and-use-limitation boundary?\" (institutional_control_flag, institutional_control_description). These are true boundary intersections, not distance-to-centroid. Note EPA publishes ~2,114 NPL site polygons but only ~165 IC polygons nationally, so a false IC result means \"not inside a published federal Superfund IC\", NOT \"no AUL exists\". Adds no dataset rows and no billing. Default true.",
            "default": true
          },
          "strictDataCompleteness": {
            "title": "Require every database to answer",
            "type": "boolean",
            "description": "Assets mode only. Reserved for callers that must not accept partial coverage. Regardless of this setting, every row already carries programs_screened / programs_failed / data_complete, and an asset whose databases ALL failed is reported as result_type \"error\" — never as a \"clear\" result. If every database fails for every asset the run FAILS so nothing is billed. Default false.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}