CraftyClicks.co.uk

Postcode/address finder XML API - user guide

This is a generic user guide to accessing our XML API. The XML API gives access to the RapidAddress and BasicAddress products. Feel free to contact us should you need any help with integration.

Making a request

The lookup server is accessed via HTTP, the base URI is:

  pcls1.craftyclicks.co.uk/xml/

Endpoints

Each product has a dedicated endpoint:

ProductFull URI
RapidAddresspcls1.craftyclicks.co.uk/xml/rapidaddress
BasicAddresspcls1.craftyclicks.co.uk/xml/basicaddress

Parameters

ParameterRequiredDescription
postcodeyesUK postcde to be looked up, upper or lower case, can have spaces
keyyes/noyour access token; required for access to real data, optional only for access to free postcodes
responsenoresponse format: paf_compact (default) or data_formatted
linesnonumber of address lines, only applies if response = data_formatted, default is 2, maximum is 3

Response format

Best way to see what the response XML looks like is to simply try a few requests in your browser. Here is a few examples of how to format the requests. The 'key' parameter is left out for clarity, the free postcodes are used.

RapidAddress (Full PAF, premise level data):

BasicAddress (Part PAF, street level data):

A few bad requests, returning errors:

Protocols available

The XML API is available via SSL as well. Prefix the URI with 'http://' or 'https://' as needed. We recommend using SSL only when necessary, it attracts a performance penalty.

Error codes

CodeReason
0001Postcode not found
0002Invalid postcode format
7001Demo limit exceeded
8001Invalid or no access token
8003Account credit allowance exceeded
8004Access denied due to access rules
8005Access denied, account suspended
9001Internal server error