Get GB Postcode Data API will return all the available data for the supplied UK postcode.
The Get GB Postcode Data API endpoint won't change. It can be set as a constant.
curl -v "https://api.autoaddress.ie/2.0/getgbpostcodedata?key=YOUR_KEY
&postcode=YOUR_UK_POSTCODE"
$.ajax({
type: "GET",
dataType: "jsonp",
url: "https://api.autoaddress.ie/2.0/getgbpostcodedata",
data : {
key: "YOUR_KEY",
postcode: "YOUR_UK_POSTCODE"
},
success: function(data){
//do something with data
}
});
$http.jsonp('https://api.autoaddress.ie/2.0/getgbpostcodedata',{
params: {
key: "YOUR_KEY",
postcode: "YOUR_UK_POSTCODE"
}
}).success(function(data){
//do something with data
});
require 'json'
require 'net/http'
uri = URI.parse("https://api.autoaddress.ie/2.0/getgbpostcodedata?key=YOUR_KEY&postcode=YOUR_UK_POSTCODE")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
response = http.get(uri.request_uri)
result = JSON.parse(response.body)
import json
import urllib2
Response = urllib2.urlopen ("https://api.autoaddress.ie/2.0/getgbpostcodedata?key=YOUR_KEY&postcode=YOUR_UK_POSTCODE")
jsonResult = json.load(Response)
using System.IO;
using System.Net;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.autoaddress.ie/2.0/getgbpostcodedata?key=YOUR_KEY&postcode=YOUR_UK_POSTCODE");
request.Method = WebRequestMethods.Http.Get;
request.Accept = "application/json";
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
var result = new StreamReader(response.GetResponseStream()).ReadToEnd();
}
The following is a sample JSON response returned for a Get GB Postcode Data API request.