AutoPostcode is a JSON HTTPS API, so calling it from Node.js is a single authenticated fetch. Keep your key on the server and expose a thin proxy route to your front end.
The pattern
- Store your API key in an environment variable, never in client code
- Proxy lookup requests through an Express or route-handler endpoint
- Parse the JSON address list and return only what the client needs
- Cache repeat postcodes to reduce calls
Where to start
Read API authentication & keys and the API quickstart, then check rate limits.
Other stacks
Front-end work? See React address autocomplete. PHP backend? See PHP postcode lookup.
Frequently asked questions
How do I call the postcode lookup API from Node.js?
Send an authenticated HTTPS GET to the lookup endpoint using the built-in fetch (Node 18+) or any HTTP client, then parse the JSON list of PAF-verified addresses.
Does it work with Express and serverless?
Yes — keep your API key server-side and proxy requests through an Express route, Next.js route handler or serverless function.
Where does the address data come from?
Addresses come from Royal Mail PAF data — complete, accurate and correctly formatted.
Ready to get started?
Add Royal Mail PAF-verified UK address lookup to your site in minutes — start free, no card required.
