Skip to content

Get locations by postcode

GET /api/locations/postcode/{postCode}

Returns all suburbs associated with a specific Australian postcode. A single postcode can cover multiple suburbs.

ParameterTypeRequiredDescription
postCodestringYesA four-digit Australian postcode
Terminal window
curl -X GET \
-H "Content-Type: application/json" \
https://www.transdirect.com.au/api/locations/postcode/2000

A successful response returns a 200 status code with an array of location objects for the given postcode.

[
{
"locality": "BARANGAROO",
"postcode": "2000",
"state": "NSW"
},
{
"locality": "DAWES POINT",
"postcode": "2000",
"state": "NSW"
},
{
"locality": "HAYMARKET",
"postcode": "2000",
"state": "NSW"
},
{
"locality": "MILLERS POINT",
"postcode": "2000",
"state": "NSW"
},
{
"locality": "SYDNEY",
"postcode": "2000",
"state": "NSW"
},
{
"locality": "SYDNEY SOUTH",
"postcode": "2000",
"state": "NSW"
},
{
"locality": "THE ROCKS",
"postcode": "2000",
"state": "NSW"
}
]
FieldTypeDescription
localitystringSuburb or locality name
postcodestringFour-digit Australian postcode
statestringState or territory abbreviation (e.g. NSW, VIC, QLD, SA, WA, TAS, NT, ACT)
Status codeMeaning
404Not found — the postcode does not exist