Skip to content

Postal Areas API

Browse rental listings by postal code area (FSA — Forward Sortation Area) and full 6-digit postal code.

GET /postal-areas

List all FSAs in Greater Montreal with listing stats and boundary polygons.

Response:

json
{
  "postalAreas": [
    {
      "id": "uuid",
      "fsa": "H2T",
      "name": "Plateau Mont-Royal West",
      "province": "QC",
      "latitude": "45.5247000",
      "longitude": "-73.5953000",
      "neighborhoodId": "uuid | null",
      "boundary": { "type": "Polygon", "coordinates": [...] },
      "listingCount": 27,
      "avgPrice": 201222
    }
  ]
}

Coverage: 193 FSAs (123 H-prefix Montreal/Laval + 70 J-prefix South Shore/suburbs). 187 have boundary polygons from Statistics Canada.

GET /postal-areas/:fsa

Single FSA detail with boundary, linked neighborhood, active listings, nested postal codes, and stats.

Params: fsa — 3-character FSA code (e.g., H2T)

Response:

json
{
  "id": "uuid",
  "fsa": "H2T",
  "name": "Plateau Mont-Royal West",
  "province": "QC",
  "latitude": "45.5247000",
  "longitude": "-73.5953000",
  "boundary": { "type": "Polygon", "coordinates": [...] },
  "neighborhood": {
    "id": "uuid",
    "name": "Mile End",
    "slug": "mile-end",
    "borough": "Le Plateau-Mont-Royal"
  },
  "listings": [ ... ],
  "postalCodes": [
    { "code": "H2T2Y2", "count": 3, "avgPrice": 176800 }
  ],
  "stats": {
    "listingCount": 27,
    "avgPrice": 201222,
    "byBedrooms": { "studio": 3, "1": 9, "2": 6, "3": 6, "4+": 3 }
  }
}

Listings include full ListingSummary fields + addressPostalCode + primary image. Limited to 100 listings.

GET /postal-areas/code/:code

Listings for a specific full 6-digit postal code.

Params: code — 6-character postal code without space (e.g., H2T2Y2)

Response:

json
{
  "postalCode": "H2T 2Y2",
  "normalized": "H2T2Y2",
  "fsa": "H2T",
  "fsaName": "Plateau Mont-Royal West",
  "fsaBoundary": { "type": "Polygon", "coordinates": [...] },
  "fsaNeighborhoodId": "uuid | null",
  "centerLat": 45.525,
  "centerLng": -73.602,
  "listings": [ ... ],
  "stats": {
    "listingCount": 3,
    "avgPrice": 176800,
    "byBedrooms": { "1": 2, "2": 1 }
  }
}

Center point is computed from listing coordinates (falls back to FSA centroid). Parent FSA boundary is included for map context.

Database Tables

postal_areas

ColumnTypeDescription
iduuidPrimary key
fsatextUnique FSA code (e.g., H2T)
nametextArea name
provincetextProvince code (QC)
latitudenumericCentroid latitude
longitudenumericCentroid longitude
boundaryjsonbGeoJSON polygon from Statistics Canada
neighborhood_iduuidFK to neighborhoods (nearest match)

postal_codes

ColumnTypeDescription
iduuidPrimary key
codetextUnique 6-char code (e.g., H2T2Y2)
fsatextParent FSA (e.g., H2T)
ldutextLocal Delivery Unit (e.g., 2Y2)
nametextCity/area name from GeoNames
latitudenumericCentroid latitude
longitudenumericCentroid longitude
boundaryjsonbReserved for future LDU boundaries
postal_area_iduuidFK to postal_areas

~101K postal codes seeded for Greater Montreal from GeoNames (CC BY 4.0).