{
  "openapi": "3.0.1",
  "info": {
    "title": "DoD Military Installation & FIRRMA Site Proximity Screener",
    "description": "Screen any US coordinate against DoD MIRTA installation boundaries: on-installation verdict, reporting component, joint-base status, and the published FIRRMA site flag with measured distance for CFIUS Part 802 diligence.",
    "version": "1.0",
    "x-build-id": "waPGcVu0sJsNDQzEn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~dod-mirta-military-installation-siting-screener/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-dod-mirta-military-installation-siting-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~dod-mirta-military-installation-siting-screener/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-dod-mirta-military-installation-siting-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~dod-mirta-military-installation-siting-screener/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-dod-mirta-military-installation-siting-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",
        "required": [
          "assets"
        ],
        "properties": {
          "assets": {
            "title": "Sites to screen",
            "type": "array",
            "description": "One entry per coordinate to screen. Each needs lat and lon in WGS84 decimal degrees, an optional label, and an optional radiusMiles that overrides the run-level radius. Example: [{\"lat\":39.7017,\"lon\":-104.7514,\"label\":\"Aurora CO parcel\",\"radiusMiles\":25}]. Required - a run with no assets fails loudly and bills nothing."
          },
          "radiusMiles": {
            "title": "Search radius (miles)",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "How far from each coordinate to look for DoD installations. Applies to any asset that does not set its own radiusMiles. Defaults to 25 when omitted; maximum 250. Deliberately has no schema default, because an Apify input-schema default is injected server-side into every run and a default on a query predicate silently narrows queries the caller never wrote."
          },
          "firrmaScanMiles": {
            "title": "FIRRMA site scan radius (miles)",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Separate, usually wider radius used only to find sites DoD flags with ISFIRRMASITE, so the CFIUS-adjacent proximity bands can be reported honestly. Defaults to 100 when omitted; maximum 250. Any reported band wider than this radius is null (not checked), never false."
          },
          "includeInstallationDetail": {
            "title": "Include one row per installation",
            "type": "boolean",
            "description": "When true (the default) the run emits an asset_summary row per site plus an installation row for each DoD installation found within the radius. Set false for summary rows only.",
            "default": true
          },
          "activeOnly": {
            "title": "Only detail installations that are not confirmed inactive",
            "type": "boolean",
            "description": "When true, installation detail rows are limited to sites whose published operational status is Active or is not decodable. Sites with an unmapped status code are KEPT, because an undefined code is not evidence a site is inactive. Summary counts are unaffected.",
            "default": false
          },
          "maxInstallationsPerAsset": {
            "title": "Max installation rows per site",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Caps how many installation detail rows are emitted per screened coordinate, nearest first. Defaults to 25 when omitted."
          },
          "maxAssets": {
            "title": "Max sites per run",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Safety cap on how many coordinates a single run will screen. Defaults to 25 when omitted; maximum 100."
          },
          "skipDriftChecks": {
            "title": "Skip live upstream integrity checks",
            "type": "boolean",
            "description": "Diagnostic only. The live drift gate verifies feature counts, the published coded-value vocabularies, a positive canary (Buckley Space Force Base) and a negative control before any billable row is produced. Disabling it removes the protection against a silently changed upstream.",
            "default": false
          },
          "simulateOutage": {
            "title": "Simulate a source outage",
            "enum": [
              "none",
              "boundary",
              "point",
              "firrma",
              "all"
            ],
            "type": "string",
            "description": "Diagnostic seam that forces one or all upstream layers to fail, so the null-versus-false contract and the billing gate can be re-proved on demand instead of only during a real outage. Leave as none for normal use.",
            "default": "none"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}