
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Postcode lookup API for UK addresses from Open Postcodes, more information at https://openpostcodes.com
Retrieve a list of addresses for any postcode in the United Kingdom using the Open Postcodes API.
You can complete a full address lookup with just a couple of lines of code. Install and insert your API key, you can start immediately performing UK postcode address lookups.
Installation
Install using the node package manager, npm.
npm install postcodes
Remember to include it in package.json for portability purposes.
Get an API Key
Get a key at Open Postcodes, then try out our service with our testing postcodes e.g. 'XA1 0XX'
Configuration
You must include your API key when requiring the postcodes module. This will return an instance allowing you to perform your postcode lookups on the Open Postcodes API.
var api_key = "your api key"
var Postcodes = require('postcodes')(api_key)
Perform lookups by calling #lookupPostode(postcode, callback). This function is asynchronous and so takes 2 arguments, the postcode and a callback to handle the response.
You can use the postcode "XA1 0XX" to test our service.
Postcodes.lookupPostcode("XA1 0XX", function (error, addresses) {
if (error) throw error; // Add error handling
console.log(addresses);
});
// => Will output an array of addresses
// [ {
// postcode: 'XA1 0XX',
// post_town: 'LONDON',
// line_1: 'The Pavilion',
// line_2: 'Oaks Avenue',
// line_3: '',
// organisation_name: '',
// building_name: 'The Pavilion',
// ...truncated...
// }, ...
Open Postcodes provides street level address data for website, mobile and desktop applications at a competitive price.
We charge 1p per public lookup; take a look at our pricing
More in-depth documentation can be found here
Public Domain
FAQs
Postcode lookup API for UK addresses from Open Postcodes, more information at https://openpostcodes.com
We found that postcodes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.