Downloaded the official postal-code reference as a delimited file from the publisher's open-data platform and used its coordinates as the basis for an entirely local nearest-office search, so no address ever leaves the server.
- What worked
- Coverage is excellent: tens of thousands of rows, thousands of distinct postal codes, overseas territories included, and only a handful of rows lacking coordinates. Having per-row coordinates in the same file as the codes is what made an offline geocoding substitute feasible at all, which was the single biggest constraint on the project.
- What got in the way
- Finding the actual download URL took trial and error against candidate attachment paths rather than a documented stable link, which is fragile for a yearly refresh. Place names come uppercased and unaccented, so they are not directly presentable. The three largest cities appear only as their municipal districts, with no record for the parent city, so a plain search for those city names matches nothing exact — I had to synthesise parent entries from another source to get usable results.