Posted on Leave a comment

Addressian for Woocommerce WordPress Plugin

We have finally released our Woocommerce plugin. You can install/download it from the WordPress plugins page.


It’s finally here! We have been working hard to create a plugin so our customers could easily integrate their WordPress/Woocommerce shops with Addressian. Nothing explains how something works better than some images:

Address Finder by Postcode mode:



Address Autocomplete mode:



If you are still interested, head over to your Plugins’ page in WordPress backend, and search for “Addressian for Woocommerce”. You are guaranteed to be up and running in a few minutes!



Posted on Leave a comment

How to create a basic postcode lookup or address finder field using easy-autocomplete

There are many ways you could make a REST call to our services and there are tons of libraries in many languages that facilitate this.

On the home page of Addressian, there is a demo section that implements “search-as-you-type”. Here is how that is implemented:


We use a Javascript library called easy-autocomplete.

Add the dependencies to your HTML page’s header section:

<script src=""></script>
<script src=""></script>
<link rel="stylesheet" href="">

Then create a section in your HTML form with an “input” element inside it:

<section class="easy-autocomplete">
  <input id="tags" type="text" autocomplete="off" placeholder="Search...">

Then add this bit of Javascript, anywhere in your HTML source code:

  $(function() {
   var selectItem = function(event, ui) {
    return false;
   var options = {
    url: function(phrase) {
     return "" + phrase;
    ajaxSettings: {
     headers: {
      'x-api-key': '[your_api_key]'
    getValue: function(element) {
     return element.address.join(", ") + ", " + element.citytown + ", " + element.postcode;
    theme: "blue-light",
    placeholder: "Type an address in here..",
    list: {
     maxNumberOfElements: 20,
     onClickEvent: function() {
      alert("The postcode of the item you clicked on was " + $("#tags").getSelectedItemData().postcode);


Retrieve addresses from a postcode

Add the dependency to your HTML page’s header section:

<script src=""></script>

Then create a section in your HTML form with an “input” element inside it:

<section class="easy-autocomplete">
  <input id="postcode" type="text" autocomplete="off" placeholder="search...">
  <button id="postcode-go">Go</button>
  <select id="postcode-dropdown" hidden=""></select>

Then add this bit of Javascript, anywhere in your HTML source code:

  jQuery("#postcode-go").click(function() {

   if (jQuery("#postcode").val() == '') {
   let dropdown = jQuery('#postcode-dropdown');
   dropdown.append('<option selected="true" disabled>Choose your address</option>');
   dropdown.prop('selectedIndex', 0);
   dropdown.change(function() {

    var selectedAddress = JSON.parse($(this).children("option:selected").val());
    alert("The selected address is: " + selectedAddress.address + " And city is: " + selectedAddress.citytown);
   const url = '';
    beforeSend: function(request) {
     request.setRequestHeader("x-api-key", '[your_api_key]');
    dataType: "json",
    url: "" + jQuery("#postcode").val(),
    success: function(data) {
     jQuery.each(data, function(key, entry) {
      dropdown.append(jQuery('<option></option>').attr('value', JSON.stringify(entry)).text(entry.address.join(', ')));
   jQuery.getJSON("", function(data) {});

Posted on Leave a comment

How to make a basic REST call in 8 different languages

To get you started, here are some examples for making a basic REST HTTP call, in 12 languages:


   OkHttpClient client = new OkHttpClient();
   Request request = new Request.Builder()
     .addHeader(“x-api-key”, “[your_api_key]”)
   Response response = client.newCall(request).execute();

   HttpResponse<String> response = Unirest.get(“[your_address]”)
     .header(“x-api-key”, “[your_api_key]”)


   curl –request GET \
     –url ‘[your_address]’ \
     –header ‘x-api-key: [your_api_key]’


   wget –quiet \
     –method GET \
     –header ‘x-api-key: [your_api_key]’ \
     –output-document \
     – ‘[your_address]’


   var data = null;

   var xhr = new XMLHttpRequest();
   xhr.withCredentials = true;

   xhr.addEventListener(“readystatechange”, function () {
     if (this.readyState === this.DONE) {
   });“GET”, “[your_address]”);
   xhr.setRequestHeader(“x-api-key”, “[your_api_key]”);


   var settings = {
     “async”: true,
     “crossDomain”: true,
     “url”: “[your_address]”,
     “method”: “GET”,
     “headers”: {
     “x-api-key”: “[your_api_key]”

   $.ajax(settings).done(function (response) {



      $curl = curl_init();

        curl_setopt_array($curl, array(
        CURLOPT_URL => “[your_address]”,
        CURLOPT_ENCODING => “”,
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTPHEADER => array(
        “x-api-key: [your_api_key]”

      $response = curl_exec($curl);
     $err = curl_error($curl);


      if ($err) {
         echo “cURL Error #:” . $err;
      } else {
         echo $response;

pecl/http v2


     $client = new http\Client;
     $request = new http\Client\Request;

        ‘x-api-key’ => ‘[your_api_key]

     $response = $client->getResponse();

     echo $response->getBody();


   var client = new RestClient(“[your_address]”);
   var request = new RestRequest(Method.GET);
   IRestResponse response = client.Execute(request);

Python 3

   import http.client

   conn = http.client.HTTPSConnection(“”)
   headers = { ‘x-api-key’: “[your_api_key]” }
   conn.request(“GET”, “/address/[your_address]”, headers=headers)
   res = conn.getresponse()
   data =



   var http = require(“https”);

   var options = {
      “method”: “GET”,
      “hostname”: “”,
      “port”: null,
      “path”: “/address/[your_address]”,
      “headers”: {
         “x-api-key”: “[your_api_key]”

   var req = http.request(options, function (res) {
   var chunks = [];

   res.on(“data”, function (chunk) {

   res.on(“end”, function () {
      var body = Buffer.concat(chunks);


Posted on Leave a comment

What is a UK postcode made up of?

A Postcode is made up of the following elements:


PO the area. There are 124 postcode areas in the UK
1 the district. There are approximately 20 Postcode districts in an area
3 the sector. There are approximately 3000 addresses in a sector.
AX the Unit. There are approximately 15 addresses per unit.

The following list shows all valid Postcode formats. “A” indicates an alphabetic character and “N” indicates a numeric character.

Format Example

Please note the following:

  • The letters Q, V and X are not used in the first position
  • The letters I,J and Z are not used in the second position.
  • The only letters to appear in the third position are A, B, C, D, E, F, G, H, J, K, S, T, U and W.
  • The second half of the postcode is always consistent numeric, alpha, alpha format and the letters C, I, K, M, O and V are never used.

Elements of a Postcode
The first part of the Postcode eg PO1 is called the outward code as it identifies the town or district to which the letter is to be sent for further sorting.

The second part of the postcode eg 1EB is called the inward code. This identifies the particular sector in the town or district to which the letter has been delivered and a thoroughfare, part of a thoroughfare or an individual address within that sector. The maximum number of delivery points covered by one postcode is 100 and the average is 15.

Postcode Area – this is the largest geographical unit of the postcode. Each one comprises one or two alpha
characters generally chosen to be a mnemonic of the area eg MK for Milton Keynes, SO for Southampton. There are currently 124 Postcode areas including Guernsey (GY) Jersey (JE) and the Isle of Man (IM)
Postcode District – Each postcode area is divided into a number of districts which are represented by the numerical portion of each part of the postcode. These numbers range from 0 to 99 eg MK42. In London a further alpha character is used to divide some districts into sub divisions eg EC1A.
Postcode sectors – Sectors are numbered 1,2,3,4,5,6,7,8,9,0. It should be noted that when sorting postcodes into
order, sector 0 is the tenth sector rather than the first.

(These conventions may change if operationally required.)

Posted on Leave a comment

Address lookup with postcode OR Search as user types

Typically, there are two common types of address lookup used on the internet: 

  1. User enters a postcode, presses a button, and the website retrieves a list of addresses associated with that postcode. The user chooses one of them, and the web form fills the form automatically.
  2. The user enters their postcode, along with a house/flat number and presses Search. The service then finds the best match(es) for that search and shows the user a list to choose from. The user picks one and the website automatically fills the form

Our service works in a similar fashion, with a few improvements:

  • Addressian automatically determines if the user has entered a postcode to get a list to choose from, or just typing their address naturally e.g. “45a sealey drive”. As a developer you would only use one API for both.
  • Our servers are fast. We user Amazon AWS servers and continually add resources to them, or buy more servers, and we do this proportionally to the number of customers and their volume.
  • Our prices are unbeatable! We give you 20,000 api calls a month, so you don’t have to worry about your quota. Use it to implement a search-as-you-type address finder in your online forms, and benefit from an improved conversion rate when customers are able to find their address with only a few characters. There are very few websites who actually offer this type of address entering.

We are extremely fast in searching 32 million UK addresses. We are even extremely faster when you just want to retrieve a list of addresses from a postcode.

Give Addressian a go. The free trial (activated in only 5 minutes) is more than enough to have a play around and use it to integrate an address finding system with your website forms.