Features:
Competitive pricing
No set-up Charges
Over 99.99% Availability
Free Trial Software
Free Technical Support
Try before you buy
Local or Internet Data
Reseller Opportunities
    Postcode finder using data supplied by royal mail
Updated Daily

Postcode Programming API Get Long/Lat from HTTP/XML Web Service using PostZon Data:


This call, to HTTP/XML Web Service, will retrieve the PostZon Data for a given Postcode, OSRef, Longtitude/Latitude or by Town. This PostZon data is collected from many different source by the Royal mail. The most useful information is Distance from Home Postcode, Longitude and Latitude.

Distance between two postcodes

The distance between two postcodes can be returned. Simply call with Postcode and “Home postcode” provided in the parameters. Our service will then return the distance in km.  So approximate charges could be applied to a customer based on the straight line distance.

Postcode to Longitude/Latitude

This is the main use of PostZon data. Simply call with the target Postcode and the PostZon data service will return the Longitude and Latitude. Ideal for mapping and calculating distances.

Longitude/Latitude to Postcode

To get the PostZon record by Longtitude/Latitude, (closest within 10Km) set postcode to the "Longtitude|Latitude" (separated by |). The Postcode found will be returned in pz_postcode.

Town to Longitude/Latitude

To get the Longitude and Latitude of a Town, simply provide the Town name + “,SPACE“ + County in the postcode field. The Longitude and Latitude will then be returned. It is suggested that the town list is displayed using a AJAX search box.


Get PostZon Data from HTTP/XML Web Service:


To get a "Postzon" Geographical Data address from our HTTP/XML Web Service we do the following:

Step 1 Sign up for free 30 day trial

Simply use the "Sign Up for Trial" link at top right of this page to open a trial account.   We will then send you a data key, which is used to identify your account, when using the following service.

 Step 2 Call XMLService/XMLSearchForPostZonData.aspx to get PostZon record

This call will retrieve the PostZon Data for a given Postcode, OSRef, Longtitude/Latitude or by Town. This PostZon data is collected from many different source by the Royal mail. The most useful information is Distance (in Km) from Home Postcode, Longitude and Latitude.

Parameters

Parameter name Description
DataKey Datakey, which is available when account has been created, under the “DataKey” tab of the online account administrator page.
Username Only needed if for internal postcode address use
version Set 1, this allows us to change XML structure without effecting you software
ip IP Address of client. This is optional. We monitor address queries and have had cases where client’s web sites have been used repeatly by one person. Specifying the IP address of each client allows to monitor and block such queries.
Postcode Postcode to search for. OR...
To get the PostZon record by OSRef, simply set postcode to the OSRef.
To get the PostZon record by Longtitude/Latitude, (closest within 10Km) set postcode to the "Longtitude|Latitude" (separated by |). The Postcode found will be returned in pz_postcode.
To get the Longitude and Latitude of a Town, simply provide the Town name + “,SPACE“ + County in the postcode field. The Longitude and Latitude will then be returned. It is suggested that the town list is displayed using a AJAX search box.

[Download town list]

homepostcode To calculate the distance to another postcode, supply the HOME postcode here, this is optional

Example:

Call HTTP web service with your data key, which is e-mail to you when you open an account, and postcode.

www.simplylookupadmin.co.uk/XMLservice/XMLSearchForPostZonData.aspx?datakey=Your Data key
&postcode=pe132ql&version=1&homepostcode=BS20 6EL

   Returns


<?xml version="1.0" ?>
<data>
   <confirm>Yes</confirm>
   <demoon>0</demoon>
   <credits_display_text>Evaluation expires 10 May 2011</credits_display_text>
   <credits_display_color>0</credits_display_color>
   <credits_display_size>12</credits_display_size>
   <credits_display_bold>0</credits_display_bold>
   <credits_display_showbutton>1</credits_display_showbutton>
   <co_customerchargeoption>0</co_customerchargeoption>
   <accountadminpage>https://www.simplylookupadmin.co.uk/WebAccountLogin.aspx?
                     doid=1&amp;amp;coid=3333305462&amp;amp;Pay=yes</accountadminpage>


   <record>
      <pz_introductiondate>19880254</pz_introductiondate>
      <pz_gridrefeast>54630</pz_gridrefeast>
      <pz_gridrefnorth>30910</pz_gridrefnorth>
      <pz_county>12,Cambridgeshire</pz_county>
      <pz_district>UD,Fenland District</pz_district>
      <pz_ward>GT,Medworth Ward</pz_ward>
      <pz_usertype>0,Small User</pz_usertype>
      <pz_gridstatus>1,Within building</pz_gridstatus>
      <pz_country>064,England</pz_country>
      <pz_wardstatus>1</pz_wardstatus>
      <pz_nhs_code>Q35,East of England</pz_nhs_code>
      <pz_nhs_region>Y51,</pz_nhs_region>
      <pz_latitude_wgs84>52.659857</pz_latitude_wgs84>
      <pz_longitude_wgs84>0.1617</pz_longitude_wgs84>
      <pz_osreference>TF4630009100</pz_osreference>
      <pz_geodistancetohomepostcode>239</pz_geodistancetohomepostcode>
      <pz_postcode>PE132QL</pz_postcode>
   </record>
</data>

 

Returns

If address returned then <found>=1, else <found>=0,error in <errormessage>

  Note: The <pz_geodistancetohomepostcode> contains the distance between:

  • &postcode=PE132QL
  • &homepostcode=BS20 6EL

Expressed in the parameters. If the optional &homepostcode parameter is omitted then this will be 0.

Parameters

Name Description
data Data regarding the status of the account
record Address information

Element : “record” PostZon Data:

Name Description
pz_postcode Postcode in the PostZon record
pz_found Found Yes or No
If no all data is null
pz_latitude_wgs84 Latitude.
This equals zero if not co-ordinates are available, see extra notes below


pz_longitude_wgs84 Longitude
pz_geodistancetohomepostcode Distance from HOME postcode in Kilometres
-1 = Error
pz_osreference The OSGB36 part of the name refers to the geodetic
pz_gridrefeast Ordnance Survey 100m Easting and Northing measurements that refer to the distance east and north from a fixed point just South West of the Isles of Scilly. They indicate the mean centre point of a Postcode to 100m.

More information on PostZon data, including detail information about the data returned.

Step 4 Testing

Final step is to test, to enable easy testing please use our special test postcodes.


Data Returned:


This type of license returns: (see example below)

  • pz_postcode
  • pz_found
  • pz_latitude_wgs84
  • pz_longitude_wgs84
  • pz_geodistancetohomepostcode (Distance from "Home Postcode" in km)
  • pz_gridstatus  (accuracy of the geographic data)
  • pz_osreference       

More infromation on PostZon data retuned