---
title: "Suburb Intelligence"
method: GET
path: "/api/v1/cd-planner/suburb-intelligence"
tags: ["cd-planner"]
---

# Suburb Intelligence

`GET /api/v1/cd-planner/suburb-intelligence`

## Request

- Base URL: `https://api.casaintelligence.com.au` (the document declares no server; this is the origin it was published from)
- URL: `https://api.casaintelligence.com.au/api/v1/cd-planner/suburb-intelligence`
- Auth: API key in header `X-API-Key`

Aggregate every signal we have about a suburb into one composite
artefact + Promise Score. Auditable, data-backed.

PERFORMANCE NOTES (2026-05-03 fix):
• All 5 sub-queries run sequentially against the request session in
  the original implementation. The schools query joined all 1.89M
  properties × 1,532 catchments before filtering, taking enough to
  hit Supabase's statement_timeout. The endpoint then returned 500.
• All five queries use `WHERE UPPER(suburb) = UPPER(:s)`. There IS
  a btree index on ci_properties.suburb / ci_property_sales.suburb,
  but the function-on-column kills it. The proper fix is a functional
  index — see scripts/migrations/2026_05_03_suburb_upper_indexes.sql
  (apply on next maintenance window). Until then, this endpoint:
    - Parallelises all five queries (each on its own session)
    - Wraps each in a 6s asyncio.wait_for so a single slow query
      can't time out the endpoint
    - Returns null for any field whose query timed out, so the
      recipe still gets the fields that DID resolve.

## Query parameters

- `suburb` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/casaintelligence/apis/casa-intelligence-engine.md) · [All operations](https://skmtc.dev/casaintelligence/apis/casa-intelligence-engine/llms.txt) · [OpenAPI document](https://skmtc.dev/casaintelligence/apis/casa-intelligence-engine/revisions/71d711039de0?raw)
