GovernmentData_Postzon_RetrieveByPostcode
curl --request GET \
--url 'https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key='import requests
url = "https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"Items": [
{
"Easting": "517292",
"Northing": "208276",
"Latitude": "51.7608",
"Longitude": "-0.3019",
"OsGrid": "TL 17292 08276",
"CountryCode": "064",
"NewCountryCode": "E92000001",
"CountryName": "England",
"CountyCode": "26",
"NewCountyCode": "E10000015",
"CountyName": "Hertfordshire",
"DistrictCode": "26UG",
"NewDistrictCode": "E07000240",
"DistrictName": "St Albans",
"WardCode": "26UGGH",
"NewWardCode": "E05004795",
"WardName": "Marshalswick North",
"NhsShaCode": "",
"NewNhsShaCode": "E19000001",
"NhsShaName": "",
"NhsPctCode": "5P4",
"NewNhsPctCode": "E18000006",
"NhsPctName": "West Hertfordshire PCT",
"LeaCode": "919",
"LeaName": "Hertfordshire",
"GovernmentOfficeCode": "G",
"GovernmentOfficeName": "East of England",
"WestminsterConstituencyCode": "382",
"WestminsterConstituencyName": "St. Albans",
"WestminsterMP": "Anne Main",
"WestminsterParty": "Conservative",
"WestminsterConstituencyCode2010": "382",
"WestminsterConstituencyName2010": "St. Albans",
"LSOACode": "E01023712",
"LSOAName": "St Albans 008D",
"MSOACode": "E02004931",
"MSOAName": "St Albans 008",
"CCGCode": "06N",
"CCGName": "NHS Herts Valleys CCG",
"CCGAreaCode": "Q58",
"CCGAreaName": "Hertfordshire and the South Midlands Area Team",
"CCGRegionCode": "Y55",
"CCGRegionName": "Midlands and East of England Commissioning Region"
}
]
}GovernmentData: Postzon RetrieveByPostcode
Get comprehensive UK government data for any postcode. Returns coordinates, ONS codes, NHS areas, constituencies, wards, and council information.
GET
/
GovernmentData
/
Postzon
/
RetrieveByPostcode
/
v1.50
/
json6.ws
GovernmentData_Postzon_RetrieveByPostcode
curl --request GET \
--url 'https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key='import requests
url = "https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcode/v1.50/json6.ws?Key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"Items": [
{
"Easting": "517292",
"Northing": "208276",
"Latitude": "51.7608",
"Longitude": "-0.3019",
"OsGrid": "TL 17292 08276",
"CountryCode": "064",
"NewCountryCode": "E92000001",
"CountryName": "England",
"CountyCode": "26",
"NewCountyCode": "E10000015",
"CountyName": "Hertfordshire",
"DistrictCode": "26UG",
"NewDistrictCode": "E07000240",
"DistrictName": "St Albans",
"WardCode": "26UGGH",
"NewWardCode": "E05004795",
"WardName": "Marshalswick North",
"NhsShaCode": "",
"NewNhsShaCode": "E19000001",
"NhsShaName": "",
"NhsPctCode": "5P4",
"NewNhsPctCode": "E18000006",
"NhsPctName": "West Hertfordshire PCT",
"LeaCode": "919",
"LeaName": "Hertfordshire",
"GovernmentOfficeCode": "G",
"GovernmentOfficeName": "East of England",
"WestminsterConstituencyCode": "382",
"WestminsterConstituencyName": "St. Albans",
"WestminsterMP": "Anne Main",
"WestminsterParty": "Conservative",
"WestminsterConstituencyCode2010": "382",
"WestminsterConstituencyName2010": "St. Albans",
"LSOACode": "E01023712",
"LSOAName": "St Albans 008D",
"MSOACode": "E02004931",
"MSOAName": "St Albans 008",
"CCGCode": "06N",
"CCGName": "NHS Herts Valleys CCG",
"CCGAreaCode": "Q58",
"CCGAreaName": "Hertfordshire and the South Midlands Area Team",
"CCGRegionCode": "Y55",
"CCGRegionName": "Midlands and East of England Commissioning Region"
}
]
}This method will consume credit.
This endpoint also accepts POST requests with parameters supplied as application/x-www-form-urlencoded.
Authorizations
Query Parameters
The key to use to authenticate to the service.
The Postcode to use to search with.
The username associated with the Royal Mail license (not required for click licenses).
Response
Success
Show child attributes
Show child attributes
Was this page helpful?
GovernmentData: Postzon RetrieveByCoordinates
Previous
GovernmentData: Postzon RetrieveByPostcodeOrPlace
Next
⌘I

