Australia Postcodes API
Australia Postcodes API checks whether a given 4 digit number is a valid postcode and provide you with the corresponding locality or suburb data.
The API is easy to integrate, acessible RESTfully from both the frontend and backend. It comes generous usage quotas suitable for most projects under the fair use policy.
API Usage
free under the fair use policycURLPHPJavaScriptPythonJavaGocurl -H "Referer: your domain" "https://data.handyapi.com/au-postcodes/2481"
$url = "https://data.handyapi.com/au-postcodes/2481"; $options = [ "http" => [ "method" => "GET", "header" => "Referer: your_domain\r\n" ] ]; $context = stream_context_create($options); $response = @file_get_contents($url, false, $context); $data = @json_decode($response,true); print_r($data);
fetch('https://data.handyapi.com/au-postcodes/2481') .then(response => response.json()) .then(data => { // use JSON data here }) .catch();
import requests response = requests.get('https://data.handyapi.com/au-postcodes/2481', headers={'Referer': 'your-domain'}) if response.status_code == 200: data = response.json() print(data) else: print('Error:', response.status_code)
String url = "https://data.handyapi.com/au-postcodes/2481"; HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(url)) .header("Referer", "your domain") .build(); HttpResponse
response = client.send(request, HttpResponse.BodyHandlers.ofString()); String jsonString = response.body(); System.out.println(jsonString); url := "https://data.handyapi.com/au-postcodes/2481" req, _ := http.NewRequest("GET", url, nil) req.Header.Set("Referer", "your_domain") client := &http.Client{} resp, _ := client.Do(req) defer resp.Body.Close() fmt.Println(resp.Body)
The Type column in the API response identifies the type of Locations returned for the given postcode. The values are:
- LOCALITY: indicates an actual geographic area, typically a populated suburb or town.
- SPECIAL: indicates a specially designated postcode, such as for an ADF base, an Antarctic research station, or a fictional postcode for Santa's North Pole location.
- PO Box: indicates a Post Office Box located on the premises of a post office.
- INACTIVE: indicates postcodes that are not currently in active use, but may be used temporarily or on special occasions or historically used as Large Volume Receiver (LVR).
Trusted by Engineers
The generous and easy to use API is trusted by developers around Australia, with many relying on it for input verification.
Comprehensive
Comprehensive data on Australian postcodes, including suburb name and state information, ensuring accuracy and completeness.
Regular Updates
We constantly sync with the latest data to ensure that you always have access to accurate and reliable information.
Flexibility
Go with the backend or frontend integration. Easily integrate into your existing workflows, without having to make significant changes to your architecture.