Should you build or buy Maps, Location & Geofencing APIs?

Maps, Location, and Geofencing APIs give applications the location primitives they need: map tiles for display, geocoding to convert addresses into coordinates, routing and directions, and geofences that trigger an action when a device enters or leaves an area. Google Maps Platform, HERE, Mapbox, and Radar are the major providers, each priced per call.

Buy the APIs, and shop them, because Google is no longer the only price. Open tiles with Protomaps or OpenMapTiles and PostGIS geofences are proven and cheap to own, but consumer POIs, traffic and global address handling are where the vendors earn their fee, and running your own geocoder does not make it accurate. Use the hybrid where a workload is heavy and simple; otherwise pay per call.

Build it, buy it, or bridge?

⚒ Build it
✓ Buy it
➔ Bridge
Cost shape
Open tiles and PostGIS geofences remove per-call fees, but ingestion and refresh work still costs money.
Google charges per call with a free monthly tier; Radar and HERE undercut it on geocoding.
Self-host tiles and geofences on PostGIS, and pay per call only for geocoding, places, and traffic.
Time to value
Protomaps and PostGIS are working within days for a team that already knows the tooling.
An API key gets you tiles, geocoding, and routing in minutes with no infrastructure to run.
Start on the API immediately, and move the basemap in-house once volume justifies the switch.
Differentiation captured
The basemap and geofence engine are commodity; whatever your product does with location is the edge.
The vendor's places data and live traffic are real assets; the API call itself is not.
Own the map and geofence logic, and keep buying the places and traffic data behind it.
AI feasibility today
AI coding tools make standing up a Valhalla or OSRM routing stack a days-long task, not a specialist one.
Providers are adding AI-generated place descriptions and routing explanations to the same APIs.
Use AI tooling to stand up open routing and geocoding, then buy places data with AI features where it matters.
Who it fits
Teams with a heavy, simple workload like static tiles or geofences worth self-hosting for cost.
Teams needing accurate global addresses, live traffic, or rich points of interest without building them.
Teams with both a heavy basemap workload and a real need for vendor places and traffic data.

When building makes sense

The open-source location stack is production-proven, not experimental. Protomaps serves map tiles for Felt, OpenInfraMap, and The Washington Post without a per-call fee to a commercial provider. Valhalla, OSRM, Nominatim, and Pelias cover routing, geocoding, and search, and PostGIS handles point-in-polygon geofences at any scale a database can hold. Google's own March 2025 pricing change replaced its flat $200 monthly credit with per-SKU free tiers and expanded automatic volume discounts scaling to 5,000,000-plus monthly billable events, a sign of how commoditized the base API pricing has become even from the largest vendor. What self-hosting does not reproduce is rich points of interest, live traffic conditions, and global address quality tuned by a vendor's own data operations. Build the tile and geofence layer when your workload is heavy and simple; that is where owning the infrastructure pays for itself fastest.

When buying makes sense

Buying the API is still the right call for the parts of the stack a self-hosted stack cannot cheaply reproduce: rich points of interest, live traffic, and address quality across every country you operate in. Google's own pricing has gotten more favorable since March 2025, when it replaced a flat monthly credit with per-SKU free tiers and expanded volume discounts, and competitors like Radar and HERE now undercut Google on plain geocoding. Location APIs are infrastructure regardless of provider; no company wins on which geocoder it calls. Pay per call for geocoding, places, and traffic, and reserve the self-hosted path for the basemap and geofence workload where the volume is high enough and the data need is simple enough that owning it actually saves money once engineering time is counted.

The desk read

Build-versus-buy analysis for Maps, Location & Geofencing APIs is being written. In the meantime, the framework that drives every B4 call is on the B4 Index page.

Representative vendors Google Maps PlatformHERE Platform + 5 more, listed in the full index

Frequently asked

Did Google Maps pricing actually get cheaper recently?

Yes, for many workloads. On March 1, 2025, Google replaced its flat $200 monthly credit with per-SKU free usage tiers and expanded automatic volume discounts scaling to 5,000,000-plus monthly billable events, up from 100,000-plus previously, which lowers the bill for high-volume users.

When does buying location APIs make more sense than self-hosting?

When you need accurate global addresses, live traffic, or rich points of interest. Those depend on data operations a self-hosted open tile server cannot replicate, and Radar and HERE now compete hard on price for exactly that data.

When does self-hosting the basemap make sense?

When your workload is heavy and mostly static: rendering tiles or checking whether a point falls inside a polygon. Protomaps and PostGIS run that workload without a per-call fee, which is where self-hosting saves the most money relative to the engineering cost of running it.

Does open-source routing and geocoding actually work at production scale?

Yes. Valhalla, OSRM, Nominatim, and Pelias power real applications, and Protomaps serves tiles for sites like The Washington Post. The gap with commercial providers is in places data, live traffic, and address coverage, not in the core routing or tile-serving technology.

The B4 Index scores every software category on two axes, strategic differentiation and AI feasibility, to classify it Build, Buy, Bridge, or Beware. See the full methodology.