{
  "openapi": "3.0.1",
  "info": {
    "title": "HUD Multifamily & Affordable Housing Leads",
    "description": "Scrape official HUD open data: assisted/Section 8, FHA-insured, LIHTC & public-housing properties with management contacts (name, phone, email), units, REAC scores, loan-maturity & contract-expiry timing signals and a lead score. Filter by state, type & units. B2B leads + monitoring.",
    "version": "0.1",
    "x-build-id": "4dM74dbTlK5cDuhwH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~hud-multifamily-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-hud-multifamily-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/scrapesage~hud-multifamily-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-hud-multifamily-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/scrapesage~hud-multifamily-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-hud-multifamily-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": {
          "datasets": {
            "title": "Data sources",
            "type": "array",
            "description": "Which official HUD datasets to pull. <b>Assisted</b> (Section 8 / 202 / 811 / PRAC) and <b>FHA-Insured</b> multifamily carry the richest contacts — management company + named contact + phone + email. <b>Public Housing Authorities</b> add agency phone/email + executive-director contacts. <b>LIHTC</b> tax-credit properties add the largest property universe with allocation, units & target population (note: HUD withholds owner contacts on most LIHTC rows).",
            "items": {
              "type": "string",
              "enum": [
                "assisted",
                "insured",
                "lihtc",
                "pha"
              ],
              "enumTitles": [
                "Assisted / Section 8 multifamily (mgmt contacts + email)",
                "FHA-Insured multifamily (mgmt contacts + loan data)",
                "LIHTC tax-credit properties (property + allocation data)",
                "Public Housing Authorities (agency + exec-director contacts)"
              ]
            },
            "default": [
              "assisted",
              "insured",
              "pha"
            ]
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Filter by state — two-letter USPS codes, e.g. <code>CA</code>, <code>TX</code>, <code>NY</code>, <code>FL</code>. Leave empty for all states & territories (slower; scans the whole country).",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Filter by city name (case-insensitive contains), e.g. <code>Houston</code>, <code>Brooklyn</code>, <code>Phoenix</code>. Combine with a state for accuracy.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Filter by county name (case-insensitive contains), e.g. <code>Harris</code>, <code>Cook</code>, <code>Maricopa</code>.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes (prefix)",
            "type": "array",
            "description": "Filter by property ZIP — full ZIP (<code>77002</code>) or a prefix (<code>770</code> matches all 770xx).",
            "items": {
              "type": "string"
            }
          },
          "nameQuery": {
            "title": "Name contains",
            "type": "string",
            "description": "Only return records whose property name or management company contains this text (case-insensitive), e.g. <code>village</code>, <code>senior</code>, or a specific owner / management company name."
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Keep only properties of the selected type(s). Derived from HUD program flags. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "family",
                "senior",
                "assistedLiving",
                "nursingHome",
                "boardAndCare",
                "hospital",
                "disabled",
                "elderly",
                "homeless"
              ],
              "enumTitles": [
                "Family",
                "Senior / elderly (202/811)",
                "Assisted living",
                "Nursing home",
                "Board & care",
                "Hospital",
                "Disabled (811)",
                "Elderly (LIHTC target)",
                "Homeless (LIHTC target)"
              ]
            }
          },
          "minUnits": {
            "title": "Min units",
            "type": "integer",
            "description": "Only properties / agencies with at least this many total units. Great for filtering to institutional-size owners."
          },
          "maxUnits": {
            "title": "Max units",
            "type": "integer",
            "description": "Only properties / agencies with at most this many total units."
          },
          "hasEmail": {
            "title": "Has email only",
            "type": "boolean",
            "description": "Only return records that include a contact email (management-agent email or, for housing authorities, agency / executive-director email).",
            "default": false
          },
          "hasPhone": {
            "title": "Has phone only",
            "type": "boolean",
            "description": "Only return records that include a contact phone number.",
            "default": false
          },
          "subsidizedOnly": {
            "title": "Subsidized / Section 8 only",
            "type": "boolean",
            "description": "Only properties currently flagged as subsidized or with active rental assistance (Section 8, PRAC, PAC, etc.).",
            "default": false
          },
          "troubledOnly": {
            "title": "Troubled / watch-list only",
            "type": "boolean",
            "description": "Only properties flagged as troubled, on the HUD watch list, or in loan default / delinquency — high intent for turnaround, repair, refinance and management-change services.",
            "default": false
          },
          "loanMaturingWithinMonths": {
            "title": "Loan maturing within (months)",
            "type": "integer",
            "description": "Only FHA-insured properties whose mortgage matures within this many months — a refinance / recapitalization timing signal. E.g. <code>24</code>."
          },
          "contractExpiringWithinMonths": {
            "title": "Subsidy contract expiring within (months)",
            "type": "integer",
            "description": "Only properties whose Section 8 / assistance contract expires within this many months — a renewal / repositioning timing signal. E.g. <code>12</code>."
          },
          "reacScoreBelow": {
            "title": "REAC inspection score below",
            "type": "integer",
            "description": "Only properties whose last REAC physical-inspection score is below this value (0–100) — capital-needs / repair intent. E.g. <code>60</code>."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of records to return in this run.",
            "default": 1000
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "leadScore",
              "unitsHigh",
              "recentInspection",
              "loanMaturitySoon",
              "source"
            ],
            "type": "string",
            "description": "<b>Lead score</b> = most contactable / highest-intent first (recommended). <b>Most units</b> ranks by size. <b>Recent inspection</b> / <b>Loan maturing soonest</b> rank by those signals. <b>Source order</b> = fastest on very large limits.",
            "default": "leadScore"
          },
          "deduplicateResults": {
            "title": "Deduplicate within a run",
            "type": "boolean",
            "description": "Skip duplicate properties (same HUD property ID across the Assisted + Insured datasets) within this run (recommended).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode — only new / changed records",
            "type": "boolean",
            "description": "Remember which records were already returned (in a named key-value store) and emit ONLY records that are <b>new</b> or whose key fields changed since the last run — each tagged with a <code>monitorEvent</code> (<code>new</code> or <code>updated</code>). HUD refreshes this data regularly; run on a Schedule to capture fresh leads. Works alongside Apify Schedules (the schedule starts the run; monitoring decides what is new).",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the memory used by monitoring mode. Use a distinct key per saved watch (e.g. per state or property type) so different monitors don't share state.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. HUD open data is queried directly and needs no proxy — leave this off for the fastest queries. Enable Apify Proxy only if your network requires it.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}