{
  "openapi": "3.0.1",
  "info": {
    "title": "FAA OE/AAA Crane, Tower & Pre-Construction Lead Feed",
    "description": "Extract US pre-construction FAA Form 7460-1 Obstruction Evaluation (OE/AAA) filings for tower cranes, 5G cell towers, high-rises, data centers, wind farms, and solar arrays via official FAA REST services—with optional sponsor contact & schedule enrichment.",
    "version": "1.0",
    "x-build-id": "dFyndLPJ0ngHIzx3u"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinky_atelier~faa-oeaaa-crane-tower-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinky_atelier-faa-oeaaa-crane-tower-leads",
        "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/zinky_atelier~faa-oeaaa-crane-tower-leads/runs": {
      "post": {
        "operationId": "runs-sync-zinky_atelier-faa-oeaaa-crane-tower-leads",
        "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/zinky_atelier~faa-oeaaa-crane-tower-leads/run-sync": {
      "post": {
        "operationId": "run-sync-zinky_atelier-faa-oeaaa-crane-tower-leads",
        "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": {
          "queryMode": {
            "title": "Query Mode",
            "enum": [
              "dateRange",
              "stateYear",
              "asnLookup"
            ],
            "type": "string",
            "description": "Choose 'dateRange' for fast rolling pre-construction delta feeds (/services/caseList/date/{OE|NRA}), 'stateYear' for full-year state archives (/services/caseList/{OE|NRA}/{year}?state=XX), or 'asnLookup' to look up specific Aeronautical Study Numbers (/services/case/{asn}).",
            "default": "dateRange"
          },
          "states": {
            "title": "US State / Territory Codes (Optional Filter)",
            "type": "array",
            "description": "Filter to one or more 2-letter US state/territory codes (e.g. ['TX', 'FL', 'CA']). Leave empty ([]) in 'dateRange' mode for nationwide US coverage; required in 'stateYear' mode.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "caseTypes": {
            "title": "FAA Case Types",
            "type": "array",
            "description": "'OE' = Off-Airport Obstruction Evaluation (Form 7460-1 cranes, towers, buildings, wind, solar, power lines); 'NRA' = On-Airport Non-Rulemaking Airport construction & safety plans.",
            "default": [
              "OE"
            ],
            "items": {
              "type": "string"
            }
          },
          "structureCategories": {
            "title": "Structure Categories",
            "type": "array",
            "description": "Keep filings matching these structure types: 'CRANE', 'TOWER', 'BUILDING', 'WIND', 'SOLAR', 'UTILITY', or 'ALL' (unfiltered). You can also include raw FAA structureType prefixes such as 'CRANE$TOWER' or 'BRIDGE'.",
            "default": [
              "CRANE",
              "TOWER",
              "BUILDING",
              "WIND",
              "SOLAR",
              "UTILITY"
            ],
            "items": {
              "type": "string"
            }
          },
          "minAglHeightFt": {
            "title": "Minimum AGL Height (Feet)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum proposed Above Ground Level (AGL) structure height in feet (e.g. 100 or 200 ft to isolate major tower cranes, high-rises, and cell towers).",
            "default": 0
          },
          "daysBack": {
            "title": "Lookback Window in Days (when startDate/endDate omitted)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Rolling number of days back from today (UTC) to query in 'dateRange' mode when explicit startDate/endDate are not set.",
            "default": 5
          },
          "startDate": {
            "title": "Explicit Start Date (YYYY-MM-DD, Optional)",
            "type": "string",
            "description": "Optional explicit start date (YYYY-MM-DD) for 'dateRange' mode. Overrides daysBack when provided."
          },
          "endDate": {
            "title": "Explicit End Date (YYYY-MM-DD, Optional)",
            "type": "string",
            "description": "Optional explicit end date (YYYY-MM-DD) for 'dateRange' mode. Defaults to today (UTC) when startDate is set."
          },
          "year": {
            "title": "Study Year (for 'stateYear' mode)",
            "minimum": 2000,
            "maximum": 2100,
            "type": "integer",
            "description": "4-digit year for 'stateYear' archive queries (defaults to current UTC year)."
          },
          "asns": {
            "title": "Specific ASNs (for 'asnLookup' mode)",
            "type": "array",
            "description": "List of FAA Aeronautical Study Numbers (e.g. ['2026-ASW-8882-OE', '2026-ASW-7839-OE']) to fetch directly.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "enrichCaseDetails": {
            "title": "Enrich Per-Case Details & Sponsor Contacts",
            "type": "boolean",
            "description": "Fetches per-case detail endpoints (/services/case/{asn} + public Form 7460-1 metadata) to enrich Sponsor & Representative direct email, phone, mailing address, county, proposal description, and exact construction start/end dates. Emits 'case-detail-enriched' PPE event per enriched lead.",
            "default": false
          },
          "onlyNew": {
            "title": "Only Emit New Cases (Stateful SEEN_CASES Deduplication)",
            "type": "boolean",
            "description": "Persists seen ASN identifiers in the 'SEEN_CASES' Key-Value Store record so scheduled daily/weekly cron runs only emit and bill for brand-new FAA filings.",
            "default": false
          },
          "maxItems": {
            "title": "Max Filings to Emit",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of matching FAA pre-construction filings to emit in this run.",
            "default": 25
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}