Pull a house price index into a spreadsheet with the REST API
One key, one free call, and the monthly index for any UK district or authority is in Excel or Sheets. The response marks which months are still forecast.
This is the smallest useful thing you can do with the REST API: one endpoint, one area, a monthly series you can chart. It uses the repeat-sales house price index, so the number moves only when the same properties sell again, not when the mix of what sold changes. The call is free.
Step 1: create an API key
Sign in to the API & MCP Hub and create a key. It is shown once; copy it somewhere safe. A new account starts with free credits, and the endpoint in this guide does not use any. Keys are for code; if you are using an AI assistant, connect the MCP server instead and skip this guide.
Step 2: make the call
Replace the area code with any postcode district (SE22) or local authority name (Lewisham), and set area_type to district or lad to match.
curl "https://api.marketcode.ai/v1/market/index-series?area_code=SE22&area_type=district&limit=36" -H "Authorization: Bearer $MARKETCODE_API_KEY"
The response is JSON with three parts:
data.area: the area as the warehouse knows it, with its id, which the per-area endpoints such as energy profile and agent activity key on.data.series: one row per month, newest last, each with the period, the index level, the twelve-month change where there is one, and a flag for whether the point is settled or forecast.data.provenance: the method, the base period, the publication frequency and the last settled period. Read this before you chart anything.
Every response also carries credits_charged and credits_remaining. For this call the first is zero.
Step 3: load it
Excel. Data → Get Data → From Other Sources → From Web. Choose Advanced, paste the URL, and add an HTTP header Authorization with the value Bearer followed by your key. In Power Query, expand data → series → To Table, then expand the record columns. Set the period column to text: a value like 2025-12 is a month, not a date, and Excel will otherwise guess.
Google Sheets. Sheets cannot send headers from a plain formula, so use Apps Script: UrlFetchApp.fetch(url, {headers: {Authorization: 'Bearer ' + key}}), parse the JSON, and write series to a range. Keep the key in Script Properties, not in a cell.
Anything else. Python's requests, or a scheduled job, with the same header. The REST API page has the OpenAPI document.
Step 4: chart it honestly
Three things the response tells you that a chart should show:
- Forecast points are marked. The last few months carry a forecast flag because HM Land Registry registrations arrive for weeks after completion. Plot them dashed, or stop the line at the last settled period in
provenance. - The base period is stated. An index of 130 means 30% above the base month, not a price. If you want pounds, multiply by a reference price from
market_factsfor the base period. - The method may be national. For a thin district the series can be the national index standing in for a local one, and
provenancesays so. A chart that labels that as SE22 is wrong.
What to add next
The asking-price and asking-rent indices sit at /v1/market/asking-index and /v1/market/rent-index with the same parameters, and lead the sold index by months. Registered sales per month for a district are at /v1/market/volume-series. All free. Put the three on one chart and you have the district's last five years in one picture.