GovernmentData_Postzon_RetrieveByCoordinates
curl --request GET \
--url 'https://api.addressy.com/GovernmentData/Postzon/RetrieveByCoordinates/v1.20/json6.ws?Key='import requests
url = "https://api.addressy.com/GovernmentData/Postzon/RetrieveByCoordinates/v1.20/json6.ws?Key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.addressy.com/GovernmentData/Postzon/RetrieveByCoordinates/v1.20/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/RetrieveByCoordinates/v1.20/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/RetrieveByCoordinates/v1.20/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/RetrieveByCoordinates/v1.20/json6.ws?Key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.addressy.com/GovernmentData/Postzon/RetrieveByCoordinates/v1.20/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": [
{
"Postcode": "WR2 6NJ",
"Easting": "381600",
"Northing": "259400",
"Latitude": "52.2325",
"Longitude": "-2.2709",
"OsGrid": "SO 81600 59400",
"CountryCode": "064",
"CountryName": "England",
"CountyCode": "47",
"CountyName": "Worcestershire",
"DistrictCode": "47UC",
"DistrictName": "Malvern Hills",
"WardCode": "47UCHW",
"WardName": "Hallow",
"NhsShaCode": "Y51",
"NhsShaName": "North, Midlands and the East Programme for IT (NMEPFiT)",
"NhsPctCode": "5PL",
"NhsPctName": "Worcestershire PCT",
"LeaCode": "885",
"LeaName": "Worcestershire",
"GovernmentOfficeCode": "F",
"GovernmentOfficeName": "West Midlands",
"WestminsterConstituencyCode": "505",
"WestminsterConstituencyName": "West Worcestershire",
"WestminsterMP": "Sir Michael Spicer",
"WestminsterParty": "Conservative",
"Distance": "0",
"WestminsterConstituencyCode2010": "505",
"WestminsterConstituencyName2010": "West Worcestershire"
}
]
}GovernmentData: Postzon RetrieveByCoordinates
Find nearest UK postcode and government data from coordinates. Returns ONS codes, NHS areas, constituencies, wards, and administrative boundaries.
GET
/
GovernmentData
/
Postzon
/
RetrieveByCoordinates
/
v1.20
/
json6.ws
GovernmentData_Postzon_RetrieveByCoordinates
curl --request GET \
--url 'https://api.addressy.com/GovernmentData/Postzon/RetrieveByCoordinates/v1.20/json6.ws?Key='import requests
url = "https://api.addressy.com/GovernmentData/Postzon/RetrieveByCoordinates/v1.20/json6.ws?Key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.addressy.com/GovernmentData/Postzon/RetrieveByCoordinates/v1.20/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/RetrieveByCoordinates/v1.20/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/RetrieveByCoordinates/v1.20/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/RetrieveByCoordinates/v1.20/json6.ws?Key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.addressy.com/GovernmentData/Postzon/RetrieveByCoordinates/v1.20/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": [
{
"Postcode": "WR2 6NJ",
"Easting": "381600",
"Northing": "259400",
"Latitude": "52.2325",
"Longitude": "-2.2709",
"OsGrid": "SO 81600 59400",
"CountryCode": "064",
"CountryName": "England",
"CountyCode": "47",
"CountyName": "Worcestershire",
"DistrictCode": "47UC",
"DistrictName": "Malvern Hills",
"WardCode": "47UCHW",
"WardName": "Hallow",
"NhsShaCode": "Y51",
"NhsShaName": "North, Midlands and the East Programme for IT (NMEPFiT)",
"NhsPctCode": "5PL",
"NhsPctName": "Worcestershire PCT",
"LeaCode": "885",
"LeaName": "Worcestershire",
"GovernmentOfficeCode": "F",
"GovernmentOfficeName": "West Midlands",
"WestminsterConstituencyCode": "505",
"WestminsterConstituencyName": "West Worcestershire",
"WestminsterMP": "Sir Michael Spicer",
"WestminsterParty": "Conservative",
"Distance": "0",
"WestminsterConstituencyCode2010": "505",
"WestminsterConstituencyName2010": "West Worcestershire"
}
]
}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.
A postcode or coordinates (latitude, longitude or easting, nothing) of the centre of the search.
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

