Skip to content

List locations

GET /api/locations

Returns all Australian locations, including suburbs, postcodes, and states. The response is paginated due to the large number of locations.

To retrieve a specific page of results, use the paginated endpoint:

GET /api/locations/page/{page}
ParameterTypeRequiredDescription
pageintegerNoPage number (starts at 1)
Terminal window
# Get the first page of locations
curl -X GET \
-H "Content-Type: application/json" \
https://www.transdirect.com.au/api/locations
# Get a specific page
curl -X GET \
-H "Content-Type: application/json" \
https://www.transdirect.com.au/api/locations/page/5

A successful response returns a 200 status code with an array of location objects.

[
{
"locality": "SYDNEY",
"postcode": "2000",
"state": "NSW"
},
{
"locality": "THE ROCKS",
"postcode": "2000",
"state": "NSW"
},
{
"locality": "DAWES POINT",
"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)