{
  "name": "Bitcoin House Price Index API",
  "about": "UK and US property prices measured in Bitcoin. Read-only, no key, CORS open.",
  "endpoints": {
    "/api/project": {
      "what": "Projects a home's value forward in pounds and in Bitcoin.",
      "params": {
        "value": "value or asking price in pounds (required)",
        "type": "detached | semi-detached | terraced | flat (required)",
        "postcode": "full UK postcode or outward code, written with no space, e.g. BR28BU or BR2 (this or area)",
        "area": "HM Land Registry area, e.g. bromley, city-of-glasgow, or a council name (this or postcode)",
        "years": "5 to 10, default 10 (the projection lists years 5 to that horizon)",
        "deposit": "optional: the buyer's deposit, in pounds (30000) or as a percentage of the price (15). A number of 100 or less is read as a percentage. Adds an equity section",
        "rate": "optional, with deposit: the mortgage interest rate as a percentage, e.g. 4.9. Adds equity at each projection year",
        "term": "optional, with rate: the mortgage term in years, 5 to 40 (default 25). Repayment mortgage",
        "own": "1 if this is the user's own home rather than a listing (only changes the site link)"
      },
      "example": "https://btchpi.com/api/project?value=450000&postcode=BR28BU&type=terraced"
    },
    "/api/bought": {
      "what": "A past purchase, then and now, in pounds and in Bitcoin, with inflation and money supply over the same period.",
      "params": {
        "paid": "price paid in pounds (required)",
        "month": "purchase month, e.g. 2021-11 or Nov 2021 (required)",
        "type": "detached | semi-detached | terraced | flat (required)",
        "postcode": "full UK postcode or outward code, written with no space (this or area)",
        "area": "HM Land Registry area or council name (this or postcode)",
        "value": "optional: the owner's own current valuation in pounds. Without it, the price paid is grown with the index for the area and type",
        "value_month": "optional, with value: the month of that valuation (default: the latest month)",
        "deposit": "optional: the deposit at purchase, in pounds or as a percentage of the price paid",
        "equity": "optional: the equity today, in pounds"
      },
      "example": "https://btchpi.com/api/bought?paid=387000&month=2021-11&area=manchester&type=flat&value=537000"
    },
    "/api/headline": {
      "what": "The average UK home or the typical US home now, four and eight years ago, in local currency and in Bitcoin, and when it reaches 1 BTC on the trend. The whole country, or one place and property type.",
      "params": {
        "country": "uk | us (required; US: Zillow ZHVI, credit \"Data Provided by Zillow Group\")",
        "area": "optional. UK: HM Land Registry area, e.g. manchester, london, city-of-glasgow, or a council, county, region or nation name. US: a state (texas, new-york), or a metro or city written like austin-tx",
        "geo": "US only: state | metro | city. Needed when a name is both a metro and a city",
        "postcode": "optional, UK only: full UK postcode or outward code, written with no space, in place of area",
        "type": "optional. UK: all | detached | semi-detached | terraced | flat. US: all | single-family | condo (default all)",
        "month": "optional YYYY-MM: report as at an earlier month (default: the index month, the latest UK HPI month, so every country shows the same month)"
      },
      "example": "https://btchpi.com/api/headline?country=uk&area=manchester&type=flat"
    },
    "/api/money": {
      "what": "Broad money, home prices and consumer prices since January 1995, each indexed to 100, from the Bank of England, HM Land Registry and ONS (UK) or the Federal Reserve, Case-Shiller and BLS (US).",
      "params": {
        "country": "uk | us (required)"
      },
      "example": "https://btchpi.com/api/money?country=uk"
    },
    "/api/supply": {
      "what": "Total supply of broad money and bitcoin since December 2015, indexed to 100, with projections to 2040.",
      "params": {
        "country": "uk | us (required)"
      },
      "example": "https://btchpi.com/api/supply?country=uk"
    },
    "/api/zhvi": {
      "what": "Zillow Home Value Index (typical home value) by month for one US place and home type. Credit \"Data Provided by Zillow Group\" wherever the figures appear.",
      "params": {
        "geo": "metro | state | city (the United States row is in metro)",
        "name": "Zillow RegionName, e.g. United States, Texas, \"New York, NY\"; cities as \"Austin, TX\" (list: /data/us-cities.js)",
        "type": "all | single-family | condo (default all)",
        "full": "optional 1: include Zillow months newer than the index month (default: up to the index month, the latest UK HPI month)"
      },
      "example": "https://btchpi.com/api/zhvi?geo=metro&name=Austin%2C%20TX&type=all"
    },
    "/api/area": {
      "what": "Finds the HM Land Registry area for a postcode. Outward codes that span several councils list each, most postcodes first.",
      "params": {
        "postcode": "full UK postcode or outward code"
      },
      "example": "https://btchpi.com/api/area?postcode=EC1V"
    }
  },
  "addresses": "Build each address with no spaces, %20 or commas: some tools cannot open one that has them. Postcodes: BR28BU. Places: austin-tx, new-york.",
  "guide_for_ai_tools": "https://btchpi.com/llms.txt",
  "cite_as": "Source: Bitcoin House Price Index (@btchpi on X, btchpi.com)",
  "terms": "Free with attribution; commercial use needs a licence. https://btchpi.com/licence",
  "note": "A projection, not a forecast. Property is assumed to grow at its 10-year average and Bitcoin to sit on its power law trend; either could differ a lot. Not financial advice."
}