GovernmentData_Postzon_RetrieveByPostcodeOrPlace
curl --request GET \
--url 'https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcodeOrPlace/v1.00/json6.ws?Key='import requests
url = "https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcodeOrPlace/v1.00/json6.ws?Key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcodeOrPlace/v1.00/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/RetrieveByPostcodeOrPlace/v1.00/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/RetrieveByPostcodeOrPlace/v1.00/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/RetrieveByPostcodeOrPlace/v1.00/json6.ws?Key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcodeOrPlace/v1.00/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": [
{
"Location": "",
"Easting": "517200",
"Northing": "208200",
"Latitude": "51.7602",
"Longitude": "-0.3032",
"OsGrid": "TL 17200 08200",
"CountryCode": "064",
"CountryName": "England",
"CountyCode": "26",
"CountyName": "Hertfordshire",
"DistrictCode": "26UG",
"DistrictName": "St Albans",
"WardCode": "26UGGH",
"WardName": "Marshalswick North",
"NhsShaCode": "Y51",
"NhsShaName": "North, Midlands and the East Programme for IT (NMEPFiT)",
"NhsPctCode": "5P4",
"NhsPctName": "West Hertfordshire PCT",
"LeaCode": "919",
"LeaName": "Hertfordshire",
"GovernmentOfficeCode": "G",
"GovernmentOfficeName": "East of England",
"WestminsterConstituencyCode": "218",
"WestminsterConstituencyName": "Hitchin and Harpenden",
"WestminsterMP": "Rt Hon Peter Lilley",
"WestminsterParty": "Conservative",
"WestminsterConstituencyCode2010": "382",
"WestminsterConstituencyName2010": "St Albans"
}
]
}GovernmentData: Postzon RetrieveByPostcodeOrPlace
Search UK government data by postcode or place name. Returns coordinates, ONS codes, NHS areas, constituencies, and local authority information.
GET
/
GovernmentData
/
Postzon
/
RetrieveByPostcodeOrPlace
/
v1.00
/
json6.ws
GovernmentData_Postzon_RetrieveByPostcodeOrPlace
curl --request GET \
--url 'https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcodeOrPlace/v1.00/json6.ws?Key='import requests
url = "https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcodeOrPlace/v1.00/json6.ws?Key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcodeOrPlace/v1.00/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/RetrieveByPostcodeOrPlace/v1.00/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/RetrieveByPostcodeOrPlace/v1.00/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/RetrieveByPostcodeOrPlace/v1.00/json6.ws?Key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.addressy.com/GovernmentData/Postzon/RetrieveByPostcodeOrPlace/v1.00/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": [
{
"Location": "",
"Easting": "517200",
"Northing": "208200",
"Latitude": "51.7602",
"Longitude": "-0.3032",
"OsGrid": "TL 17200 08200",
"CountryCode": "064",
"CountryName": "England",
"CountyCode": "26",
"CountyName": "Hertfordshire",
"DistrictCode": "26UG",
"DistrictName": "St Albans",
"WardCode": "26UGGH",
"WardName": "Marshalswick North",
"NhsShaCode": "Y51",
"NhsShaName": "North, Midlands and the East Programme for IT (NMEPFiT)",
"NhsPctCode": "5P4",
"NhsPctName": "West Hertfordshire PCT",
"LeaCode": "919",
"LeaName": "Hertfordshire",
"GovernmentOfficeCode": "G",
"GovernmentOfficeName": "East of England",
"WestminsterConstituencyCode": "218",
"WestminsterConstituencyName": "Hitchin and Harpenden",
"WestminsterMP": "Rt Hon Peter Lilley",
"WestminsterParty": "Conservative",
"WestminsterConstituencyCode2010": "382",
"WestminsterConstituencyName2010": "St Albans"
}
]
}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 or place name 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?
⌘I

