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.
The lookup server is accessed via HTTP, the base URI is:
pcls1.craftyclicks.co.uk/xml/
Each product has a dedicated endpoint:
| Product | Full URI |
| RapidAddress | pcls1.craftyclicks.co.uk/xml/rapidaddress |
| BasicAddress | pcls1.craftyclicks.co.uk/xml/basicaddress |
| Parameter | Required | Description |
| postcode | yes | UK postcde to be looked up, upper or lower case, can have spaces |
| key | yes/no | your access token; required for access to real data, optional only for access to free postcodes |
| response | no | response format: paf_compact (default) or data_formatted |
| lines | no | number of address lines, only applies if response = data_formatted, default is 2, maximum is 3 |
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:
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.
| Code | Reason |
| 0001 | Postcode not found |
| 0002 | Invalid postcode format |
| 7001 | Demo limit exceeded |
| 8001 | Invalid or no access token |
| 8003 | Account credit allowance exceeded |
| 8004 | Access denied due to access rules |
| 8005 | Access denied, account suspended |
| 9001 | Internal server error |