{
  "openapi": "3.0.1",
  "info": {
    "title": "Hud Lihtc Property Sponsor Scraper",
    "version": "0.0",
    "x-build-id": "7kL8jeBWthByxePAf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unique_dev~hud-lihtc-property-sponsor-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unique_dev-hud-lihtc-property-sponsor-scraper",
        "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/unique_dev~hud-lihtc-property-sponsor-scraper/runs": {
      "post": {
        "operationId": "runs-sync-unique_dev-hud-lihtc-property-sponsor-scraper",
        "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/unique_dev~hud-lihtc-property-sponsor-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-unique_dev-hud-lihtc-property-sponsor-scraper",
        "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": {
          "states": {
            "title": "US States Filter",
            "type": "array",
            "description": "2-letter US state or territory codes to query (e.g., ['TX', 'CA', 'FL', 'NY']). Leave empty to query nationwide.",
            "default": [
              "TX",
              "CA",
              "FL"
            ],
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities Filter (Optional)",
            "type": "array",
            "description": "Optional list of cities to filter properties by (case-insensitive, e.g., ['AUSTIN', 'HOUSTON', 'LOS ANGELES']). Leave empty for all cities.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "placedInServiceYearMin": {
            "title": "Placed-in-Service Year (Minimum)",
            "minimum": 1987,
            "maximum": 2030,
            "type": "integer",
            "description": "Optional minimum Placed-in-Service year (YR_PIS, e.g., 2010). Excludes sentinel years (8888/9999) when set."
          },
          "placedInServiceYearMax": {
            "title": "Placed-in-Service Year (Maximum)",
            "minimum": 1987,
            "maximum": 2030,
            "type": "integer",
            "description": "Optional maximum Placed-in-Service year (YR_PIS, e.g., 2015)."
          },
          "researchWindowStartYear": {
            "title": "Year-15 Preservation Window Start Year",
            "minimum": 2000,
            "maximum": 2050,
            "type": "integer",
            "description": "Start year for evaluating the indicative Year-15 compliance/preservation exit window (YR_PIS + 15 >= researchWindowStartYear).",
            "default": 2025
          },
          "researchWindowEndYear": {
            "title": "Year-15 Preservation Window End Year",
            "minimum": 2000,
            "maximum": 2050,
            "type": "integer",
            "description": "End year for evaluating the indicative Year-15 compliance/preservation exit window (YR_PIS + 15 <= researchWindowEndYear).",
            "default": 2030
          },
          "onlyYear15WindowMatches": {
            "title": "Only Year-15 Preservation Window Properties",
            "type": "boolean",
            "description": "When enabled, pushes down SQL filters so only properties whose indicative Year-15 preservation/exit year (YR_PIS + 15) falls between researchWindowStartYear and researchWindowEndYear are returned.",
            "default": false
          },
          "minimumTotalUnits": {
            "title": "Minimum Total Units (N_UNITS)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum total residential units in the property (0 for no minimum).",
            "default": 0
          },
          "minimumLowIncomeUnits": {
            "title": "Minimum Low-Income Units (LI_UNITS)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum LIHTC low-income restricted units in the property (0 for no minimum).",
            "default": 0
          },
          "sponsorNameContains": {
            "title": "Sponsor / Project Ownership Name Contains (Optional)",
            "type": "string",
            "description": "Optional substring filter matching sponsor company (COMPANY), contact (CONTACT), or project/LP entity name (PROJECT).",
            "default": ""
          },
          "mode": {
            "title": "Extraction Mode (Snapshot vs. Stateful Changes)",
            "enum": [
              "snapshot",
              "changes"
            ],
            "type": "string",
            "description": "Select 'snapshot' to emit all matching records, or 'changes' to compare against prior runs stored in the named Key-Value Store (stateKey) and emit only new or updated properties.",
            "default": "snapshot"
          },
          "stateKey": {
            "title": "Key-Value Store State Key",
            "type": "string",
            "description": "Named Apify Key-Value Store used to persist property hashes keyed by hud_id for stateful change tracking.",
            "default": "LIHTC-STATE"
          },
          "enrichSponsorContacts": {
            "title": "Enrich Sponsor Website, Business Emails, Phone & Socials",
            "type": "boolean",
            "description": "When enabled (default), uses 12-worker multi-engine discovery (Yahoo Search + Clearbit + website crawl) to enrich sponsor/property website URL, public business emails, phone number, and social profiles (LinkedIn, Facebook, Instagram, YouTube, X).",
            "default": true
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of normalized HUD LIHTC property records to output in a single run (up to 50,000).",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}