Choose a geocoding provider appropriate for your volume and accuracy needs (Google Maps Geocoding API, Mapbox Geocoding API, or Census Bureau Geocoding API for US addresses).
Send the full address string (street, city, state, zip) to the geocoding endpoint and parse the returned latitude and longitude.
Check the result's accuracy indicator: Google returns a location_type (ROOFTOP, RANGE_INTERPOLATED, GEOMETRIC_CENTER); prefer ROOFTOP for property-level precision.
Store the geocoded coordinates alongside the address in your database and include the provider and precision level for auditability.
For bulk address geocoding, use batch geocoding endpoints where available (Census Bureau offers a free batch geocoder for up to 10,000 addresses) to reduce cost and latency.
Implement a fallback chain: attempt rooftop geocoding first; if precision is insufficient, fall back to parcel centroid from assessor data.
Known gotchas
Unit/suite numbers in multi-family properties often cause geocoding to return a building-level point rather than a unit-level point — this is expected and acceptable for most property use cases.
Google Maps Geocoding API results cached beyond the ToS-allowed period (no caching of results for redistribution) violate the terms; check caching rules for your chosen provider.
Rural addresses and addresses in newly developed subdivisions may not geocode correctly; always validate geocoded results against a known bounding box for the target market.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp