Writing

Geocoding a county for nothing

10 March 2026/2 min read

When you build anything with addresses in it you eventually need coordinates. Street address in, latitude and longitude out. That is geocoding.

The obvious route is a commercial API. They are excellent, they are fast, and they bill per lookup. Fine for a hundred addresses. Less fine when you have a few thousand and you want to be able to re-run the whole pipeline whenever the source data updates, which is the entire point of having a pipeline.

The cost is not really the money. It is that metered lookups make you reluctant to re-run, and a dataset you are reluctant to rebuild slowly goes stale.

For US addresses there is an alternative most people never look at. The Census Bureau operates a geocoder. It is free, it has no key, and for domestic addresses it is as authoritative as anything on the market, because it is the same data that underlies a great deal of what the market resells.

It has real limits and you should know them going in.

It is US only. It is slower than commercial services. It will not resolve a business name, only an address, so you have to have clean address strings first. And its batch endpoint prefers files of a few thousand records at a time rather than one enormous submission.

The last one shapes how you use it. You are not making thousands of individual calls. You assemble a file, submit it, and get a file back. That is a different mental model and it is better: it makes geocoding a build step rather than a runtime dependency.

What that buys you is the thing that matters. The pipeline can be re-run from scratch, for free, any time. Source records update, run it again. Found a cleaning bug, run it again. Nothing about improving your data costs money, so you improve your data.

That is worth more than the accuracy difference at the margin, and the accuracy difference at the margin is close to zero for putting a pin on a county map.