Geocoding with postcode-level data

Returns latitude and longitude coordinates (ETRS89 / WGS84 / Google Maps format) and grid references from a postcode (e.g. NR14 7PZ).

Lookup cost: 0.9 credits

UK geocoding with JavaScript example

See the Pen UK geocoding with Javascript by Allies Computing (@alliescomputing) on CodePen.

Additional example code

API reference

If you want to customise our examples, create your own user interface or integrate our API on another platform, you can find all the request parameters and response details below.

If you require further help or have any questions feel free to contact our support team.

Request structure

http://ws.postcoder.com/pcw/[api-key]/position/uk/[postcode]

Optional parameters

format xml | json (default unless header of application/xml is detected)

Notes

  • Multiple items may be returned depending on your search criteria.
  • Include street-level address data using /geo/ rather than /position/ in the request | Lookup cost: 1.9 credits
  • Include premise-level address data using /addressgeo/ rather than /position/ in the request | Lookup cost: 2.4 credits
  • All fields should be treated as optional

Response examples

Request: http://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/position/uk/NR147PZ?format=json - View live response

[
    {
        "latitude":"52.5859714116",
        "longitude":"1.3492192897",
        "grideasting":"626980",
        "gridnorthing":"303951"
    }
]

Request: http://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/position/uk/NR147PZ?format=xml - View live response

<Addresses xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Address>
        <latitude>52.5859714116</latitude>
        <longitude>1.3492192897</longitude>
        <grideasting>626980</grideasting>
        <gridnorthing>303951</gridnorthing>
    </Address>
</Addresses>

Response field descriptions

Field name Data type Description Example
latitude Float Latitude coordinate value 52.5859714116
longitude Float Longitude coordinate value 1.3492192897
grideasting Integer Ordnance Survey Easting coordinate at 1m precision in units of 1m 626980
gridnorthing Integer Ordnance Survey Northing coordinate at 1m precision in units of 1m 303951