MIT
Launch the application, including the dataset, in under a minute with docker
Try the API with postcodesio-client-node
Toggle Democonst PostcodesIO = require("postcodesio-client")
const postcodes = new PostcodesIO();
const postcode = await postcodes.lookup('EC1V 9LB');
console.log(JSON.stringify(postcode, null, 2));
postcode;
const { Address } = require('uk-clear-addressing');
const pafRecord = {
postcode: "WS11 5SB",
post_town: "CANNOCK",
thoroughfare: "Pye Green Road",
building_name: "Flower House 189A",
organisation_name: 'S D Alcott Florists',
};
const {
line_1,
line_2,
line_3,
premise,
post_town,
postcode
} = new Address(pafRecord);
const Postcode = require("postcode");
const postcode = new Postcode("ec1v9lb");
postcode.valid();
postcode.normalise();
postcode.outcode();
postcode.incode();
postcode.area();
postcode.district();
postcode.subDistrict();
postcode.sector();
postcode.unit();
const OSPoint = require('ospoint');
// Create a new OSPoint instance, with Northings & Eastings
const point = new OSPoint("NORTHINGS", "EASTINGS");
// Retrieve OSGB coordinates
point.toOSGB36();
// Retrieve ETRS89 coordinates
point.toETRS89();
// Retrieve WGS84 coordinates
point.toWGS84();
const { spec } = require("@ideal-postcodes/openapi");
const { postcodes } = require("@ideal-postcodes/api-fixtures");
console.log(postcodes.success);