{
  "openapi": "3.1.0",
  "info": {
    "title": "PropertyData API",
    "description": "Comprehensive UK property market data API. Provides prices, rents, sold prices, crime statistics, flood risk, planning applications, and much more. Note: This schema includes our 30 most popular endpoints. For access to all endpoints, use the API directly or our MCP Server. Most endpoints cost 1 credit per call; each operation's description notes its cost. Full documentation for all endpoints, including credit costs and error codes: https://propertydata.co.uk/api/markdown (see also https://propertydata.co.uk/llms.txt).",
    "version": "1.0.0"
  },
  "servers": [{ "url": "https://api.propertydata.co.uk" }],
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "status": { "type": "string", "enum": ["error"] },
          "code": { "type": "string", "description": "PropertyData error code, e.g. X02" },
          "message": { "type": "string" },
          "process_time": { "type": "string" },
          "upgrade_url": {
            "type": "string",
            "description": "On a credit limit error (X04, X13): where to get more credits"
          }
        }
      }
    },
    "responses": {
      "Error": {
        "description": "Error response. Common codes: X02 missing key (400), X03 invalid key (422), X04 credit limit exceeded (403), X06/X07 missing or invalid location input (400/422), X08 insufficient data for location (404), X13 free trial limit exceeded (403), X14 rate limited (429), X20 server busy, retry after 60 seconds (503).",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
      }
    },
    "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } }
  },
  "security": [{ "BearerAuth": [] }],
  "paths": {
    "/sold-prices-per-sqf": {
      "get": {
        "operationId": "getSoldPricesPerSqf",
        "summary": "Get local property sold prices per square foot",
        "description": "Costs 1 credit per call. Coverage: England, Wales and Scotland only, not Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          },
          {
            "name": "points",
            "in": "query",
            "description": "Number of comparable properties",
            "schema": { "type": "integer" }
          },
          {
            "name": "min_sqf",
            "in": "query",
            "description": "Minimum square footage filter",
            "schema": { "type": "integer" }
          },
          {
            "name": "max_sqf",
            "in": "query",
            "description": "Maximum square footage filter",
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "max_age": { "type": "integer" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "points_analysed": { "type": "integer" },
                        "radius": { "type": "string" },
                        "date_earliest": { "type": "string" },
                        "date_latest": { "type": "string" },
                        "average": { "type": "integer" },
                        "70pc_range": { "type": "array", "items": { "type": "integer" } },
                        "80pc_range": { "type": "array", "items": { "type": "integer" } },
                        "90pc_range": { "type": "array", "items": { "type": "integer" } },
                        "100pc_range": { "type": "array", "items": { "type": "integer" } },
                        "raw_data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "date": { "type": "string" },
                              "address": { "type": "string" },
                              "price": { "type": "integer" },
                              "lat": { "type": "number" },
                              "lng": { "type": "number" },
                              "bedrooms": { "type": "integer" },
                              "type": { "type": "string" },
                              "tenure": { "type": "string" },
                              "class": { "type": "string" },
                              "sqf": { "type": "integer" },
                              "price_per_sqf": { "type": "integer" },
                              "distance": { "type": "string" },
                              "url": { "type": "string" }
                            }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/prices": {
      "get": {
        "operationId": "getPrices",
        "summary": "Get live local asking prices",
        "description": "Costs 1 credit per call.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode (full, sector or district)",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          },
          {
            "name": "bedrooms",
            "in": "query",
            "description": "Filter by number of bedrooms (0-10)",
            "schema": { "type": "integer" }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Property type (flat, terraced_house, semi-detached_house, detached_house, house)",
            "schema": { "type": "string" }
          },
          {
            "name": "points",
            "in": "query",
            "description": "Number of comparable properties to analyse (15-100, default 20)",
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "bedrooms": { "type": "integer" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "points_analysed": { "type": "integer" },
                        "radius": { "type": "string" },
                        "average": { "type": "integer" },
                        "70pc_range": { "type": "array", "items": { "type": "integer" } },
                        "80pc_range": { "type": "array", "items": { "type": "integer" } },
                        "90pc_range": { "type": "array", "items": { "type": "integer" } },
                        "100pc_range": { "type": "array", "items": { "type": "integer" } },
                        "raw_data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address": { "type": "string" },
                              "price": { "type": "integer" },
                              "lat": { "type": "string" },
                              "lng": { "type": "string" },
                              "bedrooms": { "type": "integer" },
                              "type": { "type": "string" },
                              "distance": { "type": "string" },
                              "days_on_market": { "type": "integer" },
                              "sstc": { "type": "integer" },
                              "portal": { "type": "string" },
                              "url": { "type": "string" }
                            }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/rents": {
      "get": {
        "operationId": "getRents",
        "summary": "Get live local long-let asking rents",
        "description": "Costs 1 credit per call.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          },
          {
            "name": "bedrooms",
            "in": "query",
            "description": "Filter by number of bedrooms",
            "schema": { "type": "integer" }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Property type (flat, terraced_house, semi-detached_house, detached_house, house)",
            "schema": { "type": "string" }
          },
          {
            "name": "points",
            "in": "query",
            "description": "Number of comparable properties",
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "bedrooms": { "type": "integer" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "long_let": {
                          "type": "object",
                          "properties": {
                            "points_analysed": { "type": "integer" },
                            "radius": { "type": "string" },
                            "unit": { "type": "string" },
                            "average": { "type": "integer" },
                            "70pc_range": { "type": "array", "items": { "type": "integer" } },
                            "80pc_range": { "type": "array", "items": { "type": "integer" } },
                            "90pc_range": { "type": "array", "items": { "type": "integer" } },
                            "100pc_range": { "type": "array", "items": { "type": "integer" } },
                            "raw_data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "address": { "type": "string" },
                                  "price": { "type": "integer" },
                                  "lat": { "type": "string" },
                                  "lng": { "type": "string" },
                                  "bedrooms": { "type": "integer" },
                                  "type": { "type": "string" },
                                  "distance": { "type": "string" },
                                  "days_on_market": { "type": "integer" },
                                  "sstc": { "type": "integer" },
                                  "portal": { "type": "string" },
                                  "url": { "type": "string" }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/title": {
      "get": {
        "operationId": "getTitle",
        "summary": "Get address, type and ownership information by title number",
        "description": "Costs 1 credit per call. For leasehold titles, also returns registered leases with the lease term and years remaining: registeredLeases has one entry per lease per address, and distinctLeases de-duplicates to one entry per lease (keyed by lease_id) with the addresses it covers. Coverage: England and Wales only, not Scotland or Northern Ireland.",
        "parameters": [
          {
            "name": "title",
            "in": "query",
            "description": "Land Registry title number, e.g. ON176985",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "title_number": { "type": "string" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "class": { "type": "string" },
                        "estate_interest": { "type": "string" },
                        "ownership": { "type": "object", "properties": { "type": { "type": "string" } } },
                        "plot_size": { "type": "string" },
                        "polygon_count": { "type": "integer" },
                        "polygons": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "polygon_size": { "type": "string" },
                              "approx_centre": {
                                "type": "object",
                                "properties": { "lat": { "type": "number" }, "lng": { "type": "number" } }
                              },
                              "coords": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": { "lat": { "type": "number" }, "lng": { "type": "number" } }
                                }
                              }
                            }
                          }
                        },
                        "leaseholds": { "type": "array" },
                        "parent_freehold": {},
                        "parent_freeholds": { "type": "array" },
                        "uprns": { "type": "array", "items": { "type": "integer" } },
                        "registeredLeases": { "type": "array" },
                        "distinctLeases": { "type": "array" }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/crime": {
      "get": {
        "operationId": "getCrime",
        "summary": "Get local crime statistics",
        "description": "Costs 1 credit per call. Coverage: England and Wales only, not Scotland or Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          },
          {
            "name": "radius",
            "in": "query",
            "description": "Search radius in kilometres (0.1-3, default 0.4)",
            "schema": { "type": "number" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "radius": { "type": "string" },
                    "population": { "type": "integer" },
                    "crimes_last_12m": { "type": "integer" },
                    "crimes_per_thousand": { "type": "integer" },
                    "crime_rating": { "type": "string" },
                    "types": {
                      "type": "object",
                      "properties": {
                        "Anti-social behaviour": { "type": "integer" },
                        "Violence and sexual offences": { "type": "integer" },
                        "Other theft": { "type": "integer" },
                        "Vehicle crime": { "type": "integer" },
                        "Public order": { "type": "integer" },
                        "Shoplifting": { "type": "integer" },
                        "Burglary": { "type": "integer" },
                        "Criminal damage and arson": { "type": "integer" },
                        "Drugs": { "type": "integer" },
                        "Theft from the person": { "type": "integer" },
                        "Bicycle theft": { "type": "integer" },
                        "Robbery": { "type": "integer" },
                        "Other crime": { "type": "integer" },
                        "Possession of weapons": { "type": "integer" }
                      }
                    },
                    "observations": { "type": "array", "items": { "type": "string" } },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/planning-applications": {
      "get": {
        "operationId": "getPlanningApplications",
        "summary": "Get local planning applications",
        "description": "Costs 1 credit per 10 results.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "Full UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Filter by application category (project type). Comma-separated. One or more of: home improvement, small residential, medium residential, large residential, mixed, tree.",
            "schema": { "type": "string" }
          },
          {
            "name": "application_type",
            "in": "query",
            "description": "Filter by application type. Comma-separated. One or more of: full planning application, householder planning application, change of use, listed building consent, lawful development, advertisement consent, tree preservation order, utilities, environmental impact, non-material amendment, discharge of conditions. Defaults to all except advertisement consent, tree preservation order, non-material amendment and discharge of conditions.",
            "schema": { "type": "string" }
          },
          {
            "name": "max_age",
            "in": "query",
            "description": "Maximum age of applications in days (14-1500)",
            "schema": { "type": "integer" }
          },
          {
            "name": "decision_rating",
            "in": "query",
            "description": "Filter by outcome (positive, negative, neutral)",
            "schema": { "type": "string" }
          },
          {
            "name": "max_radius",
            "in": "query",
            "description": "Search radius in miles (0.01-3)",
            "schema": { "type": "number" }
          },
          {
            "name": "results",
            "in": "query",
            "description": "Number of results to return (10-200)",
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "result_count": { "type": "integer" },
                    "api_calls_cost": { "type": "integer" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "planning_applications": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": { "type": "string" },
                              "address": { "type": "string" },
                              "authority": { "type": "string" },
                              "reference": { "type": "string" },
                              "category": { "type": "string" },
                              "proposal": { "type": "string" },
                              "type": { "type": "string" },
                              "status": { "type": "string" },
                              "decision": {
                                "type": "object",
                                "properties": { "text": { "type": "string" }, "rating": { "type": "string" } }
                              },
                              "dates": {
                                "type": "object",
                                "properties": { "received_at": { "type": "string" }, "decided_at": { "type": "string" } }
                              },
                              "appeals": { "type": "array", "items": {} },
                              "lat": { "type": "number" },
                              "lng": { "type": "number" },
                              "distance": { "type": "string" }
                            }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/flood-risk": {
      "get": {
        "operationId": "getFloodRisk",
        "summary": "Get flood risk assessment for English locations",
        "description": "Costs 1 credit per call. Coverage: England only, not Wales, Scotland or Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "Full UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "flood_risk": { "type": "string" },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/council-tax": {
      "get": {
        "operationId": "getCouncilTax",
        "summary": "Get council tax information for a postcode",
        "description": "Returns council tax by band (A-H, plus I for Wales) and individual property bands. Coverage: England, Wales and Scotland (partial) only, not Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "Full UK postcode",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "council": { "type": "string" },
                    "council_rating": { "type": "string" },
                    "year": { "type": "string" },
                    "council_tax": {
                      "type": "object",
                      "properties": {
                        "band_a": { "type": "string" },
                        "band_b": { "type": "string" },
                        "band_c": { "type": "string" },
                        "band_d": { "type": "string" },
                        "band_e": { "type": "string" },
                        "band_f": { "type": "string" },
                        "band_g": { "type": "string" },
                        "band_h": { "type": "string" }
                      }
                    },
                    "note": { "type": "string" },
                    "properties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": { "address": { "type": "string" }, "band": { "type": "string" } }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" },
          "502": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/yields": {
      "get": {
        "operationId": "getYields",
        "summary": "Determine local rental yields",
        "description": "Costs 1 credit per call.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "bedrooms": { "type": "integer" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "long_let": {
                          "type": "object",
                          "properties": {
                            "points_analysed": { "type": "integer" },
                            "radius": { "type": "string" },
                            "gross_yield": { "type": "string" }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/schools": {
      "get": {
        "operationId": "getSchools",
        "summary": "Get nearby schools",
        "description": "Costs 1 credit per call. Coverage: England only, not Wales, Scotland or Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "object",
                          "properties": {
                            "nearest": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": { "type": "string" },
                                  "local_authority": { "type": "string" },
                                  "postcode": { "type": "string" },
                                  "lat": { "type": "string" },
                                  "lng": { "type": "string" },
                                  "type": { "type": "string" },
                                  "phase": { "type": "string" },
                                  "sixth_form": { "type": "string" },
                                  "num_pupils": { "type": "integer" },
                                  "deprivation": { "type": "string" },
                                  "inspection_start": { "type": "string" },
                                  "inspection_end": { "type": "string" },
                                  "inspection_pub": { "type": "string" },
                                  "url": { "type": "string" },
                                  "distance": { "type": "string" }
                                }
                              }
                            }
                          }
                        },
                        "independent": {
                          "type": "object",
                          "properties": {
                            "nearest": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": { "type": "string" },
                                  "postcode": { "type": "string" },
                                  "lat": { "type": "string" },
                                  "lng": { "type": "string" },
                                  "type": { "type": "string" },
                                  "gender": { "type": "string" },
                                  "phase": { "type": "string" },
                                  "num_pupils": {},
                                  "telephone": { "type": "string" },
                                  "website": { "type": "string" },
                                  "url": { "type": "string" },
                                  "distance": { "type": "string" }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/build-cost": {
      "get": {
        "operationId": "getBuildCost",
        "summary": "Calculate building costs for construction",
        "description": "Costs 1 credit per call.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "internal_area": { "type": "string" },
                    "finish_quality": { "type": "string" },
                    "project_type": { "type": "string" },
                    "data": {
                      "type": "object",
                      "properties": { "total_cost": { "type": "integer" }, "cost_per_sqf": { "type": "integer" } }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/household-income": {
      "get": {
        "operationId": "getHouseholdIncome",
        "summary": "Get average household income for an area",
        "description": "Costs 1 credit per call.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "params": {
                      "type": "object",
                      "properties": { "postcode": { "type": "string" }, "radius": { "type": "integer" } }
                    },
                    "result": {
                      "type": "object",
                      "properties": { "average_household_income": { "type": "integer" }, "currency": { "type": "string" } }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/valuation-sale": {
      "get": {
        "operationId": "getValuationSale",
        "summary": "Get sale valuation for a property",
        "description": "Costs 1 credit per call. Coverage: England, Wales and Scotland only, not Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "Full UK postcode",
            "required": true,
            "schema": { "type": "string" }
          },
          {
            "name": "internal_area",
            "in": "query",
            "description": "Internal area in square feet",
            "schema": { "type": "integer" }
          },
          {
            "name": "property_type",
            "in": "query",
            "description": "Property type (flat, terraced_house, semi-detached_house, detached_house, house)",
            "schema": { "type": "string" }
          },
          {
            "name": "construction_date",
            "in": "query",
            "description": "Construction date or period",
            "schema": { "type": "string" }
          },
          {
            "name": "bedrooms",
            "in": "query",
            "description": "Number of bedrooms",
            "schema": { "type": "integer" }
          },
          {
            "name": "bathrooms",
            "in": "query",
            "description": "Number of bathrooms",
            "schema": { "type": "integer" }
          },
          {
            "name": "finish_quality",
            "in": "query",
            "description": "Finish quality",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "params": {
                      "type": "object",
                      "properties": {
                        "property_type": { "type": "string" },
                        "construction_date": { "type": "string" },
                        "internal_area": { "type": "string" },
                        "bedrooms": { "type": "string" },
                        "bathrooms": { "type": "string" },
                        "finish_quality": { "type": "string" },
                        "outdoor_space": { "type": "string" },
                        "off_street_parking": { "type": "string" }
                      }
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "estimate": { "type": "integer", "description": "The estimated sale price in GBP" },
                        "margin": {
                          "type": "integer",
                          "description": "Margin for error in GBP. Varies by confidence: 5% (very_high), 7.5% (high), 12.5% (medium), 20% (low)"
                        },
                        "confidence": {
                          "type": "string",
                          "description": "Confidence level based on availability of nearby comparable data",
                          "enum": ["very_high", "high", "medium", "low"]
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/demographics": {
      "get": {
        "operationId": "getDemographics",
        "summary": "Get local population demographics data",
        "description": "Costs 1 credit per call. Coverage: England and Wales only, not Scotland or Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "output_area_count": { "type": "integer" },
                    "output_area": { "type": "string" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "deprivation": { "type": "integer" },
                        "health": { "type": "integer" },
                        "social_grade": { "type": "object", "additionalProperties": { "type": "string" } },
                        "age": { "type": "object", "additionalProperties": { "type": "string" } },
                        "politics": {
                          "type": "object",
                          "properties": {
                            "results": {
                              "type": "object",
                              "properties": {
                                "Labour": { "type": "string" },
                                "Conservative": { "type": "string" },
                                "Liberal Democrat": { "type": "string" },
                                "Reform UK": { "type": "string" },
                                "Green": { "type": "string" },
                                "Other": { "type": "string" }
                              }
                            },
                            "constituences": { "type": "array", "items": { "type": "string" } }
                          }
                        },
                        "proportion_with_degree": { "type": "integer" },
                        "vehicles_per_household": { "type": "string" },
                        "commute_method": {
                          "type": "object",
                          "properties": {
                            "at_home": { "type": "string" },
                            "underground_light_rail": { "type": "string" },
                            "train": { "type": "string" },
                            "bus": { "type": "string" },
                            "taxi": { "type": "string" },
                            "motorcycle": { "type": "string" },
                            "car_driver": { "type": "string" },
                            "car_passenger": { "type": "string" },
                            "bicycle": { "type": "string" },
                            "foot": { "type": "string" },
                            "other": { "type": "string" }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/area-type": {
      "get": {
        "operationId": "getAreaType",
        "summary": "Determine area type (rural or urban)",
        "description": "Costs 1 credit per call.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "area_type": { "type": "string" },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/prices-per-sqf": {
      "get": {
        "operationId": "getPricesPerSqf",
        "summary": "Get live local asking prices per square foot",
        "description": "Costs 1 credit per call.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          },
          {
            "name": "points",
            "in": "query",
            "description": "Number of comparable properties",
            "schema": { "type": "integer" }
          },
          {
            "name": "min_sqf",
            "in": "query",
            "description": "Minimum square footage filter",
            "schema": { "type": "integer" }
          },
          {
            "name": "max_sqf",
            "in": "query",
            "description": "Maximum square footage filter",
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "points_analysed": { "type": "integer" },
                        "radius": { "type": "string" },
                        "average": { "type": "integer" },
                        "70pc_range": { "type": "array", "items": { "type": "integer" } },
                        "80pc_range": { "type": "array", "items": { "type": "integer" } },
                        "90pc_range": { "type": "array", "items": { "type": "integer" } },
                        "100pc_range": { "type": "array", "items": { "type": "integer" } },
                        "raw_data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address": { "type": "string" },
                              "price": { "type": "integer" },
                              "lat": { "type": "string" },
                              "lng": { "type": "string" },
                              "bedrooms": { "type": "integer" },
                              "type": { "type": "string" },
                              "sqf": { "type": "integer" },
                              "price_per_sqf": { "type": "integer" },
                              "distance": { "type": "string" },
                              "days_on_market": { "type": "integer" },
                              "sstc": { "type": "integer" },
                              "portal": { "type": "string" },
                              "url": { "type": "string" }
                            }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/internet-speed": {
      "get": {
        "operationId": "getInternetSpeed",
        "summary": "Get internet speeds for a UK postcode",
        "description": "Costs 1 credit per call.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "Full UK postcode",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "internet": {
                      "type": "object",
                      "properties": {
                        "SFBB_availability": { "type": "string" },
                        "UFBB_availability": { "type": "string" },
                        "FTPP_availability": { "type": "string" },
                        "gigabit_availability": { "type": "string" },
                        "premises_unable_10mbps": { "type": "string" },
                        "premises_unable_30mbps": { "type": "string" },
                        "premises_below_uso": { "type": "string" }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/sold-prices": {
      "get": {
        "operationId": "getSoldPrices",
        "summary": "Get local property sold prices",
        "description": "Costs 1 credit per call. Coverage: England, Wales and Scotland only, not Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          },
          {
            "name": "bedrooms",
            "in": "query",
            "description": "Filter by number of bedrooms",
            "schema": { "type": "integer" }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Property type (flat, terraced_house, semi-detached_house, detached_house, house)",
            "schema": { "type": "string" }
          },
          {
            "name": "points",
            "in": "query",
            "description": "Number of comparable properties",
            "schema": { "type": "integer" }
          },
          {
            "name": "max_age",
            "in": "query",
            "description": "Maximum age of sold prices in months",
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "type": { "type": "string" },
                    "max_age": { "type": "integer" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "points_analysed": { "type": "integer" },
                        "radius": { "type": "string" },
                        "date_earliest": { "type": "string" },
                        "date_latest": { "type": "string" },
                        "average": { "type": "integer" },
                        "70pc_range": { "type": "array", "items": { "type": "integer" } },
                        "80pc_range": { "type": "array", "items": { "type": "integer" } },
                        "90pc_range": { "type": "array", "items": { "type": "integer" } },
                        "100pc_range": { "type": "array", "items": { "type": "integer" } },
                        "raw_data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "date": { "type": "string" },
                              "address": { "type": "string" },
                              "price": { "type": "integer" },
                              "lat": { "type": "number" },
                              "lng": { "type": "number" },
                              "bedrooms": { "type": "integer" },
                              "type": { "type": "string" },
                              "tenure": { "type": "string" },
                              "class": { "type": "string" },
                              "distance": { "type": "string" },
                              "url": { "type": "string" }
                            }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/demand": {
      "get": {
        "operationId": "getDemand",
        "summary": "Determine local property sales demand",
        "description": "Costs 1 credit per call. Coverage: England and Wales only, not Scotland or Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "total_for_sale": { "type": "integer" },
                    "average_sales_per_month": { "type": "integer" },
                    "turnover_per_month": { "type": "string" },
                    "months_of_inventory": { "type": "string" },
                    "days_on_market": { "type": "integer" },
                    "demand_rating": { "type": "string" },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/growth": {
      "get": {
        "operationId": "getGrowth",
        "summary": "Get up to 7-year capital growth data",
        "description": "Costs 1 credit per call.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "data": {
                      "type": "array",
                      "items": { "type": "array", "items": { "type": ["string", "integer"] } },
                      "description": "One row per year, oldest first: [month, average price in GBP, change on the previous row as a string such as \"-1.7%\" (null for the first)]"
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/uprn-title": {
      "get": {
        "operationId": "getUprnTitle",
        "summary": "Lookup a title number from a UPRN",
        "description": "Costs 1 credit per call. Coverage: England and Wales only, not Scotland or Northern Ireland.",
        "parameters": [
          {
            "name": "uprn",
            "in": "query",
            "description": "Unique Property Reference Number",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "uprn": { "type": "string" },
                        "title_count": { "type": "integer" },
                        "title_data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": { "title_number": { "type": "string" }, "title_class": { "type": "string" } }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/property": {
      "get": {
        "operationId": "getProperty",
        "summary": "A full profile of one property, from its address or UPRN",
        "description": "Send exactly one of uprn or address. Returns sections (identity, title, building, sales, estimate, council_tax, constraints), each with a data_status describing our data, not the property: found, none_found, not_covered (outside the dataset's coverage) or unavailable (temporary failure; retry). The estimate is indexed: the last sale adjusted by local house price inflation, blended with EPC floor area x local sold price per sq ft. Costs 20 credits per call; 10 if any section is unavailable; 1 when no single property matches (error 4601 lists the candidate UPRNs). Coverage: England, Wales and Scotland (partial) only, not Northern Ireland.",
        "parameters": [
          {
            "name": "uprn",
            "in": "query",
            "description": "Unique Property Reference Number. Send this or address",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "query",
            "description": "Full address ending with the postcode, e.g. 17 Green Street, Oxford, OX4 1YB. Send this or uprn",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Property profile by section",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "api_calls_cost": {
                      "type": "integer"
                    },
                    "uprn": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "identity": {
                          "type": "object",
                          "properties": {
                            "data_status": {
                              "type": "string",
                              "enum": [
                                "found",
                                "none_found",
                                "not_covered",
                                "unavailable"
                              ]
                            },
                            "uprn": {
                              "type": "string"
                            },
                            "address": {
                              "type": "string"
                            },
                            "address_parts": {
                              "type": "object"
                            },
                            "lat": {
                              "type": "string"
                            },
                            "lng": {
                              "type": "string"
                            },
                            "classification_code": {
                              "type": "string"
                            },
                            "classification": {
                              "type": "string"
                            },
                            "use_class": {
                              "type": "string"
                            }
                          }
                        },
                        "title": {
                          "type": "object",
                          "properties": {
                            "data_status": {
                              "type": "string",
                              "enum": [
                                "found",
                                "none_found",
                                "not_covered",
                                "unavailable"
                              ]
                            },
                            "titles": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "title_number": {
                                    "type": "string"
                                  },
                                  "title_class": {
                                    "type": "string"
                                  },
                                  "tenure": {
                                    "type": "string"
                                  },
                                  "ownership": {
                                    "type": "object"
                                  }
                                }
                              }
                            },
                            "registered_leases": {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            }
                          }
                        },
                        "building": {
                          "type": "object",
                          "properties": {
                            "data_status": {
                              "type": "string",
                              "enum": [
                                "found",
                                "none_found",
                                "not_covered",
                                "unavailable"
                              ]
                            },
                            "epc_certificate": {
                              "type": "string"
                            },
                            "energy_rating": {
                              "type": "string"
                            },
                            "energy_score": {
                              "type": "integer"
                            },
                            "internal_area_sqf": {
                              "type": "integer"
                            },
                            "habitable_rooms": {
                              "type": "integer"
                            },
                            "estimated_bedrooms": {
                              "type": "integer"
                            },
                            "property_type": {
                              "type": "string"
                            },
                            "construction_age_band": {
                              "type": "string"
                            },
                            "main_fuel": {
                              "type": "string"
                            },
                            "floor_level": {
                              "type": "string"
                            },
                            "epc_occupancy": {
                              "type": "string"
                            }
                          }
                        },
                        "sales": {
                          "type": "object",
                          "properties": {
                            "data_status": {
                              "type": "string",
                              "enum": [
                                "found",
                                "none_found",
                                "not_covered",
                                "unavailable"
                              ]
                            },
                            "transactions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "date": {
                                    "type": "string"
                                  },
                                  "price": {
                                    "type": "integer"
                                  },
                                  "transaction_id": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "estimate": {
                          "type": "object",
                          "properties": {
                            "data_status": {
                              "type": "string",
                              "enum": [
                                "found",
                                "none_found",
                                "not_covered",
                                "unavailable"
                              ]
                            },
                            "estimate": {
                              "type": "integer"
                            },
                            "confidence": {
                              "type": "string"
                            },
                            "method": {
                              "type": "object"
                            }
                          }
                        },
                        "council_tax": {
                          "type": "object",
                          "properties": {
                            "data_status": {
                              "type": "string",
                              "enum": [
                                "found",
                                "none_found",
                                "not_covered",
                                "unavailable"
                              ]
                            },
                            "band": {
                              "type": "string"
                            },
                            "annual_charge": {
                              "type": "integer"
                            }
                          }
                        },
                        "constraints": {
                          "type": "object",
                          "description": "flood_risk, conservation_area, green_belt, aonb, national_park and listed_buildings_nearby, each an object with its own data_status"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/uprn": {
      "get": {
        "operationId": "getUprn",
        "summary": "Get property information from UPRN including structured address parts",
        "description": "Costs 10 credits per call. Coverage: England, Wales and Scotland only, not Northern Ireland.",
        "parameters": [
          {
            "name": "uprn",
            "in": "query",
            "description": "Unique Property Reference Number",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with address, addressParts (secondary, primary, street, town, district, postcode), lat, lng, description, useClass, optional transaction/EPC/council tax data, and registeredLeases (each with a lease_id and the registered term plus parsed term_years, term_start_date, term_end_date and calculated years_remaining)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "api_calls_cost": { "type": "integer" },
                    "uprn": { "type": "string" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "certNum": { "type": "string" },
                        "address": { "type": "string" },
                        "lat": { "type": "string" },
                        "lng": { "type": "string" },
                        "description": { "type": "string" },
                        "useClass": { "type": "string" },
                        "lastSoldAmount": { "type": "integer" },
                        "lastSoldDate": { "type": "string" },
                        "lastSoldTransactionId": { "type": "string" },
                        "estimate": { "type": "integer" },
                        "inflatorEstimate": { "type": "integer" },
                        "sqfEstimate": { "type": "integer" },
                        "inflatorWeight": { "type": "number" },
                        "sqfWeight": { "type": "number" },
                        "internalArea": { "type": "integer" },
                        "energyScore": { "type": "string" },
                        "energyScoreNumerical": { "type": "integer" },
                        "habitableRooms": { "type": "integer" },
                        "estimatedBedrooms": { "type": "integer" },
                        "propertyType": { "type": "string" },
                        "tenure": { "type": "string" },
                        "constructionAgeBand": { "type": "string" },
                        "mainFuel": { "type": "string" },
                        "floorLevel": { "type": "string" },
                        "taxBand": { "type": "string" },
                        "taxRate": { "type": "string" },
                        "transactions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "date": { "type": "string" },
                              "amount": { "type": "integer" },
                              "id": { "type": "string" }
                            }
                          }
                        },
                        "addressParts": {
                          "type": "object",
                          "properties": {
                            "secondary": {},
                            "primary": { "type": "string" },
                            "street": { "type": "string" },
                            "town": { "type": "string" },
                            "district": { "type": "string" },
                            "postcode": { "type": "string" }
                          }
                        },
                        "registeredLeases": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "lease_id": { "type": "string" },
                              "term": { "type": "string" },
                              "term_years": { "type": "integer" },
                              "term_start_date": { "type": "string" },
                              "term_end_date": { "type": "string" },
                              "years_remaining": { "type": "integer" },
                              "date_of_lease": { "type": "string" },
                              "price_paid": { "type": "string" },
                              "registerPropertyDescription": { "type": "string" },
                              "associatedPropertyDescription": { "type": "string" },
                              "region": { "type": "string" },
                              "county": { "type": "string" },
                              "alienation_clause": { "type": "string" }
                            }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/uprns": {
      "get": {
        "operationId": "getUprns",
        "summary": "Find UPRNs in a given postcode area with structured address parts",
        "description": "Costs 1 credit per 10 results. Coverage: England, Wales and Scotland only, not Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "w3w",
            "in": "query",
            "description": "what3words address",
            "schema": { "type": "string" }
          },
          {
            "name": "results",
            "in": "query",
            "description": "Max number of results (10-200, default 10)",
            "schema": { "type": "integer" }
          },
          {
            "name": "strict",
            "in": "query",
            "description": "Only return UPRNs within the provided postcode (true/false)",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with array of UPRNs including address, addressParts (secondary, primary, street, town, district, postcode), lat, lng, classificationCode, classificationCodeDesc",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "strict_postcode_mode": { "type": "boolean" },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uprn": { "type": "integer" },
                          "address": { "type": "string" },
                          "addressParts": {
                            "type": "object",
                            "properties": {
                              "secondary": { "type": "string" },
                              "primary": { "type": "string" },
                              "street": { "type": "string" },
                              "town": { "type": "string" },
                              "district": {},
                              "postcode": { "type": "string" }
                            }
                          },
                          "lat": { "type": "string" },
                          "lng": { "type": "string" },
                          "classificationCode": { "type": "string" },
                          "classificationCodeDesc": { "type": "string" }
                        }
                      }
                    },
                    "api_calls_cost": { "type": "integer" },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/address-match-uprn": {
      "get": {
        "operationId": "getAddressMatchUprn",
        "summary": "Match an address to its UPRN",
        "description": "Costs 10 credits per call, or 1 when no address matches. Coverage: England, Wales and Scotland only, not Northern Ireland.",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "description": "Full UK property address including postcode",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "api_calls_cost": { "type": "integer" },
                    "parameters": { "type": "object", "properties": { "address": { "type": "string" } } },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uprn": { "type": "integer" },
                          "address": { "type": "string" },
                          "lat": { "type": "string" },
                          "lng": { "type": "string" },
                          "classificationCode": { "type": "string" },
                          "classificationCodeDesc": { "type": "string" }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/sourced-properties": {
      "get": {
        "operationId": "getSourcedProperties",
        "summary": "Find investment properties on specialist sourcing lists",
        "description": "Costs 1 credit per 10 results. Coverage: England, Wales, Scotland (partial) and Northern Ireland.",
        "parameters": [
          {
            "name": "list",
            "in": "query",
            "description": "Property sourcing list ID (e.g. unmodernised-properties, repossessed-properties, reduced-properties, high-yield-properties, auction-properties). Comma-separate to search multiple lists in one call (maximum 5), with results merged, de-duplicated and sorted by distance",
            "required": true,
            "schema": { "type": "string" }
          },
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "radius",
            "in": "query",
            "description": "Search radius in miles (1-200, default 40)",
            "schema": { "type": "integer" }
          },
          {
            "name": "standardised_type",
            "in": "query",
            "description": "Filter by property type (flat, terraced_house, semi-detached_house, detached_house). Comma-separate to include multiple, prefix with ! to exclude",
            "schema": { "type": "string" }
          },
          {
            "name": "max_age",
            "in": "query",
            "description": "Only return properties listed within the last N days",
            "schema": { "type": "integer" }
          },
          {
            "name": "min_price",
            "in": "query",
            "description": "Minimum asking price in pounds",
            "schema": { "type": "integer" }
          },
          {
            "name": "max_price",
            "in": "query",
            "description": "Maximum asking price in pounds",
            "schema": { "type": "integer" }
          },
          {
            "name": "exclude_sstc",
            "in": "query",
            "description": "Set to 1 to exclude properties sold subject to contract",
            "schema": { "type": "integer" }
          },
          {
            "name": "results",
            "in": "query",
            "description": "Max number of results (10-500, default 10)",
            "schema": { "type": "integer" }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page of results to return, using results as the page size (page x results cannot exceed 500, default 1)",
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "image_copyright": { "type": "string" },
                    "list": {
                      "type": "object",
                      "properties": { "id": { "type": "string" }, "name": { "type": "string" } }
                    },
                    "postcode": { "type": "string" },
                    "radius": { "type": "integer" },
                    "page": { "type": "integer" },
                    "result_count": { "type": "integer" },
                    "api_calls_cost": { "type": "integer" },
                    "properties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": { "type": "string" },
                          "address": { "type": "string" },
                          "precise_address": { "type": "string" },
                          "postcode": { "type": "string" },
                          "type": { "type": "string" },
                          "type_standardised": { "type": "string" },
                          "bedrooms": { "type": "integer" },
                          "price": { "type": "integer" },
                          "sqf": { "type": "integer" },
                          "days_on_market": { "type": "integer" },
                          "days_since_price_change": { "type": "integer" },
                          "sstc": { "type": "integer" },
                          "lat": { "type": "string" },
                          "lng": { "type": "string" },
                          "distance_to": { "type": "string" },
                          "price_history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": { "date": { "type": "string" }, "price": { "type": "integer" } }
                            }
                          },
                          "summary": { "type": "string" },
                          "image_url": { "type": "string" },
                          "url": { "type": "string" }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/energy-efficiency": {
      "get": {
        "operationId": "getEnergyEfficiency",
        "summary": "Get energy efficiency (EPC) scores and ratings for properties in a postcode",
        "description": "Costs 1 credit per call. Coverage: England, Wales and Scotland only, not Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "Full UK postcode",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "energy_efficiency": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "inspection_date": { "type": "string" },
                          "address": { "type": "string" },
                          "score": { "type": "integer" },
                          "rating": { "type": "string" }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/conservation-area": {
      "get": {
        "operationId": "getConservationArea",
        "summary": "Check whether a postcode is within a conservation area",
        "description": "Costs 1 credit per call. Coverage: England (partial) only, not Wales, Scotland or Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "town",
            "in": "query",
            "description": "UK town name",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "conservation_area": { "type": "boolean" },
                    "conservation_area_name": { "type": "string" },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/freeholds": {
      "get": {
        "operationId": "getFreeholds",
        "summary": "Get local freehold titles with headline info",
        "description": "Costs 1 credit per 10 results. Coverage: England and Wales only, not Scotland or Northern Ireland.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "description": "UK postcode",
            "schema": { "type": "string" }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Latitude,longitude coordinates",
            "schema": { "type": "string" }
          },
          {
            "name": "results",
            "in": "query",
            "description": "Max number of results to return. Default 10, min 10, max 200; each 10 results costs 1 credit",
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "postcode": { "type": "string" },
                    "postcode_type": { "type": "string" },
                    "url": { "type": "string" },
                    "result_count": { "type": "integer" },
                    "api_calls_cost": { "type": "integer" },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title_number": { "type": "string" },
                          "class": { "type": "string" },
                          "num_polygons": { "type": "integer" },
                          "polygons": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": { "type": "integer" },
                                "lat": { "type": "number" },
                                "lng": { "type": "number" },
                                "distance": { "type": "string" },
                                "num_points": { "type": "integer" },
                                "leaseholds": { "type": "integer" }
                              }
                            }
                          }
                        }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/account/credits": {
      "get": {
        "operationId": "getAccountCredits",
        "summary": "Get API account information: credits used, credits remaining etc",
        "description": "Free: costs 0 credits.",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "params": { "type": "object", "properties": { "key": { "type": "string" } } },
                    "result": {
                      "type": "object",
                      "properties": {
                        "credits_used": { "type": "integer" },
                        "credits_remaining": { "type": "integer" },
                        "credits_limit": { "type": "integer" },
                        "credits_renew_at": { "type": "string" },
                        "key_credits_used": { "type": "integer" }
                      }
                    },
                    "process_time": { "type": "string", "description": "Server processing time in seconds" }
                  }
                }
              }
            }
          },
          "4XX": { "$ref": "#/components/responses/Error" }
        }
      }
    }
  }
}
