{
 "openapi": "3.1.0",
 "info": {
  "title": "LIHTC Atlas LIHTC data API",
  "version": "1.0.0",
  "summary": "Free, read-only JSON for LIHTC income and rent limits, QCT/DDA checks and state facts.",
  "description": "HUD FY2026 MTSP income limits (HUD files dated 2026-03-27), HUD's 2027 QCT and DDA lists (FR Doc. 2026-20390), and state credit ceilings and agencies, as published by HUD and the IRS. No key, no sign-up. Every response names its source and as-of date and the lihtc.loans page to cite. License: HUD, IRS and Census data are public domain; the compilation and computed rents are CC BY 4.0, credit \"Data: LIHTC Atlas (lihtc.loans)\" with a link. Operated by Janover Capital LLC; not affiliated with HUD, the IRS or any state agency. An MCP server with the same data and more tools is at https://lihtc.loans/mcp.",
  "contact": {
   "name": "LIHTC Atlas",
   "email": "hello@lihtc.loans",
   "url": "https://lihtc.loans/developers/"
  },
  "license": {
   "name": "CC BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  }
 },
 "servers": [
  {
   "url": "https://lihtc.loans"
  }
 ],
 "externalDocs": {
  "url": "https://lihtc.loans/developers/"
 },
 "paths": {
  "/api/locate": {
   "get": {
    "operationId": "checkQctDda",
    "summary": "QCT and DDA status for one US street address.",
    "description": "Geocodes the address with the U.S. Census Bureau geocoder (2020 tracts and ZCTAs) and checks the tract against HUD's QCT list and the ZCTA (metro) or county (nonmetro) against the DDA lists, one result per list year. Nothing is stored. Not cached (Cache-Control: no-store).",
    "parameters": [
     {
      "name": "address",
      "in": "query",
      "required": true,
      "description": "Street address with city and state or ZIP",
      "schema": {
       "type": "string",
       "minLength": 6,
       "maxLength": 200
      },
      "example": "2321 4th St NE, Washington, DC 20002"
     }
    ],
    "responses": {
     "200": {
      "description": "Matched address, geographies and designations",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "matchedAddress": {
           "type": "string"
          },
          "lat": {
           "type": "number"
          },
          "lon": {
           "type": "number"
          },
          "tract": {
           "type": "string",
           "description": "11-digit 2020 tract GEOID"
          },
          "tractName": {
           "type": "string"
          },
          "county": {
           "type": "string",
           "description": "5-digit county FIPS"
          },
          "countyName": {
           "type": "string"
          },
          "zcta": {
           "type": [
            "string",
            "null"
           ]
          },
          "metro": {
           "type": "boolean"
          },
          "metroName": {
           "type": [
            "string",
            "null"
           ]
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "year": {
              "type": "string"
             },
             "qct": {
              "type": "boolean"
             },
             "dda": {
              "type": "boolean"
             },
             "ddaArea": {
              "type": [
               "string",
               "null"
              ]
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Address too short",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         },
         "required": [
          "error"
         ]
        }
       }
      }
     },
     "404": {
      "description": "No match, or no census tract for the match",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         },
         "required": [
          "error"
         ]
        }
       }
      }
     },
     "502": {
      "description": "The Census geocoder didn't answer",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         },
         "required": [
          "error"
         ]
        }
       }
      }
     }
    }
   }
  },
  "/api/limits": {
   "get": {
    "operationId": "getIncomeLimits",
    "summary": "FY2026 MTSP income limits and maximum gross rents for one county (town in New England).",
    "description": "Give fips, or state and county. Rents are maximum gross rents (tenant rent plus utility allowance) by the IRS Publication 5913 method, computed by lihtc.loans. Cached for an hour (Cache-Control: public, max-age=3600).",
    "parameters": [
     {
      "name": "fips",
      "in": "query",
      "required": false,
      "description": "5-digit county FIPS or HUD's 10-digit code (county + county subdivision; 99999 outside New England)",
      "schema": {
       "type": "string",
       "pattern": "^[0-9]{5}([0-9]{5})?$"
      },
      "example": "48201"
     },
     {
      "name": "state",
      "in": "query",
      "required": false,
      "description": "Two-letter code or name",
      "schema": {
       "type": "string"
      },
      "example": "TX"
     },
     {
      "name": "county",
      "in": "query",
      "required": false,
      "description": "County name (\"Harris County\" or \"Harris\"); a town in New England",
      "schema": {
       "type": "string"
      },
      "example": "Harris"
     },
     {
      "name": "household_size",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 8
      }
     },
     {
      "name": "ami_level",
      "in": "query",
      "required": false,
      "description": "Only this level, percent of area median income",
      "schema": {
       "type": "integer",
       "enum": [
        20,
        30,
        40,
        50,
        60,
        70,
        80
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Limits and rents",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "area": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "state": {
             "type": "string"
            },
            "st": {
             "type": "string"
            },
            "fips": {
             "type": "string"
            },
            "county_fips": {
             "type": "string"
            },
            "hud_area": {
             "type": "string"
            },
            "hud_area_code": {
             "type": "string"
            },
            "metro": {
             "type": "boolean"
            }
           }
          },
          "median_family_income": {
           "type": [
            "integer",
            "null"
           ]
          },
          "income_limits": {
           "type": "object",
           "description": "By AMI level (\"20\"..\"80\"): the 8-person ladder, or one number when household_size is given",
           "additionalProperties": {
            "oneOf": [
             {
              "type": "array",
              "items": {
               "type": "integer"
              },
              "minItems": 8,
              "maxItems": 8,
              "description": "Index 0 = 1 person ... index 7 = 8 persons, dollars"
             },
             {
              "type": "integer"
             }
            ]
           }
          },
          "max_gross_rent": {
           "type": "object",
           "description": "By AMI level: studio, 1br ... 5br, dollars per month",
           "additionalProperties": {
            "type": "object",
            "additionalProperties": {
             "type": "integer"
            }
           }
          },
          "hera_special": {
           "type": [
            "object",
            "null"
           ],
           "description": "HERA Special limits and rents (projects placed in service by 2008) where HUD lists them"
          },
          "rent_method": {
           "type": "string"
          },
          "note": {
           "type": "string"
          },
          "source": {
           "type": "string",
           "description": "Primary source of the figures"
          },
          "source_url": {
           "type": "string",
           "format": "uri"
          },
          "as_of": {
           "type": "string",
           "description": "Date of the source data (YYYY-MM-DD)"
          },
          "url": {
           "type": "string",
           "format": "uri",
           "description": "The lihtc.loans page to cite"
          },
          "publisher": {
           "type": "string"
          },
          "license": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Missing or ambiguous input (the error lists the matching areas and their fips)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         },
         "required": [
          "error"
         ]
        }
       }
      }
     },
     "404": {
      "description": "No such state or area",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         },
         "required": [
          "error"
         ]
        }
       }
      }
     }
    }
   }
  },
  "/api/state": {
   "get": {
    "operationId": "getStateLihtc",
    "summary": "One state's LIHTC facts: agency, QAP, state credit, 2026 9% ceiling and bond cap, 2027 QCT count.",
    "parameters": [
     {
      "name": "st",
      "in": "query",
      "required": true,
      "description": "Two-letter state or territory code, or name",
      "schema": {
       "type": "string"
      },
      "example": "CA"
     }
    ],
    "responses": {
     "200": {
      "description": "State record",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "state": {
           "type": "string"
          },
          "st": {
           "type": "string"
          },
          "fips": {
           "type": [
            "string",
            "null"
           ]
          },
          "hfa": {
           "type": "object"
          },
          "lihtcUrl": {
           "type": "string"
          },
          "qap": {
           "type": "object"
          },
          "stateCredit": {
           "type": "object"
          },
          "pop2026": {
           "type": "integer"
          },
          "ceiling9_2026": {
           "type": "integer"
          },
          "ceilingBasis": {
           "type": "string",
           "enum": [
            "per-capita",
            "minimum"
           ]
          },
          "pabCap2026": {
           "type": "integer"
          },
          "pabBasis": {
           "type": "string",
           "enum": [
            "per-capita",
            "minimum"
           ]
          },
          "designations": {
           "type": "object",
           "properties": {
            "year": {
             "type": "string"
            },
            "qualified_census_tracts": {
             "type": [
              "integer",
              "null"
             ]
            },
            "nonmetro_dda_counties": {
             "type": [
              "integer",
              "null"
             ]
            }
           }
          },
          "sources": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "label": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "source": {
           "type": "string",
           "description": "Primary source of the figures"
          },
          "source_url": {
           "type": "string",
           "format": "uri"
          },
          "as_of": {
           "type": "string",
           "description": "Date of the source data (YYYY-MM-DD)"
          },
          "url": {
           "type": "string",
           "format": "uri",
           "description": "The lihtc.loans page to cite"
          },
          "publisher": {
           "type": "string"
          },
          "license": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown state",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         },
         "required": [
          "error"
         ]
        }
       }
      }
     }
    }
   }
  },
  "/api-data/mtsp/index.json": {
   "get": {
    "operationId": "listMtspStates",
    "summary": "States with MTSP limit files, their FIPS codes and area counts.",
    "responses": {
     "200": {
      "description": "Index",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api-data/mtsp/{st}.json": {
   "get": {
    "operationId": "getMtspState",
    "summary": "One state's FY2026 MTSP limits, every area, 20% to 80% for 1 to 8 persons, HERA Special where listed.",
    "parameters": [
     {
      "name": "st",
      "in": "path",
      "required": true,
      "description": "Two-letter code, lower case (tx, dc, pr)",
      "schema": {
       "type": "string",
       "pattern": "^[a-z]{2}$"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "State limits file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Unknown state"
     }
    }
   }
  },
  "/market/applicable-percentages.json": {
   "get": {
    "operationId": "getApplicablePercentages",
    "summary": "Monthly IRS 70% and 30% present value credit rates since January 2024, with the 9% and 4% floors and each revenue ruling.",
    "responses": {
     "200": {
      "description": "Rate table",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/data/downloads/manifest.json": {
   "get": {
    "operationId": "getDownloads",
    "summary": "Bulk CSV and JSON files (MTSP limits, QCT/DDA lists, LIHTC properties): names, row counts, as-of dates, sources, columns.",
    "responses": {
     "200": {
      "description": "Manifest",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/mcp": {
   "post": {
    "operationId": "mcp",
    "summary": "Model Context Protocol server (Streamable HTTP, JSON-RPC 2.0): initialize, tools/list, tools/call, ping.",
    "description": "Ten read-only tools: get_income_limits, calculate_max_rent, check_qct_dda, search_properties, get_property, get_state_lihtc, get_applicable_percentages, get_equity_pricing, calculate_credits, get_financing_quote_link. See /developers/.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "jsonrpc": {
          "const": "2.0"
         },
         "id": {},
         "method": {
          "type": "string"
         },
         "params": {
          "type": "object"
         }
        },
        "required": [
         "jsonrpc",
         "method"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "JSON-RPC response",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "202": {
      "description": "Notification accepted"
     }
    }
   }
  }
 }
}