{
  "openapi": "3.1.0",
  "info": {
    "title": "cmbs.loan CMBS data API",
    "version": "1.0.0",
    "description": "Free, read-only CMBS loan data from SEC Form ABS-EE loan-level data and Form 10-D trustee reports, compiled by cmbs.news: note rates, underwriting medians, lenders, the maturity wall and servicers. No key; CORS open. Figures describe loans that have closed and are estimates from public filings, not quotes or offers to lend. Published by Janover Capital LLC, a commercial mortgage advisor, not a lender. Credit cmbs.loan with a link when you reuse the data.",
    "contact": {
      "name": "cmbs.loan",
      "email": "hello@cmbs.loan",
      "url": "https://cmbs.loan/developers/"
    },
    "termsOfService": "https://cmbs.loan/terms/"
  },
  "servers": [
    {
      "url": "https://cmbs.loan"
    }
  ],
  "externalDocs": {
    "description": "Developers page, with the MCP server",
    "url": "https://cmbs.loan/developers/"
  },
  "paths": {
    "/api/v1/rates": {
      "get": {
        "operationId": "getRates",
        "summary": "CMBS note rates",
        "description": "Median original note rate (percent) on loans securitized in the last 90 days, 180 days and 12 months, by property type, term and month.",
        "tags": [
          "rates"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "multifamily",
                "retail",
                "office",
                "hotel",
                "self-storage",
                "industrial",
                "mixed-use",
                "mobile-home-park",
                "co-op",
                "healthcare"
              ]
            },
            "description": "Property type."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Bad parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/underwriting": {
      "get": {
        "operationId": "getUnderwriting",
        "summary": "CMBS underwriting medians",
        "description": "Loan size, loan to value, debt service coverage, debt yield and occupancy (median and percentiles), interest-only share and term mix, last 12 months.",
        "tags": [
          "underwriting"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "multifamily",
                "retail",
                "office",
                "hotel",
                "self-storage",
                "industrial",
                "mixed-use",
                "mobile-home-park",
                "co-op",
                "healthcare"
              ]
            },
            "description": "Property type."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Bad parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lenders": {
      "get": {
        "operationId": "listLenders",
        "summary": "CMBS lenders",
        "description": "Originators ranked by 12-month securitized volume. type/state keep lenders with at least one such loan; min/max keep lenders whose loan size range overlaps.",
        "tags": [
          "lenders"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "multifamily",
                "retail",
                "office",
                "hotel",
                "self-storage",
                "industrial",
                "mixed-use",
                "mobile-home-park",
                "co-op",
                "healthcare"
              ]
            },
            "description": "Property type."
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "US state: two-letter code (TX) or name (texas)."
          },
          {
            "name": "min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Smallest loan amount, dollars."
          },
          {
            "name": "max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Largest loan amount, dollars."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Bad parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lenders/{slug}": {
      "get": {
        "operationId": "getLender",
        "summary": "One CMBS lender",
        "description": "A lender's book: volume, loan sizes, rates, leverage, types, states and recent loans.",
        "tags": [
          "lenders"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Lender slug from /api/v1/lenders, e.g. citi."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Bad parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such lender",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/maturities": {
      "get": {
        "operationId": "getMaturities",
        "summary": "CMBS maturity wall",
        "description": "Loans still reporting by maturity year: count, balance, average rate, and the share whose NOI at securitization is under 9% of today's balance. Filter by type or by state, not both.",
        "tags": [
          "maturities"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "multifamily",
                "retail",
                "office",
                "hotel",
                "self-storage",
                "industrial",
                "mixed-use",
                "mobile-home-park",
                "co-op",
                "healthcare"
              ]
            },
            "description": "Property type."
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "US state: two-letter code (TX) or name (texas)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Bad parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/servicers": {
      "get": {
        "operationId": "listServicers",
        "summary": "CMBS servicers",
        "description": "Special servicers (deals, loans, balance, 60+ day delinquencies, appraisal reductions, liquidations) and master servicers, from each trust's latest 10-D.",
        "tags": [
          "servicers"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter servicers by name."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Bad parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Envelope": {
        "type": "object",
        "description": "Every response carries these fields plus the endpoint's data.",
        "properties": {
          "asOf": {
            "type": "string",
            "format": "date",
            "description": "Date of the SEC loan data behind the response."
          },
          "source": {
            "type": "string"
          },
          "notice": {
            "type": "string",
            "description": "Estimates from public filings, not a quote."
          },
          "quote": {
            "type": "string",
            "format": "uri"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          },
          "page": {
            "type": "string",
            "format": "uri",
            "description": "The cmbs.loan page with the same figures."
          }
        },
        "required": [
          "asOf",
          "source",
          "notice"
        ],
        "additionalProperties": true
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "docs": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}
