Data8 Logo

Migration from GetAddress Autocomplete API

The like for like service for GetAddress's Autocomplete API is the PredictiveAddress web service.

Whilst GetAddress uses a two-step process for autocomplete, which involves getting address suggestions given user input and then resolving the selected suggestion into a full address, Data8 offers a similar, yet more powerful process, by additionally allowing you to drill down into results, giving much richer user experience.

Key Differences

Feature GetAddress Data8
Search Endpoint /autocomplete/{term} /PredictiveAddress/Search.json
Drill Down Endpoint N/A /PredictiveAddress/DrillDown.json
Retrieve Endpoint /get/{id} /PredictiveAddress/Retrieve.json
HTTP Method GET POST
Authentication api-key=your-api-key key=your-api-key

As well as API Keys, we also offer authentication via Username and Password, and JWT.

Please see the PredictiveAddress documentation page for more details.

Steps

1. Update Searching Endpoint

GetAddress uses GET based endpoints, where Data8 uses POST based endpoints. This allows for much finer-grained control over requests, and which results are returned.

GetAddress:

GET https://api.getaddress.io/autocomplete/{term}?api-key=YOUR_KEY

Data8:

POST https://webservices.data-8.co.uk/PredictiveAddress/Search.json
Content-Type: application/json

Body

{
  "country": "GB",
  "search": "Stanney Mill"
}

2. Find a PredictiveAddress ID

GetAddress and Data8 both use ID's - the response body to find them however is a little different in structure.

  • GetAddress: Suggestions in suggestions array, display text in address field
  • Data8: Suggestions in Results array, display text in label field

GetAddress

{
  "suggestions": [
    {
      "address": "10 Downing Avenue, Guildford, Surrey, GU2 7SY",
      "url": "/get/VGp4ZzNrNXZMbVJ5OG1UcWg3YjJGNA",
      "id": "VGp4ZzNrNXZMbVJ5OG1UcWg3YjJGNA"
    },
    {
      "address": "10 Downing Close, Bradford, West Yorkshire, BD3 0QT",
      "url": "/get/UXdlOXJwTDJuNGNaM3hKaDF2OGtTNg",
      "id": "UXdlOXJwTDJuNGNaM3hKaDF2OGtTNg"
    }
  ]
}

Data8

{
  "Results": [
    {
      "label": "10 Downing Street, FARNHAM, Surrey, GU9 ",
      "value": "A422983771|CC=GB;PAF=2026.2.4.1480207",
      "container": true,
      "items": 2
    },
    {
      "label": "10 Downing Avenue, GUILDFORD, Surrey, GU2 ",
      "value": "PC6ezdv02dKvcx+U6YZa8EWg|CC=GB;PAF=2026.2.4.1480207",
      "container": false,
      "items": 1
    }
  ]
}

Conversion

There is a small difference in content response:

GetAddress

const suggestions = data.suggestions;
const firstSuggestion = suggestions[0];
const displayText = firstSuggestion.address;
const suggestionId = firstSuggestion.id;

Data8

const suggestions = data.Results;
const firstSuggestion = suggestions[0];
const displayText = firstSuggestion.label;
const suggestionId = firstSuggestion.value;
const suggestionDrillable = firstSuggestion.container;
const suggestionItems = firstSuggestion.items;

3. Drilling Down into Containers (New)

If the response indicates that an item is a container, you can drill down into the results of that container, using the DrillDown endpoint. You can treat the response in the same manner as from the Search endpoint.

POST https://webservices.data-8.co.uk/PredictiveAddress/DrillDown.json?key=your_api_key
Content-Type: application/json

Body

{
  "country": "GB",
  "id": "A422983771|CC=GB;PAF=2026.2.4.1480207"
}

Response

{
  "Status": {
    "Success": true,
    "ErrorMessage": null,
    "CreditsRemaining": 29
  },
  "Results": [
    {
      "label": "Over The Moon Tattoo, 10 Downing Street, FARNHAM, Surrey, GU9 ",
      "value": "PCiegZTrmpnLQQ1g/E6gW9zA|CC=GB;PAF=2026.2.4.1480207",
      "container": false,
      "items": 1
    },
    {
      "label": "Flat, 10 Downing Street, FARNHAM, Surrey, GU9 ",
      "value": "PCBWVMH2uQKPTSi9LI8pAa9Q|CC=GB;PAF=2026.2.4.1480207",
      "container": false,
      "items": 1
    }
  ],
  "Count": 2,
  "SessionID": null
}

4. Update Address Resolve Endpoint

GetAddress

GET https://api.getaddress.io/get/{id}?api-key={api-key}

Response

{
    "postcode": "NN1 3ER",
    "latitude": 52.24593734741211,
    "longitude": -0.891636312007904,
    "formatted_address": [
        "10 Watkin Terrace",
        "",
        "",
        "Northampton",
        "Northamptonshire"
     ],
    "thoroughfare":  "Watkin Terrace",
    "building_name":  "",
    "sub_building_name":  "",
    "sub_building_number":  "",
    "building_number":  "10",
    "line_1":  "10 Watkin Terrace",
    "line_2":  "",
    "line_3":  "",
    "line_4":  "",
    "locality":  "",
    "town_or_city":  "Northampton",
    "county":  "Northamptonshire",
    "district":  "Northampton",
    "country":  "England",
    "residential":  true
}

Data8

POST https://webservices.data-8.co.uk/PredictiveAddress/Retrieve.json?key=your_api_key
Content-Type: application/json

Body

{
  "country": "GB",
  "id": "PC6ezdv02dKvcx+U6YZa8EWg|CC=GB;PAF=2026.2.4.1480207",
}

Response

{
  "Status": {
    "Success": true,
    "ErrorMessage": null,
    "CreditsRemaining": 99
  },
  "Result": {
    "Address": {
      "Lines": [
        "10 Downing Avenue",
        "",
        "",
        "",
        "GUILDFORD",
        "Surrey",
        "GU2 7SY"
      ]
    },
    "RawAddress": {
      "Organisation": "",
      "Department": "",
      "AddressKey": 33833238,
      "OrganisationKey": 0,
      "PostcodeType": "S",
      "BuildingNumber": 10,
      "SubBuildingName": "",
      "BuildingName": "",
      "DependentThoroughfareName": "",
      "DependentThoroughfareDesc": "",
      "ThoroughfareName": "DOWNING",
      "ThoroughfareDesc": "AVENUE",
      "DoubleDependentLocality": "",
      "DependentLocality": "",
      "Locality": "GUILDFORD",
      "Postcode": "GU2 7SY",
      "Dps": "2D",
      "PoBox": "",
      "PostalCounty": "SURREY",
      "TraditionalCounty": "SURREY",
      "AdministrativeCounty": "SURREY",
      "CountryISO2": "GB",
      "UniqueReference": null,
      "Location": {
        "Easting": 497810,
        "Northing": 149745,
        "GridReference": "SU978497",
        "Longitude": -0.6002693,
        "Latitude": 51.2385077,
        "CountyCode": "E10000030",
        "County": "Surrey County",
        "DistrictCode": "E07000209",
        "District": "Guildford District",
        "WardCode": "E05014954",
        "Ward": "Onslow",
        "Country": "England",
        "Constituency": null
      },
      "AdditionalData": [
        {
          "Name": "LatLongType",
          "Value": "Building"
        }
      ]
    }
  }
}

Field Mapping

The structure for a returned match is different and contains more information than the GetAddress equivalent. The Data8 response contains an Address array, containing the formatted address, and RawAddress object that contains detailed information about the address.

A full mapping table is provided here:

GetAddress Data8
postcode RawAddress.Postcode
latitude RawAddress.Location.Latitude
longitude RawAddress.Location.Longitude
formatted_address[] Address.Lines[]
thoroughfare RawAddress.ThoroughfareName + RawAddress.ThoroughfareDesc
building_name RawAddress.BuildingName
sub_building_name RawAddress.SubBuildingName
sub_building_number Not supplied by Data8 or PAF.
building_number RawAddress.BuildingNumber
line_1 Address.Lines[0]
line_2 Address.Lines[1]
line_3 Address.Lines[2]
line_4 Address.Lines[3]
locality RawAddress.Locality
town_or_city RawAddress.Locality
county RawAddress.AdministrativeCounty (fallback: RawAddress.PostalCounty)
district RawAddress.Location.District
country RawAddress.Location.Country
residential Not explicitly supplied by Data8

Need Help?

We are available 9am to 5:30pm UK time by phone +44 (0)151 355 4555 or email helpdesk@data-8.co.uk for migration assistance.

An error has occurred. This application may no longer respond until reloaded. Reload 🗙