{
  "openapi": "3.1.0",
  "info": {
    "title": "Rychlá Hypo API – české hypotéky",
    "version": "1.0.0",
    "summary": "Mortgage rates, payment comparison and maximum-loan calculation for 6 Czech banks.",
    "description": "Free public API of Rychlá Hypo (rychlahypo.cz), a licensed Czech mortgage intermediary. It runs the same calculation engine as the calculator on rychlahypo.cz/konfigurator: bank rates verified in the banks' calculators and each bank's own credit methodology. No API key, no personal data, nothing stored. Limit 20 requests/minute per IP. Terms: results may be shown to end users (in AI assistants, apps, websites) with RPSN at least as prominent as the interest rate and Rychlá Hypo cited as the source. Reselling results, building a competing mortgage comparison or calculator on top of this API, bulk harvesting and attempts to reconstruct the calculation methodology are prohibited. MCP server (Streamable HTTP): https://rychlahypo.cz/mcp. Human-readable docs: https://rychlahypo.cz/api-dokumentace",
    "contact": {
      "name": "Rychlá Hypo",
      "email": "info@rychlahypo.cz",
      "url": "https://rychlahypo.cz/api-dokumentace"
    },
    "termsOfService": "https://rychlahypo.cz/api-dokumentace#podminky"
  },
  "servers": [
    {
      "url": "https://rychlahypo.cz"
    }
  ],
  "externalDocs": {
    "url": "https://rychlahypo.cz/api-dokumentace"
  },
  "paths": {
    "/api/v1/rates": {
      "get": {
        "operationId": "getMortgageRates",
        "summary": "Current mortgage rates of 6 Czech banks",
        "tags": [
          "mortgages"
        ],
        "parameters": [
          {
            "name": "fixation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1R",
                "3R",
                "5R",
                "7R",
                "10R"
              ],
              "default": "3R",
              "description": "Rate fixation period: 1R, 3R, 5R, 7R or 10R (years). Numbers 1/3/5/7/10 are accepted too."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rates per bank, surcharges, limits, fees, legal block.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input ({ok:false, error}).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (20 requests/minute per IP).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/compare": {
      "post": {
        "operationId": "compareMortgages",
        "summary": "Compare monthly payment, RPSN and total cost across banks",
        "tags": [
          "mortgages"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "loan_amount"
                ],
                "additionalProperties": false,
                "properties": {
                  "loan_amount": {
                    "type": "number",
                    "minimum": 100000,
                    "description": "Mortgage amount in CZK."
                  },
                  "property_value": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Property price or valuation in CZK. Used for LTV surcharges and bank LTV limits. Optional."
                  },
                  "term_years": {
                    "type": "number",
                    "minimum": 5,
                    "maximum": 40,
                    "default": 30,
                    "description": "Repayment term in years."
                  },
                  "fixation": {
                    "type": "string",
                    "enum": [
                      "1R",
                      "3R",
                      "5R",
                      "7R",
                      "10R"
                    ],
                    "default": "3R",
                    "description": "Rate fixation period: 1R, 3R, 5R, 7R or 10R (years). Numbers 1/3/5/7/10 are accepted too."
                  },
                  "all_applicants_under_36": {
                    "type": "boolean",
                    "default": false,
                    "description": "True if every applicant is younger than 36 (UniCredit waives the 81–90 % LTV surcharge)."
                  }
                }
              },
              "example": {
                "loan_amount": 4000000,
                "property_value": 5000000,
                "term_years": 30,
                "fixation": "3R"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Offers sorted from the lowest monthly payment.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input ({ok:false, error}).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (20 requests/minute per IP).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "compareMortgagesGet",
        "summary": "Same as POST, parameters in the query string",
        "tags": [
          "mortgages"
        ],
        "parameters": [
          {
            "name": "loan_amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "minimum": 100000,
              "description": "Mortgage amount in CZK."
            }
          },
          {
            "name": "property_value",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "description": "Property price or valuation in CZK. Used for LTV surcharges and bank LTV limits. Optional."
            }
          },
          {
            "name": "term_years",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 5,
              "maximum": 40,
              "default": 30,
              "description": "Repayment term in years."
            }
          },
          {
            "name": "fixation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1R",
                "3R",
                "5R",
                "7R",
                "10R"
              ],
              "default": "3R",
              "description": "Rate fixation period: 1R, 3R, 5R, 7R or 10R (years). Numbers 1/3/5/7/10 are accepted too."
            }
          },
          {
            "name": "all_applicants_under_36",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "description": "True if every applicant is younger than 36 (UniCredit waives the 81–90 % LTV surcharge)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Offers sorted from the lowest monthly payment.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input ({ok:false, error}).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (20 requests/minute per IP).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/max-loan": {
      "post": {
        "operationId": "calculateMaxMortgage",
        "summary": "How much each bank lends / whether a requested loan is approved",
        "tags": [
          "mortgages"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "applicants"
                ],
                "additionalProperties": true,
                "properties": {
                  "applicants": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 4,
                    "items": {
                      "type": "object",
                      "required": [
                        "age"
                      ],
                      "additionalProperties": true,
                      "properties": {
                        "age": {
                          "type": "number",
                          "description": "Age in years."
                        },
                        "income_type": {
                          "type": "string",
                          "default": "employee",
                          "enum": [
                            "employee",
                            "osvc_vydpausal",
                            "osvc_skutecne",
                            "osvc_paus",
                            "sro",
                            "rental",
                            "dpp",
                            "dpc",
                            "pension",
                            "parental",
                            "ppm",
                            "dividends",
                            "vysluha"
                          ],
                          "description": "Main income: employee = employment; osvc_vydpausal = self-employed with flat-rate expenses; osvc_skutecne = self-employed with actual expenses; osvc_paus = flat tax (paušální daň); sro = company owner; rental; dpp/dpc = side contracts; pension; parental = parental allowance; ppm = maternity; dividends; vysluha = service pension."
                        },
                        "net_income": {
                          "type": "number",
                          "description": "Net monthly income in CZK (for employees and pensions). For self-employed use annual_revenue and annual_tax_base."
                        },
                        "contract": {
                          "type": "string",
                          "enum": [
                            "indefinite",
                            "fixed",
                            "probation",
                            "notice"
                          ],
                          "description": "Employment contract type."
                        },
                        "months_employed": {
                          "type": "number",
                          "description": "Months at current employer."
                        },
                        "annual_revenue": {
                          "type": "number",
                          "description": "Self-employed: annual revenue from the last tax return (row 101/113), CZK."
                        },
                        "annual_tax_base": {
                          "type": "number",
                          "description": "Self-employed: annual tax base from the last tax return, CZK."
                        },
                        "flat_expense_rate": {
                          "type": "number",
                          "description": "Self-employed flat-rate expenses as a fraction: 0.4, 0.6 or 0.8."
                        },
                        "pension_type": {
                          "type": "string",
                          "enum": [
                            "starobni",
                            "invalidni",
                            "vdovsky",
                            "sirotci"
                          ],
                          "description": "For income_type=pension: old-age, disability, widow's, orphan's."
                        },
                        "secondary_income_type": {
                          "type": "string",
                          "description": "Optional second income of the same applicant (same codes as income_type)."
                        },
                        "secondary_net_income": {
                          "type": "number",
                          "description": "Net monthly amount of the secondary income, CZK."
                        },
                        "residence": {
                          "type": "string",
                          "enum": [
                            "cr",
                            "eu",
                            "third_stable",
                            "third_risky"
                          ],
                          "default": "cr",
                          "description": "Residency: Czech, EU/EEA, stable third country, other."
                        }
                      }
                    },
                    "description": "1–4 applicants (household members who will be borrowers)."
                  },
                  "children": {
                    "type": "number",
                    "minimum": 0,
                    "default": 0,
                    "description": "Number of dependent children (counted as 6–15 years old). For precise living costs send children_ages instead."
                  },
                  "children_ages": {
                    "type": "array",
                    "items": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 26
                    },
                    "description": "Ages of dependent children, e.g. [3, 9]. Overrides children."
                  },
                  "married": {
                    "type": "boolean",
                    "description": "Applicants are spouses with joint property (SJM)."
                  },
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "koupe",
                      "refinancovani",
                      "stavba",
                      "rekonstrukce",
                      "neucelova",
                      "vyporadani"
                    ],
                    "default": "koupe",
                    "description": "Purpose: purchase, refinancing, construction, renovation, non-purpose (American mortgage), settlement."
                  },
                  "property_type": {
                    "type": "string",
                    "enum": [
                      "byt",
                      "dum",
                      "coop",
                      "land",
                      "rekreacni",
                      "commercial"
                    ],
                    "description": "Flat, house, cooperative flat, land, recreational, commercial."
                  },
                  "property_value": {
                    "type": "number",
                    "description": "Property price in CZK. Without it the result is the income-based maximum only."
                  },
                  "requested_loan": {
                    "type": "number",
                    "description": "Specific loan amount to assess (approved yes/no per bank). Omit to get the maximum per bank."
                  },
                  "own_funds": {
                    "type": "number",
                    "description": "Own funds / savings in CZK."
                  },
                  "term_years": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 40,
                    "default": 30
                  },
                  "fixation": {
                    "type": "string",
                    "enum": [
                      "1R",
                      "3R",
                      "5R",
                      "7R",
                      "10R"
                    ],
                    "default": "3R",
                    "description": "Rate fixation period: 1R, 3R, 5R, 7R or 10R (years). Numbers 1/3/5/7/10 are accepted too."
                  },
                  "region": {
                    "type": "string",
                    "enum": [
                      "praha",
                      "regional",
                      "small"
                    ],
                    "default": "regional",
                    "description": "Prague, other larger town, small municipality (affects living costs)."
                  },
                  "loan_payments": {
                    "type": "number",
                    "default": 0,
                    "description": "Monthly payments of all existing loans and leasing, CZK."
                  },
                  "existing_debt_balance": {
                    "type": "number",
                    "default": 0,
                    "description": "Outstanding principal of all existing loans, CZK (DTI limit)."
                  },
                  "credit_card_limits": {
                    "type": "number",
                    "default": 0,
                    "description": "Sum of credit card limits, CZK."
                  },
                  "overdraft_limits": {
                    "type": "number",
                    "default": 0,
                    "description": "Sum of overdraft limits, CZK."
                  },
                  "alimony_paid": {
                    "type": "number",
                    "default": 0,
                    "description": "Monthly alimony paid, CZK."
                  },
                  "housing_cost": {
                    "type": "number",
                    "default": 0,
                    "description": "Monthly housing cost that continues after the purchase (e.g. rent), CZK."
                  },
                  "investment": {
                    "type": "boolean",
                    "default": false,
                    "description": "Buy-to-let / third or further residential property (LTV 70 %, DTI 7)."
                  }
                }
              },
              "example": {
                "applicants": [
                  {
                    "age": 32,
                    "income_type": "employee",
                    "net_income": 48000
                  },
                  {
                    "age": 30,
                    "income_type": "employee",
                    "net_income": 36000
                  }
                ],
                "children": 1,
                "married": true,
                "property_value": 6500000,
                "region": "praha",
                "fixation": "3R"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-bank maximum loan or approval, payment, RPSN and limiting factor.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input ({ok:false, error}).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (20 requests/minute per IP).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "mortgages",
      "description": "Hypotéky / mortgages in the Czech Republic"
    }
  ]
}