SocialHousing.ai

Developer Docs

Connect your AI assistant to UK housing data in minutes. Register for an API key, point your MCP client at our hosted endpoint, and start querying EPCs, social housing stock, house prices, rental statistics, and more.

BETA v0.1.0 MCP Protocol

Quick Start

Three steps. No installation required.

1

Register

Go to /register, sign in with Google, and copy your API key. Your key is shown immediately after sign-in.
2

Configure your MCP client

Add the OpenHousing.AI endpoint to your client configuration.

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "openhousing": {
      "type": "url",
      "url": "https://openhousing.ai/sse/",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "openhousing": {
      "type": "url",
      "url": "https://openhousing.ai/sse/",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

For any MCP-compatible client, use these endpoints:

MCP Endpoint:  https://openhousing.ai/mcp/
SSE Endpoint:  https://openhousing.ai/sse/

Header:  Authorization: Bearer YOUR_API_KEY
3

Query

Start asking your AI assistant questions about UK housing data. Try:
“What is the average EPC rating in Manchester?”
“Compare housing stock for Peabody and L&Q”
“Show me house price trends in Bristol over the last 5 years”
Get your API key

Authentication

Every request to the MCP endpoint must be authenticated

All requests require an API key passed as an HTTP header:

Authorization: Bearer YOUR_API_KEY
  • API keys are issued at /register after signing in with Google.
  • Each key is tied to your account and can be regenerated from the dashboard.
  • Keys that are inactive for 90 days may be automatically revoked.
  • Do not share your API key or commit it to version control.

Available Tools

10 tools across 3 official UK government data sources

search_epc
Search Energy Performance Certificates by postcode, address, local authority, or rating band
EPC Open Data
get_epc_by_uprn
Retrieve full EPC history for a specific property using its UPRN
EPC Open Data
get_epc_statistics
Aggregated EPC statistics for a local authority — band distribution, averages, compliance metrics
EPC Open Data
search_rsh_stock
Search social housing stock by registered provider or local authority area
RSH SDR
get_provider_profile
Full profile of a registered housing provider — stock, rents, vacancies, geographic spread
RSH SDR
compare_providers
Side-by-side comparison of 2–5 housing providers across key metrics
RSH SDR
get_house_prices
House price indices, average prices, and annual change for any UK location
ONS
get_rental_data
Private rental market statistics — monthly rents, percentiles, bedroom breakdown
ONS
get_affordability
Housing affordability ratios — house price to earnings, median and lower quartile
ONS
get_housing_supply
New build starts, completions, and net additional dwellings by tenure type
ONS

Full Parameter Reference

EPC Open Data

search_epc

Search for Energy Performance Certificates in England and Wales. Accepts postcodes in any format, fuzzy local authority name matching.

ParameterTypeDescription
postcodestringoptionalUK postcode (e.g. "SW1A 1AA")
addressstringoptionalStreet address or partial match
local_authoritystringoptionalLocal authority name or ONS code
energy_bandstringoptionalEPC rating band (A–G)
property_typestringoptionalhouse, flat, bungalow, maisonette
from_datestringoptionalLodgement date from (YYYY-MM-DD)
to_datestringoptionalLodgement date to (YYYY-MM-DD)
max_resultsintegeroptionalResults to return (default 25, max 5000)

get_epc_by_uprn

Retrieve full EPC history for a specific property by its Unique Property Reference Number.

ParameterTypeDescription
uprnstringrequiredUPRN (up to 12 digits)

get_epc_statistics

Aggregated EPC statistics for a local authority. Computes band distribution, property type breakdown, average efficiency scores, and MEES compliance metrics.

ParameterTypeDescription
local_authoritystringrequiredLocal authority name or code
tenurestringoptionalsocial, private-rented, owner-occupied
group_bystringoptionalenergy_band, property_type, construction_age

RSH Statistical Data Return

search_rsh_stock

Search social housing stock data from the RSH Statistical Data Return.

ParameterTypeDescription
provider_namestringoptionalRegistered provider name (partial match)
local_authoritystringoptionalLocal authority name or code
yearintegeroptionalReporting year (default latest)

get_provider_profile

Comprehensive profile of a registered social housing provider including stock breakdown, rents, vacancies, RTB sales, and geographic spread.

ParameterTypeDescription
provider_namestringrequiredProvider name (fuzzy match)

compare_providers

Compare key metrics across 2–5 registered providers side by side.

ParameterTypeDescription
providerslist[string]requiredList of 2–5 provider names
metricslist[string]optionalstock, rents, vacancies, rtb_sales

ONS Housing Statistics

get_house_prices

House price indices, average prices, and annual change for any UK location.

ParameterTypeDescription
locationstringrequiredLocal authority, region, or country
from_datestringoptionalStart date (YYYY-MM)
to_datestringoptionalEnd date (YYYY-MM)
property_typestringoptionaldetached, semi-detached, terraced, flat

get_rental_data

Private rental market statistics — monthly rents, percentiles, bedroom breakdown.

ParameterTypeDescription
locationstringrequiredLocal authority, region, or country
bedroomsintegeroptionalNumber of bedrooms (1–4+)

get_affordability

Housing affordability ratios — house price to earnings, median and lower quartile.

ParameterTypeDescription
locationstringrequiredLocal authority name
measurestringoptionalmedian or lower_quartile (default median)

get_housing_supply

New build starts, completions, and net additional dwellings by tenure type.

ParameterTypeDescription
locationstringrequiredLocal authority, region, or country
tenurestringoptionalmarket, affordable_rent, social_rent, shared_ownership

Response Format

Every tool response includes structured data with a _meta block for provenance

All tool responses include a _meta block containing the data source, licence, attribution text, and the timestamp the data was retrieved. This ensures your AI assistant can cite sources accurately.

Example Response

{
  "results": [
    {
      "address": "10 DOWNING STREET, LONDON, SW1A 2AA",
      "current_energy_rating": "D",
      "current_energy_efficiency": 58,
      "potential_energy_rating": "B",
      "property_type": "House",
      "built_form": "Mid-Terrace",
      "total_floor_area": 1345.0,
      "lodgement_date": "2023-04-12"
    }
  ],
  "total_count": 1,
  "_meta": {
    "source": "EPC Open Data API",
    "licence": "Open Government Licence v3.0",
    "attribution": "Contains data from the Energy Performance of Buildings Register, DLUHC",
    "retrieved_at": "2026-03-29T14:23:01Z"
  }
}

MCP Resources & Prompts

Built-in context and prompt templates available to MCP clients

Resources

MCP resources provide static reference data that AI assistants can read for context.

  • housing://data-sources
    Catalogue of all data sources with coverage, update frequency, and licence details.
  • housing://glossary
    UK housing sector glossary — EPC, RSH, MEES, UPRN, RTB, S106, and more.
  • housing://local-authorities
    Full list of English local authorities with ONS codes, useful for tool parameters.

Prompt Templates

Pre-built prompt templates that guide the AI through common housing data workflows.

  • stock-analysis
    Analyse a housing provider's stock — pulls provider profile, compares with peers, and summarises key metrics.
  • epc-compliance
    Assess EPC compliance for a local authority — band distribution, MEES risk, improvement recommendations.
  • area-profile
    Comprehensive area profile combining house prices, rental data, affordability, housing supply, and EPC stats.

Rate Limits & Fair Use

Designed for interactive AI assistant use, not bulk data extraction

LimitValueNotes
Requests per minute60Per API key
Requests per day5,000Per API key
Max results per query5,000For search_epc; other tools return single records
Concurrent connections5Per API key
Need higher limits? OpenHousing.AI is designed for interactive AI assistant queries, not bulk data extraction. If you have a legitimate use case requiring higher limits, contact support@yantra.works.

Rate-limited responses return HTTP 429 with a Retry-After header. Abuse or automated scraping may result in key revocation.