# DoD Military Installation & FIRRMA Site Proximity Screener (`malonestar/dod-mirta-military-installation-siting-screener`) Actor

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.

- **URL**: https://apify.com/malonestar/dod-mirta-military-installation-siting-screener.md
- **Developed by:** [Kyle Maloney](https://apify.com/malonestar) (community)
- **Categories:** Real estate, Developer tools, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.50 / 1,000 screened sites

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## DoD Military Installation & FIRRMA Site Proximity Screener

Screen any US coordinate against the Department of Defense **Military Installations, Ranges
and Training Areas (MIRTA)** dataset and get back a defensible answer to four questions:

1. **Is this site on a DoD installation?** — point-in-polygon against the published
   installation **boundary** layer, not a proximity guess off a point.
2. **Which component operates it?** — reporting component (Army, Navy, Air Force, the Guard
   and Reserve components, Coast Guard, WHS) plus a military-department roll-up.
3. **Is it a joint base, and is it still active?** — the published `ISJOINTBASE` and
   `SITEOPERATIONALSTATUS` flags, case-normalised and decoded against DoD's own domains.
4. **Is it a FIRRMA-listed site, and how far away?** — the published `ISFIRRMASITE` flag and
   a **measured** distance, which is the input to a CFIUS 31 CFR Part 802 analysis.

Keyless. No API key, no signup, no scraping — this reads DoD's own public ArcGIS service.

***

### Who it is for

- **Site selectors and industrial developers** confirming a parcel is not inside, or is
  uncomfortably close to, an operating installation or range before optioning land.
- **Data-centre, solar, wind and BESS developers** who need installation proximity in the
  same pass as grid, airspace and environmental screening.
- **Commercial real-estate diligence teams** producing a defensible proximity exhibit.
- **Foreign-investment / CFIUS counsel and compliance teams** who need the DoD-published
  FIRRMA site flag and a measured distance as the factual basis for a Part 802 analysis.
- **AI agents** doing site diligence — every field carries a description, and the null
  contract below means an agent is never handed a negative that was never verified.

***

### The FIRRMA / CFIUS scope of use — read this

`ISFIRRMASITE` is **the Department of Defense's own published indicator** that a site appears
on the military-installation list used by the CFIUS real-estate regulations at
**31 CFR Part 802**.

**This actor reports that published flag and the measured distance from your coordinate to
the site. It does not make a jurisdictional determination.** It does not decide whether a
transaction is a "covered real estate transaction", which Part 802 appendix column or
distance band applies to a particular site, or whether a CFIUS filing is required or
advisable. Those turn on the specific site listing, the property interest conveyed and the
parties involved.

**Distances are measurements, not determinations. Consult counsel.**

The same notice ships on every row in the `firrma_notice` field, so it travels with the data
into a spreadsheet, a pipeline or an agent's context.

***

### The null contract — why `false` here is trustworthy

Every boolean in this actor is **tri-state**:

- `true` — checked, and affirmative.
- `false` — **checked**, and negative.
- `null` — **not checked**. A source was unavailable, a code was undefined, or the question
  was outside what was actually queried.

The two are never collapsed. Concretely:

- If the boundary layer is unavailable, `on_dod_installation` is **`null`**, never `false`.
  A billable row reading "not on a military installation" produced by a dead layer is the
  expensive kind of wrong answer, and this actor will not emit one.
- If the FIRRMA scan fails, every FIRRMA field and every distance band is `null`, not `false`.
- If you scan 25 miles, `firrma_site_within_100_miles` is `null` — that band was never
  checked — not `false`.
- If DoD publishes an operational-status code its own domain does not define, then
  `is_active_installation` is `null` with `active_status_basis: "unmapped_status_code"`.
  An undefined code is not evidence a site is inactive. **This is live right now**: four
  ammunition plants ship a status of `EXCS` / `Excs` / `excs`, a code absent from the
  published `SiteOperationalStatusCode` domain on both layers.
- If **every** source fails, the run **FAILS** with an explanatory message, emits zero rows
  and bills nothing.

***

### Boundaries, not points — and why that matters

MIRTA publishes **two** layers, and they are **not the same set**:

| Layer | Features | What it is |
|---|---|---|
| `DoD Sites - Boundary` | **825** polygons | The installation footprint. Authoritative for "am I on a base?" |
| `DoD Sites - Point` | **737** points | A single published location per site. |

A screener built on the point layer alone is not a screener. Measured live: a **25-mile query
around downtown Denver returns 2 installation points but 3 installation boundaries.** The
missing one is **Elmer E Fryar USARC**, which exists in the boundary layer and not in the
point layer. Every result row publishes `boundary_only_installations_count` so you can see
that gap for your own site.

There is also **no id join between the layers.** The documented key field
`MIRTALOCATIONSIDPK` is the single string `" "` on **737 of 737 points and 825 of 825
boundaries** — 100% empty on both. A **name** join was tested and rejected: three
installation points sit inside a differently-named boundary (Eglin AF Auxiliary Field 3 Duke
Fld inside Eglin Air Force Base; Maxwell-Gunter AFB inside Maxwell-Gunter Air Force Base; JBC
North Yard inside Joint Base Charleston), so a name key would declare three mapped
boundaries unmapped. This actor reconciles the layers **geometrically** instead.

**The unmapped case.** Measured across all 737 installation points, **12 (1.6%)** fall inside
no published boundary — their footprint is simply not published. If one of those sits within
your search radius, a clean point-in-polygon miss **cannot** rule out that your coordinate is
on that installation, so `on_dod_installation` returns `null` with
`on_dod_installation_basis: "nearby_installation_boundary_unmapped"` rather than a false
clear. `unmapped_boundary_installations_count` tells you how many.

**Distances are edge distances.** When an installation has a published boundary, the distance
is the shortest distance from your coordinate to the **boundary polygon** (zero if you are
inside it), reported as `distance_basis: "boundary_edge"`. Only when no boundary exists does
the actor fall back to the single published site point, and it says so
(`distance_basis: "published_site_point"`). A centroid proxy overstated distance by 3.0x in a
sibling actor in this portfolio — enough to flip a verdict — so it is not used here.

***

### Example input

```json
{
  "assets": [
    { "lat": 39.7017, "lon": -104.7514, "label": "Aurora CO parcel", "radiusMiles": 25 },
    { "lat": 36.8508, "lon": -76.2859, "label": "Norfolk VA waterfront site", "radiusMiles": 15 },
    { "lat": 41.5,    "lon": -100.0,   "label": "Rural Nebraska control", "radiusMiles": 25 }
  ],
  "radiusMiles": 25,
  "firrmaScanMiles": 100,
  "includeInstallationDetail": true
}
```

The first coordinate sits **inside Buckley Space Force Base**, which is a FIRRMA-flagged
site; the last is a verified-clear control. Running the prefill returns both answers, so you
can see what a hit and a genuine clear each look like.

#### Input fields

| Field | Type | Notes |
|---|---|---|
| `assets` | array | **Required.** `{ lat, lon, label?, radiusMiles? }` in WGS84 decimal degrees. A run with no assets fails before billing. |
| `radiusMiles` | integer | Search radius for assets that do not set their own. Defaults to **25**, max 250. |
| `firrmaScanMiles` | integer | Separate, wider radius used only for the FIRRMA site scan. Defaults to **100**, max 250. |
| `includeInstallationDetail` | boolean | Emit one `installation` row per installation found. Default `true`. |
| `activeOnly` | boolean | Limit detail rows to sites not confirmed inactive. Sites with an **undefined** status code are kept. Default `false`. |
| `maxInstallationsPerAsset` | integer | Cap on detail rows per coordinate, nearest first. Defaults to 25. |
| `maxAssets` | integer | Cap on coordinates per run. Defaults to 25, max 100. |
| `skipDriftChecks` | boolean | Diagnostic. Disables the live upstream integrity gate. Default `false`. |
| `simulateOutage` | string | Diagnostic seam: `none`, `boundary`, `point`, `firrma`, `all`. Default `none`. |

Note that `radiusMiles`, `firrmaScanMiles`, `maxAssets` and `maxInstallationsPerAsset`
deliberately carry **no schema default** — 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. Defaults are applied in code and documented above.

***

### Output

Two record types share one flat key space, so a CSV export is a single table.

- **`asset_summary`** — one row per coordinate you screened: the verdict, the containing
  installation, counts within the radius, the nearest installation, and the full FIRRMA
  proximity block.
- **`installation`** — one row per DoD installation found within the radius, nearest first.

#### Fields on every row

| Field | Type | Description |
|---|---|---|
| `record_type` | string | asset\_summary (one per screened coordinate) or installation (one per DoD installation found). |
| `asset_index` | number | 1-based position of this coordinate in the assets input array. |
| `asset_label` | string | The label you supplied for this coordinate, or a generated one. |
| `query_latitude` | number | Latitude screened, WGS84 decimal degrees, echoed back exactly as supplied. |
| `query_longitude` | number | Longitude screened, WGS84 decimal degrees, echoed back exactly as supplied. |
| `search_radius_miles` | number | Radius applied to this coordinate when looking for installations. |
| `data_source` | string | The upstream dataset this row was derived from. |
| `service_url` | string | The exact ArcGIS FeatureServer queried, so a result can be reproduced. |
| `checked_at` | string | UTC timestamp when this run queried the service. |
| `error` | string | Per-source failure detail, or null when everything answered. |
| `firrma_notice` | string | The scope-of-use notice shipped on every row carrying a FIRRMA field. This actor reports the DoD published flag and a measured distance; it does not determine CFIUS jurisdiction or filing obligations. |

#### `asset_summary` rows

| Field | Type | Description |
|---|---|---|
| `boundary_layer_status` | string | ok or unavailable. The DoD Sites - Boundary layer is authoritative for whether a coordinate is ON an installation; when it is unavailable, on\_dod\_installation is null and never false. |
| `point_layer_status` | string | ok or unavailable for the DoD Sites - Point layer. |
| `firrma_scan_status` | string | ok or unavailable for the separate FIRRMA-flagged site proximity scan. When unavailable, every FIRRMA field on this row is null rather than false. |
| `sources_answered` | number | How many of the three upstream reads (boundary, point, FIRRMA scan) succeeded. |
| `sources_total` | number | Total upstream reads attempted per coordinate. |
| `screening_complete` | boolean | True only when all three upstream reads succeeded. |
| `screening_result` | string | on\_installation, installation\_within\_radius, no\_installation\_within\_radius, inconclusive\_unmapped\_boundary, source\_unavailable or input\_error. Can never read no\_installation\_within\_radius while a core layer is unavailable. |
| `on_dod_installation` | boolean | True when the coordinate falls inside a published DoD installation boundary. False only when the boundary layer answered AND no nearby installation has an unmapped footprint. Null means not determined - see on\_dod\_installation\_basis. |
| `on_dod_installation_basis` | boolean | Why the on\_dod\_installation value is what it is: inside\_published\_boundary, outside\_all\_published\_boundaries, nearby\_installation\_boundary\_unmapped, boundary\_layer\_unavailable, point\_layer\_unavailable\_unmapped\_boundaries\_not\_excluded or not\_screened. |
| `containing_installation_name` | string | Site name of the installation whose published boundary contains the coordinate. |
| `containing_installation_feature_name` | string | FEATURENAME of the containing installation, which can differ from SITENAME. |
| `containing_installation_state` | string | Two-letter state or territory code, upper-cased (the source publishes mixed case). |
| `containing_installation_reporting_component` | string | Decoded DoD reporting component. This is the REPORTING component, not necessarily the operating service. |
| `containing_installation_reporting_component_code` | string | Raw SITEREPORTINGCOMPONENT code, lower-cased. |
| `containing_installation_military_department` | string | Military department roll-up of the reporting component. |
| `containing_installation_operational_status` | string | Decoded operational status, or null when the source published a code its own domain does not define. |
| `containing_installation_operational_status_code` | string | Raw SITEOPERATIONALSTATUS code, lower-cased. |
| `containing_installation_is_active` | boolean | True/false from the published status, or null when the status code is not in the published domain. |
| `containing_installation_is_firrma_site` | boolean | The DoD published ISFIRRMASITE flag for the containing installation. Reported, never interpreted. |
| `containing_installation_is_joint_base` | boolean | The DoD published ISJOINTBASE flag for the containing installation. |
| `containing_installation_count` | number | How many published boundaries contain the coordinate. Null when the boundary layer did not answer. |
| `installations_within_radius_count` | number | Distinct DoD installations within the radius, after reconciling the boundary and point layers. Null when a core layer did not answer. |
| `active_installations_within_radius_count` | number | Of those, how many publish an Active operational status. |
| `firrma_sites_within_radius_count` | number | Of those, how many carry ISFIRRMASITE=yes. |
| `joint_bases_within_radius_count` | number | Of those, how many carry ISJOINTBASE=yes. |
| `boundaries_within_radius_count` | number | Raw count from the DoD Sites - Boundary layer before reconciliation. |
| `points_within_radius_count` | number | Raw count from the DoD Sites - Point layer before reconciliation. |
| `boundary_only_installations_count` | number | Installations found ONLY as a boundary, with no installation point inside the radius. This is the measured cost of point-only screening: a 25-mile Denver query returns 2 points but 3 boundaries. |
| `unmapped_boundary_installations_count` | number | Installation points within the radius whose own coordinate falls inside no published boundary, so their footprint is unknown. Any non-zero value forces on\_dod\_installation to null rather than false. |
| `nearest_unmapped_boundary_installation_name` | string | Name of the closest installation whose footprint is not published. |
| `nearest_unmapped_boundary_installation_distance_miles` | number | Distance to that installation's published point. |
| `nearest_installation_name` | string | Site name of the closest DoD installation within the radius. |
| `nearest_installation_distance_miles` | number | Distance to the nearest installation. Zero when the coordinate is inside its boundary. |
| `nearest_installation_distance_basis` | string | How that distance was measured: boundary\_edge (shortest distance to the published boundary), inside\_published\_boundary (zero), or published\_site\_point (straight-line to the single published site point, used when no boundary is published). |
| `nearest_installation_state` | string | Two-letter state or territory code, upper-cased. |
| `nearest_installation_reporting_component` | string | Decoded DoD reporting component of the nearest installation. |
| `nearest_installation_military_department` | string | Military department roll-up for the nearest installation. |
| `nearest_installation_operational_status` | string | Decoded operational status of the nearest installation. |
| `nearest_installation_is_active` | string | Tri-state active flag for the nearest installation. |
| `nearest_installation_is_firrma_site` | string | Published ISFIRRMASITE flag for the nearest installation. |
| `nearest_installation_is_joint_base` | string | Published ISJOINTBASE flag for the nearest installation. |
| `nearest_active_installation_name` | string | Nearest installation that publishes an Active status, which can differ from the nearest installation overall. |
| `nearest_active_installation_distance_miles` | number | Distance to that installation. |
| `firrma_scan_radius_miles` | number | Radius actually used for the FIRRMA-flagged site scan. |
| `firrma_sites_within_scan_count` | number | How many ISFIRRMASITE=yes sites lie within the FIRRMA scan radius. Null when the scan did not answer. |
| `nearest_firrma_site_name` | string | Site name of the closest DoD-flagged FIRRMA site. |
| `nearest_firrma_site_distance_miles` | number | Measured distance to the closest FIRRMA-flagged site. A measurement, not a jurisdictional determination. |
| `nearest_firrma_site_distance_basis` | string | boundary\_edge, inside\_published\_boundary or published\_site\_point. |
| `nearest_firrma_site_state` | string | Two-letter state or territory code, upper-cased. |
| `nearest_firrma_site_reporting_component` | string | Decoded reporting component of the nearest FIRRMA site. |
| `nearest_firrma_site_military_department` | string | Military department roll-up for the nearest FIRRMA site. |
| `nearest_firrma_site_operational_status` | string | Decoded operational status of the nearest FIRRMA site. |
| `nearest_firrma_site_is_active` | string | Tri-state active flag for the nearest FIRRMA site. |
| `on_firrma_site` | boolean | True when the coordinate falls inside the published boundary of a site DoD flags with ISFIRRMASITE. Null when the boundary layer did not answer. |
| `results_truncated` | boolean | True if installation detail rows were capped by maxInstallationsPerAsset. |

#### FIRRMA proximity bands (on `asset_summary` rows)

Each band is a **measurement**, tri-state, and `null` whenever the band is wider than
the `firrmaScanMiles` actually scanned or the scan did not answer.

| Field | Type | Description |
|---|---|---|
| `firrma_site_within_1_miles` | number | MEASUREMENT: true when a DoD-flagged FIRRMA site lies within 1 miles of the screened coordinate. Null when the FIRRMA scan did not answer, or when 1 miles is wider than the firrmaScanMiles actually scanned - a band that was never checked is null, never false. This is a distance measurement, not a determination that CFIUS jurisdiction attaches. |
| `firrma_site_within_10_miles` | number | MEASUREMENT: true when a DoD-flagged FIRRMA site lies within 10 miles of the screened coordinate. Null when the FIRRMA scan did not answer, or when 10 miles is wider than the firrmaScanMiles actually scanned - a band that was never checked is null, never false. This is a distance measurement, not a determination that CFIUS jurisdiction attaches. |
| `firrma_site_within_25_miles` | number | MEASUREMENT: true when a DoD-flagged FIRRMA site lies within 25 miles of the screened coordinate. Null when the FIRRMA scan did not answer, or when 25 miles is wider than the firrmaScanMiles actually scanned - a band that was never checked is null, never false. This is a distance measurement, not a determination that CFIUS jurisdiction attaches. |
| `firrma_site_within_50_miles` | number | MEASUREMENT: true when a DoD-flagged FIRRMA site lies within 50 miles of the screened coordinate. Null when the FIRRMA scan did not answer, or when 50 miles is wider than the firrmaScanMiles actually scanned - a band that was never checked is null, never false. This is a distance measurement, not a determination that CFIUS jurisdiction attaches. |
| `firrma_site_within_99_miles` | number | MEASUREMENT: true when a DoD-flagged FIRRMA site lies within 99 miles of the screened coordinate. Null when the FIRRMA scan did not answer, or when 99 miles is wider than the firrmaScanMiles actually scanned - a band that was never checked is null, never false. This is a distance measurement, not a determination that CFIUS jurisdiction attaches. |
| `firrma_site_within_100_miles` | number | MEASUREMENT: true when a DoD-flagged FIRRMA site lies within 100 miles of the screened coordinate. Null when the FIRRMA scan did not answer, or when 100 miles is wider than the firrmaScanMiles actually scanned - a band that was never checked is null, never false. This is a distance measurement, not a determination that CFIUS jurisdiction attaches. |

#### `installation` rows

| Field | Type | Description |
|---|---|---|
| `installation_rank` | number | 1 = nearest to the screened coordinate. |
| `installation_name` | string | SITENAME as published by DoD. |
| `installation_feature_name` | string | FEATURENAME as published, which can differ from SITENAME. |
| `installation_object_id` | number | ArcGIS OBJECTID on its source layer. Not a stable DoD identifier - the documented key field MIRTALOCATIONSIDPK is empty on every row of both layers. |
| `installation_state` | string | Two-letter state or territory code, upper-cased. |
| `installation_country_code` | number | COUNTRYNAME code. MIRTA publishes only US locations; every row measured reads usa. |
| `reporting_component` | string | Decoded DoD reporting component. This is the component that REPORTS the site, not necessarily the operating service: Buckley Space Force Base reports as US Air Force, and the Space Force code is used by no row in either layer. |
| `reporting_component_code` | string | Raw SITEREPORTINGCOMPONENT code, lower-cased. |
| `reporting_component_is_mapped` | boolean | False when DoD published a component code its own domain does not define, in which case reporting\_component is null rather than a guess. |
| `military_department` | string | Army, Navy, Air Force, Homeland Security or Office of the Secretary of Defense, rolled up from the reporting component. Null when the component does not map to a department. |
| `operational_status` | string | Decoded SITEOPERATIONALSTATUS. Null when DoD published a code absent from its own domain - live examples are EXCS / Excs / excs on four ammunition plants. |
| `operational_status_code` | string | Raw status code, lower-cased. The source ships mixed case for the same code across and within layers. |
| `operational_status_is_mapped` | boolean | False when the published code is not in the layer's own coded-value domain. |
| `is_active_installation` | boolean | True when the published status decodes to Active, false when it decodes to another defined status, and NULL when the code is not in the published domain. An undefined code is not evidence a site is inactive. |
| `active_status_basis` | string | published\_status\_code, unmapped\_status\_code or status\_absent. |
| `is_firrma_site` | boolean | The DoD published ISFIRRMASITE flag: true, false, or null when the flag is absent or reads To Be Determined. Reported, never interpreted - see firrma\_notice. |
| `firrma_flag_code` | string | Raw ISFIRRMASITE value, lower-cased. Preserved because the source ships this yes/no domain in mixed case on the sibling ISJOINTBASE field. |
| `is_joint_base` | boolean | The DoD published ISJOINTBASE flag, case-normalised. A strict equality test on the raw value undercounts joint bases, because the source ships both yes and Yes. |
| `is_cui_controlled` | boolean | The DoD published ISCUI flag (Controlled Unclassified Information indicator). |
| `distance_miles` | number | Distance from the screened coordinate to this installation. Zero when the coordinate is inside the published boundary. |
| `distance_basis` | string | boundary\_edge (shortest distance to the published boundary polygon), inside\_published\_boundary (zero), or published\_site\_point (straight-line to the single published site point, used only when no boundary is published for this installation). |
| `contains_query_point` | boolean | True when this installation's published boundary contains the screened coordinate. Null when this installation has no published boundary. |
| `has_published_boundary` | boolean | True when this installation has a boundary polygon in the MIRTA boundary layer. False means only a point is published, so its footprint is unknown - measured at 12 of 737 installations (1.6%). |
| `geometry_source` | string | boundary or point - which MIRTA layer this row was built from. |
| `installation_latitude` | number | Latitude of the published installation point, when one exists. Boundary-only installations have no point. |
| `installation_longitude` | number | Longitude of the published installation point, when one exists. |
| `boundary_area_sq_degrees` | number | Shape\_\_Area as published. Degrees, not acres - MIRTA publishes geometry in WGS84 and does not publish an area in ground units. |
| `boundary_perimeter_degrees` | number | Shape\_\_Length as published, in decimal degrees. |
| `mirta_location_id` | string | MIRTALOCATIONSIDPK, the documented Primary Key Identifier. Measured empty (a single space) on 737 of 737 points AND 825 of 825 boundaries, so there is no id join between the layers. Fetched and emitted so a future re-population is visible rather than silently discarded. |
| `media_id` | string | MEDIAID as published. Measured as the literal string na on every row of both layers, normalised to null. |
| `feature_description` | string | FEATUREDESCRIPTION as published. Measured as the literal string na on every point row, normalised to null. |
| `sds_guid` | string | SDSID globally unique identifier. Populated on 5 of 737 points and 623 of 825 boundaries. |

***

### Reliability: what this actor refuses to do

Before a single billable row is produced, every run asserts against the **live** service:

- **Feature-count bands** on both layers and on the FIRRMA-flagged subset of each.
- **A positive canary** — a coordinate verified to sit inside **Buckley Space Force Base**
  must resolve to exactly one containing boundary, named Buckley Space Force Base, flagged
  `ISFIRRMASITE=yes`, status `act`, reporting component `usaf`. If the FIRRMA flag this
  product is sold on ever changes meaning, the run fails rather than quietly re-labelling
  every site in the country.
- **A negative control** — a rural Nebraska coordinate must be contained by **zero**
  boundaries. If the spatial filter stops being applied, this catches it; without it, a
  broken filter returns a confident hit everywhere.
- **A point-versus-boundary probe** — the Denver window must still return more boundaries
  than points.
- **Closed vocabularies** — any `ISFIRRMASITE` or `ISJOINTBASE` value outside DoD's own
  `yes/no/tbd` domain fails the run, because an unrecognised spelling would otherwise decode
  to `null` and read to a buyer as "not listed".
- **Truncation** — every read asks the service for its own exact count first, then pages by
  keyset on `OBJECTID` until it has that many. A short read is a hard error, never a silent
  subset.
- **Projection** — responses are rejected if the service answers in anything but WGS84, and
  Web Mercator is caught by coordinate **magnitude** rather than by distance from the query
  point.

If any of these fails, the run **FAILS**, emits **zero rows** and bills **nothing** — the
billing gate runs before the only `pushData`, not after it.

You can prove all of this yourself: set `simulateOutage` to `boundary`, `point`, `firrma` or
`all` and watch the null contract and the billing gate behave.

#### Known upstream quirks this actor already handles

These are measured facts about the DoD MIRTA service, not hypotheticals:

- The coded-value **domains are published only on the point layer**. The authoritative
  boundary layer serves the same codes with `domain: null`, so it cannot describe itself.
- The same code ships in **different cases** across and within layers:
  `SITEOPERATIONALSTATUS` appears as `EXCS`, `Excs` and `excs`; `ISJOINTBASE` ships `no`,
  `No`, `yes` and `Yes`. A strict equality test on the raw value counts **10** joint bases
  when the true answer is **11** — it publishes one real joint base as not a joint base.
  Everything here is case-normalised before comparison.
- The service's own `groupBy` **collapses case**, so a vocabulary survey run through
  `outStatistics` under-reports the real spellings. The drift gate reads raw columns instead.
- `MEDIAID` is the literal string `"na"` on every row of both layers, and
  `FEATUREDESCRIPTION` is `"na"` on every point. They are fetched and emitted as `null` so
  their deadness is proved on every run and a future re-population is visible rather than
  silently discarded.
- `SITEREPORTINGCOMPONENT` is the **reporting** component, not necessarily the operating
  service. Buckley Space Force Base reports as `usaf`, and the `ussf` code is used by **zero**
  rows in either layer. This actor never invents a service branch it was not told.
- A retired or renamed layer answers **HTTP 200** with an embedded
  `{"error":{"code":400,"message":"Invalid URL"}}`, and a request URL over roughly 3 KB
  returns an **HTML 404 page** rather than a JSON error. Both are handled; long requests go
  out as POST.

***

### Use as an MCP tool

This actor is callable by AI agents over Apify's hosted MCP server. Billing is unchanged when
called as a tool, and a run that cannot answer fails without billing.

**Claude Desktop / Claude Code / Cursor:**

```json
{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": [
        "-y", "@apify/actors-mcp-server",
        "--actors", "malonestar/dod-mirta-military-installation-siting-screener"
      ],
      "env": { "APIFY_TOKEN": "<your-apify-token>" }
    }
  }
}
```

**A worked agent prompt:**

> "We are evaluating a 40-acre parcel at 39.7017, -104.7514 for a data centre. Screen it
> against DoD installations within 25 miles and tell me whether it sits on an installation,
> which component operates it, and whether any DoD-flagged FIRRMA site is within 1 mile and
> within 100 miles. Report the measured distances and note explicitly that the FIRRMA
> distance is an input to a Part 802 analysis, not a determination."

Because every field is tri-state and carries its own basis, an agent that gets a `null` back
knows it was not checked, and will not report a clear that was never verified.

#### Chain it with

Site diligence is rarely one layer. These pair naturally with this screener:

- [FUDS Defense Site Screener](https://apify.com/malonestar/fuds-defense-site-screener) —
  **formerly** used defense sites and munitions response areas, the historical counterpart to
  this actor's active installations.
- [Site Due Diligence Bundle](https://apify.com/malonestar/site-due-diligence-bundle) —
  20-layer federated screen for one coordinate in one call.
- [EPA Contaminated Site Screener](https://apify.com/malonestar/epa-contaminated-site-screener)
  — Phase I ESA contamination screening.
- [FAA Drone Airspace Checker](https://apify.com/malonestar/faa-drone-airspace-checker) —
  controlled airspace, which frequently overlaps installation boundaries.
- [HIFLD Grid Proximity Screener](https://apify.com/malonestar/hifld-grid-proximity-screener)
  — transmission and substation proximity for energy siting.
- [Tribal Land Jurisdiction Screener](https://apify.com/malonestar/tribal-land-jurisdiction-screener)
  — the other federal jurisdiction overlay a site selector needs.

***

### FAQ

**Is my site on a military base?**
Run the coordinate through this actor. `on_dod_installation` answers it by point-in-polygon
against DoD's published installation boundaries, and `on_dod_installation_basis` tells you
how the answer was reached.

**How do I check whether a property is near a CFIUS-covered military installation?**
This actor reports DoD's published `ISFIRRMASITE` flag for every installation it finds, the
measured distance to the nearest one, and tri-state proximity bands at 1, 10, 25, 50, 99 and
100 miles. It reports the facts a Part 802 analysis needs; it does not perform that analysis.

**Which branch operates the base near my site?**
`reporting_component` gives the DoD reporting component and `military_department` rolls it up
to Army, Navy, Air Force, Homeland Security or OSD. Note this is the reporting component —
Space Force installations currently report under the Air Force code.

**Is the installation still active?**
`is_active_installation` is `true`, `false`, or `null` when DoD published a status code its
own domain does not define. Rocky Mountain Arsenal, for example, publishes `clsd` and is
correctly reported as not active.

**Why did I get `null` instead of `false`?**
Because the question was not actually answered. Check `on_dod_installation_basis`,
`boundary_layer_status`, `point_layer_status` and `firrma_scan_status` — one of them will
name the reason. This is deliberate: a `false` from this actor means "checked, and negative".

**How current is the data?**
Every row carries `checked_at` and the exact `service_url` queried, so any result can be
reproduced against DoD's live service.

**Does it cover overseas installations?**
No. MIRTA publishes publicly releasable DoD sites in the 50 states, Puerto Rico and Guam.
Every row measured carries `country_code: "usa"`.

***

### Pricing

Pay per result — one charge per row emitted. A run that cannot answer emits nothing and
charges nothing.

### Data source

[DoD Military Installations, Ranges and Training Areas (MIRTA)](https://services7.arcgis.com/n1YM8pTrFmm7L4hs/arcgis/rest/services/mirta/FeatureServer),
published by DoD Components through data.gov. Public domain. This actor is not affiliated
with or endorsed by the Department of Defense.

# Actor input Schema

## `assets` (type: `array`):

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` (type: `integer`):

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` (type: `integer`):

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` (type: `boolean`):

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.

## `activeOnly` (type: `boolean`):

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.

## `maxInstallationsPerAsset` (type: `integer`):

Caps how many installation detail rows are emitted per screened coordinate, nearest first. Defaults to 25 when omitted.

## `maxAssets` (type: `integer`):

Safety cap on how many coordinates a single run will screen. Defaults to 25 when omitted; maximum 100.

## `skipDriftChecks` (type: `boolean`):

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.

## `simulateOutage` (type: `string`):

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.

## Actor input object example

```json
{
  "assets": [
    {
      "lat": 39.7017,
      "lon": -104.7514,
      "label": "Aurora CO parcel (adjacent to Buckley SFB)",
      "radiusMiles": 25
    },
    {
      "lat": 36.8508,
      "lon": -76.2859,
      "label": "Norfolk VA waterfront site",
      "radiusMiles": 15
    },
    {
      "lat": 32.7157,
      "lon": -117.1611,
      "label": "San Diego CA industrial parcel",
      "radiusMiles": 15
    },
    {
      "lat": 41.5,
      "lon": -100,
      "label": "Rural Nebraska control parcel",
      "radiusMiles": 25
    }
  ],
  "radiusMiles": 25,
  "firrmaScanMiles": 100,
  "includeInstallationDetail": true,
  "activeOnly": false,
  "maxInstallationsPerAsset": 25,
  "maxAssets": 25,
  "skipDriftChecks": false,
  "simulateOutage": "none"
}
```

# Actor output Schema

## `results` (type: `string`):

The default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "assets": [
        {
            "lat": 39.7017,
            "lon": -104.7514,
            "label": "Aurora CO parcel (adjacent to Buckley SFB)",
            "radiusMiles": 25
        },
        {
            "lat": 36.8508,
            "lon": -76.2859,
            "label": "Norfolk VA waterfront site",
            "radiusMiles": 15
        },
        {
            "lat": 32.7157,
            "lon": -117.1611,
            "label": "San Diego CA industrial parcel",
            "radiusMiles": 15
        },
        {
            "lat": 41.5,
            "lon": -100,
            "label": "Rural Nebraska control parcel",
            "radiusMiles": 25
        }
    ],
    "radiusMiles": 25,
    "firrmaScanMiles": 100,
    "maxInstallationsPerAsset": 25,
    "maxAssets": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("malonestar/dod-mirta-military-installation-siting-screener").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "assets": [
        {
            "lat": 39.7017,
            "lon": -104.7514,
            "label": "Aurora CO parcel (adjacent to Buckley SFB)",
            "radiusMiles": 25,
        },
        {
            "lat": 36.8508,
            "lon": -76.2859,
            "label": "Norfolk VA waterfront site",
            "radiusMiles": 15,
        },
        {
            "lat": 32.7157,
            "lon": -117.1611,
            "label": "San Diego CA industrial parcel",
            "radiusMiles": 15,
        },
        {
            "lat": 41.5,
            "lon": -100,
            "label": "Rural Nebraska control parcel",
            "radiusMiles": 25,
        },
    ],
    "radiusMiles": 25,
    "firrmaScanMiles": 100,
    "maxInstallationsPerAsset": 25,
    "maxAssets": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("malonestar/dod-mirta-military-installation-siting-screener").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "assets": [
    {
      "lat": 39.7017,
      "lon": -104.7514,
      "label": "Aurora CO parcel (adjacent to Buckley SFB)",
      "radiusMiles": 25
    },
    {
      "lat": 36.8508,
      "lon": -76.2859,
      "label": "Norfolk VA waterfront site",
      "radiusMiles": 15
    },
    {
      "lat": 32.7157,
      "lon": -117.1611,
      "label": "San Diego CA industrial parcel",
      "radiusMiles": 15
    },
    {
      "lat": 41.5,
      "lon": -100,
      "label": "Rural Nebraska control parcel",
      "radiusMiles": 25
    }
  ],
  "radiusMiles": 25,
  "firrmaScanMiles": 100,
  "maxInstallationsPerAsset": 25,
  "maxAssets": 25
}' |
apify call malonestar/dod-mirta-military-installation-siting-screener --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,malonestar/dod-mirta-military-installation-siting-screener"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/3aotcgtZe6konjPMl/builds/waPGcVu0sJsNDQzEn/openapi.json
