Our Open API Address Finder JSON Web Service provides Postcode, Postcode + Part of address or words "search as you type" using JSON Web service.
getaddresslist()
getselectedaddress()
The following can be pasted into Chat GPT to write code for your specific languages/platforms. We have an example of this code for a c# desktop app View Postcode Address Finder Example on Git Hub
First in c# .Net App we created a form with:
textBoxFind
listBoxAddressLines
textBoxAddress
labelInstructions
Note also we are calling full_v3/getaddresslist with &options=B which will Add <b> and </b> around the results matching text. You may not want this.
full_v3/getaddresslist
&options=B
<b>
</b>
Simply change "In c#, .net 4.8 Windows app, " to what ever ... and ask chat GPT...
Generate Example in Chat GPT or Similar In c#, .net 4.8 Windows app, I need to add to a text box "textBoxFind" to perform a search, which calls an API given at https://api.simplylookupadmin.co.uk. I would suggest on key up event, of this textbox, if user stops typing for 300 ms call "https://api.simplylookupadmin.co.uk/full_v3/getaddresslist?data_api_Key=APIKEY&query=texttosearch&options=B" to populate a selection box called "listBoxAddressLines". Example. If texttosearch="PE13 2QL", this API call will return json "{ "results": [ { "Line": "1 Victoria Road Wisbech <b>PE13 2QL</b>", "ID": "11570811_0S" }, { "Line": "10 Victoria Road Wisbech <b>PE13 2QL</b>", "ID": "11570812_0S" }, { "Line": "Victoria Lodge 18 Victoria Road Wisbech <b>PE13 2QL</b>", "ID": "31597197_2535693S" } ], "inputid": 0, "queryid": 0, "processResult": true, "instructionsHtml": "Now enter House Name or Number." "instructionsTxt": "Now enter House Name or Number." "finishword": "" "errormessage": "" }" display this for user selection, and then if the user selects a line, call full_v3/getselectedaddress with api key and ID of line selected. And update "labelInstructions" label with "instructionsHtml" from the json results. Also, if one line is returned in the results, and the user tabs out of the "textBoxFind" text box, we make it select first item as if the user selected it. And the in the results line Bold the text marked with HTML "<b>" starts the bold and "</b>" ends the Bold. When the user selects a line in the results, the API call full_v3/getselectedaddress?data_api_Key=APIKEY&id=Selected line id, will return json "{ "found": true, "error": false, "inputid": 0, "licenseStatus": "DEMO Full Address Data for ZZ until ('08 Dec 2024')", "addressID": "", "organisation": "", "line1": "The Limes", "line2": "27 Victoria Road", "line3": "", "town": "Wisbech", "county": "Cambridgeshire", "postcode": "PE13 2QL", "rawpostcode": "PE132QL", "country": "England", "deliverypointsuffix": "1T", "nohouseholds": "1", "smallorg": "N", "pobox": "", "mailsortcode": "51144", "unique1": "The Limes", "unique2": "27", "propertyNo": "27", "propertyName": "The Limes", "streetName": "Victoria Road", "udprn": "18616525", "userid": "", "geoposition": "52.659857,0.1617", "geolongitude": 0.1617, "geolatitude": 52.659857, "geodistanceinkm": 0, "geodistanceinmiles": 0 }" Then, put the returned address fields "organisation,line1,line2,line3,town,county,postcode, country,found,licenseStatus" into a multiline textbox called "textBoxAddress."
In c#, .net 4.8 Windows app, I need to add to a text box "textBoxFind" to perform a search, which calls an API given at https://api.simplylookupadmin.co.uk. I would suggest on key up event, of this textbox, if user stops typing for 300 ms call "https://api.simplylookupadmin.co.uk/full_v3/getaddresslist?data_api_Key=APIKEY&query=texttosearch&options=B" to populate a selection box called "listBoxAddressLines". Example. If texttosearch="PE13 2QL", this API call will return json "{ "results": [ { "Line": "1 Victoria Road Wisbech <b>PE13 2QL</b>", "ID": "11570811_0S" }, { "Line": "10 Victoria Road Wisbech <b>PE13 2QL</b>", "ID": "11570812_0S" }, { "Line": "Victoria Lodge 18 Victoria Road Wisbech <b>PE13 2QL</b>", "ID": "31597197_2535693S" } ], "inputid": 0, "queryid": 0, "processResult": true, "instructionsHtml": "Now enter House Name or Number." "instructionsTxt": "Now enter House Name or Number." "finishword": "" "errormessage": "" }" display this for user selection, and then if the user selects a line, call full_v3/getselectedaddress with api key and ID of line selected. And update "labelInstructions" label with "instructionsHtml" from the json results. Also, if one line is returned in the results, and the user tabs out of the "textBoxFind" text box, we make it select first item as if the user selected it. And the in the results line Bold the text marked with HTML "<b>" starts the bold and "</b>" ends the Bold. When the user selects a line in the results, the API call full_v3/getselectedaddress?data_api_Key=APIKEY&id=Selected line id, will return json "{ "found": true, "error": false, "inputid": 0, "licenseStatus": "DEMO Full Address Data for ZZ until ('08 Dec 2024')", "addressID": "", "organisation": "", "line1": "The Limes", "line2": "27 Victoria Road", "line3": "", "town": "Wisbech", "county": "Cambridgeshire", "postcode": "PE13 2QL", "rawpostcode": "PE132QL", "country": "England", "deliverypointsuffix": "1T", "nohouseholds": "1", "smallorg": "N", "pobox": "", "mailsortcode": "51144", "unique1": "The Limes", "unique2": "27", "propertyNo": "27", "propertyName": "The Limes", "streetName": "Victoria Road", "udprn": "18616525", "userid": "", "geoposition": "52.659857,0.1617", "geolongitude": 0.1617, "geolatitude": 52.659857, "geodistanceinkm": 0, "geodistanceinmiles": 0 }" Then, put the returned address fields "organisation,line1,line2,line3,town,county,postcode, country,found,licenseStatus" into a multiline textbox called "textBoxAddress."
When this was working, we then asked:
Generate Example in Chat GPT or Similar That's great, can we make "listBoxAddressLines" hidden, and only shown when a search is in progress, also initially set labelInstructions to "Type Postcode, Postcode + Part of address or words to search"
That's great, can we make "listBoxAddressLines" hidden, and only shown when a search is in progress, also initially set labelInstructions to "Type Postcode, Postcode + Part of address or words to search"
Change the address mapping to your address fields. Data Returned by getselectedaddress
On the first call full_v3/getaddresslist Info on getaddresslist
1. queryid - If you are implementing search as you type, you can supply a counter in this parameter, which is returned. This allows you to process the most recent query results and ignore any older responses.
queryid
2. inputid - If you have multiple address forms, you can give each a number, which is returned in the response. Then your response code can then act appropriately.
inputid
On the last call full_v3/getselectedaddress Info on getselectedaddress
full_v3/getselectedaddress
1. homelocation - if set to a valid postcode, or 'lat,long', it will calculate the distance from the Address
homelocation
2. inputid - If you have multiple address forms, you can give each a number, which is returned in the response. Your response code can act appropriately.
3. userid - If used within an organisation by employees of a company with a user-based license, then this should identify the call for data used to count the users. User Name or GUID relating to the user. (must be 8 Chars or More). This is a requirement of the Royal Mail Terms & Conditions. Not required if credit packs are purchased.
userid
These API JSON web service calls are discussed in detail below:
The getaddresslist() API Function gets the list of addresses matching what is typed by the user.
User types in Postcode, Postcode + Part of address or words (search as you type).
Then presses Find button, or you implement a timer based on key up event to fire query 300ms after the last key up event
getaddresslist() is called to get the list to present to user
Open API Web Service - Get List user searches for "PE13 2QL" https://api.simplylookupadmin.co.uk/full_v3/getaddresslist?data_api_Key=YOUR API KEY&query=pe13%202ql
user searches for "PE13 2QL" https://api.simplylookupadmin.co.uk/full_v3/getaddresslist?data_api_Key=YOUR API KEY&query=pe13%202ql
Returns json { "results": [ { "Line": "1 Victoria Road Wisbech PE13 2QL", "ID": "11570811_0S" }, { "Line": "10 Victoria Road Wisbech PE13 2QL", "ID": "11570812_0S" }, And so on... { "Line": "The Limes 27 Victoria Road Wisbech PE13 2QL", "ID": "11570825_0BN" }, { "Line": "Victoria Lodge 18 Victoria Road Wisbech PE13 2QL", "ID": "31597197_2535693S" } ], "inputid": 0, "queryid": 0, "processResult": true, "errormessage": "" }
{ "results": [ { "Line": "1 Victoria Road Wisbech PE13 2QL", "ID": "11570811_0S" }, { "Line": "10 Victoria Road Wisbech PE13 2QL", "ID": "11570812_0S" }, And so on... { "Line": "The Limes 27 Victoria Road Wisbech PE13 2QL", "ID": "11570825_0BN" }, { "Line": "Victoria Lodge 18 Victoria Road Wisbech PE13 2QL", "ID": "31597197_2535693S" } ], "inputid": 0, "queryid": 0, "processResult": true, "errormessage": "" }
User selects from list. The Line ID is then used to get Full Address details + GeoLocation from getselectedaddress()
Open API Web Service - Get Selected Address user selects first item from list, and we also get distance from big ben SW1A0AA https://api.simplylookupadmin.co.uk/full_v3/getselectedaddress?data_api_Key=YOUR API KEY&lineid=11570811_0S&homelocation=SW1A0AA
user selects first item from list, and we also get distance from big ben SW1A0AA https://api.simplylookupadmin.co.uk/full_v3/getselectedaddress?data_api_Key=YOUR API KEY&lineid=11570811_0S&homelocation=SW1A0AA
Returns json { "found": true, "error": false, "inputid": 0, "licenseStatus": "Full PAF 2/2 users", "addressID": "", "organisation": "", "line1": "1 Victoria Road", "line2": "", "line3": "", "town": "Wisbech", "county": "Cambridgeshire", "postcode": "PE13 2QL", "rawpostcode": "PE132QL", "country": "England", "deliverypointsuffix": "1A", "nohouseholds": "1", "smallorg": "N", "pobox": "", "mailsortcode": "51144", "unique1": "1", "unique2": "", "propertyNo": "1", "propertyName": "", "streetName": "Victoria Road", "udprn": "18616510", "userid": "", "geoposition": "52.659857,0.1617", "geolongitude": 0.1617, "geolatitude": 52.659857, "geodistanceinkm": 130.52, "geodistanceinmiles": 81.1 }
{ "found": true, "error": false, "inputid": 0, "licenseStatus": "Full PAF 2/2 users", "addressID": "", "organisation": "", "line1": "1 Victoria Road", "line2": "", "line3": "", "town": "Wisbech", "county": "Cambridgeshire", "postcode": "PE13 2QL", "rawpostcode": "PE132QL", "country": "England", "deliverypointsuffix": "1A", "nohouseholds": "1", "smallorg": "N", "pobox": "", "mailsortcode": "51144", "unique1": "1", "unique2": "", "propertyNo": "1", "propertyName": "", "streetName": "Victoria Road", "udprn": "18616510", "userid": "", "geoposition": "52.659857,0.1617", "geolongitude": 0.1617, "geolatitude": 52.659857, "geodistanceinkm": 130.52, "geodistanceinmiles": 81.1 }
After the address is selected by the user, the Web Address Finder returns the following data.
For 99% of our customers, they only need the following core address data:
★ - Not required by the Royal Mail to send letters and parcels.
The current License status, or error is returned:
The GeoLocation is returned if known within 100 meters. The Open API will also return straight line distance if a home location is specified (Lat/Long or valid postcode):
The Simply Postcode PAF database contains some additional data returned as follows:
Additional Data Example Postcode SW11 1QG returns address: Flat 6 Carrington Court 21 Limburg Road London SW11 1QG United Kingdom unique1 returns "Flat 6" unique2 returns "Carrington Court" PropertyNo returns "21" PropertyName returns "Carrington Court" StreetName returns "Limburg Road"
Postcode SW11 1QG returns address: Flat 6 Carrington Court 21 Limburg Road London SW11 1QG United Kingdom unique1 returns "Flat 6" unique2 returns "Carrington Court" PropertyNo returns "21" PropertyName returns "Carrington Court" StreetName returns "Limburg Road"