UDPRN lookup

Returns a full UK address that matches a user provided UDPRN code (i.e. 17448021).

Includes the latest address data from Royal Mail, updated daily.

Lookup cost: 2 credits

Request structure

http://ws.postcoder.com/pcw/[api-key]/udprn/[udprn]

Optional parameters

lines The number of lines over which to split each address
include Include extra address fields within the address lines returned (see above)
exclude Exclude address fields within the address lines returned (see above)
format xml | json (default unless header of application/xml is detected)
identifier Identify your lookups to make debugging and reviewing stats easier
callback Use to specify the name of your JSONP callback function

Notes

  • Returns a single address
  • Empty address fields are not returned in the response, so all fields should be treated as optional

Response examples

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

[
    {
        "summaryline": "Allies Computing Ltd, Manor Farm Barns, Fox Road, Framingham Pigot, Norwich, Norfolk, NR14 7PZ",
        "organisation": "Allies Computing Ltd",
        "buildingname": "Manor Farm Barns",
        "premise": "Manor Farm Barns",
        "street": "Fox Road",
        "dependentlocality": "Framingham Pigot",
        "posttown": "Norwich",
        "county": "Norfolk",
        "postcode": "NR14 7PZ"
    }
]

Request: http://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/udprn/17448021?lines=2&format=xml - View live response

<Addresses xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Address>
        <addressline1>Allies Computing Ltd</addressline1>
        <addressline2>Manor Farm Barns, Fox Road, Framingham Pigot</addressline2>
        <summaryline>
        Allies Computing Ltd, Manor Farm Barns, Fox Road, Framingham Pigot, Norwich, Norfolk, NR14 7PZ
        </summaryline>
        <organisation>Allies Computing Ltd</organisation>
        <buildingname>Manor Farm Barns</buildingname>
        <premise>Manor Farm Barns</premise>
        <street>Fox Road</street>
        <dependentlocality>Framingham Pigot</dependentlocality>
        <posttown>Norwich</posttown>
        <county>Norfolk</county>
        <postcode>NR14 7PZ</postcode>
    </Address>
</Addresses>

Request: http://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/udprn/17448021?lines=2&format=json - View live response

[
    {
        "addressline1": "Allies Computing Ltd",
        "addressline2": "Manor Farm Barns, Fox Road, Framingham Pigot",
        "summaryline": "Allies Computing Ltd, Manor Farm Barns, Fox Road, Framingham Pigot, Norwich, Norfolk, NR14 7PZ",
        "organisation": "Allies Computing Ltd",
        "buildingname": "Manor Farm Barns",
        "premise": "Manor Farm Barns",
        "street": "Fox Road",
        "dependentlocality": "Framingham Pigot",
        "posttown": "Norwich",
        "county": "Norfolk",
        "postcode": "NR14 7PZ"
    }
]

Request: http://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/udprn/17448021?addtags=localauthorityname,electoralwardname,electoralcountyname - View live response

[
    {
        "summaryline": "Allies Computing Ltd, Manor Farm Barns, Fox Road, Framingham Pigot, Norwich, Norfolk, NR14 7PZ",
        "organisation": "Allies Computing Ltd",
        "buildingname": "Manor Farm Barns",
        "premise": "Manor Farm Barns",
        "street": "Fox Road",
        "dependentlocality": "Framingham Pigot",
        "posttown": "Norwich",
        "county": "Norfolk",
        "postcode": "NR14 7PZ",
        "latitude": "52.5859730797",
        "longitude": "1.3491603533",
        "grideasting": "626976",
        "gridnorthing": "303951",
        "localauthorityname": "South Norfolk",
        "electoralcountyname": "Norfolk",
        "electoralwardname": "Poringland with the Framinghams"
    }
]

Response field descriptions

Field name Data type Description Example
summaryline String Complete postal address in a single line with commas separating the elements. Allies Computing Ltd, Manor Farm Barns, Fox Road, Framingham Pigot, Norwich, Norfolk, NR14 7PZ
pobox String PO Box
organisation String Organisation Allies Computing Ltd
departmentname String Department name
buildingname String Building name Manor Farm Barns
subbuildingname String Sub Building name
number String Number
premise String Composite of all premise level elements including department, building name, sub building name, number and PO Box where applicable. Manor Farm Barns
dependentstreet String Dependent street
street String Street Fox Road
doubledependentlocality String Double dependent locality
dependentlocality String Dependent locality Framingham Pigot
posttown String Post town Norwich
county String County Norfolk
postcode String Postcode NR14 7PZ
recodes String Colon separated list of the previous postcode, previous delivery point suffix and the date it changed (YYYYMM format)

Paging

Up to 100 results can be returned at a time, in response to a lookup. If there are more results beyond the current page, the last result will include a morevalues field with a value of true.
We also include a nextpage field with the number of the next page, so you can easily append ?page=[nextpage] to your request.

Notes:

  • First page = 0, second page = 1 etc...
  • If there are no more results beyond the current page, the morevalues field will not be present