Prompt
How do I turn user-entered addresses into latitude and longitude?
Latest observation
Oct 15, 2026
OpenAI APIWeb search: off
Use geocoding: send the user-entered address to a geocoding service and get back latitude/longitude coordinates.
Typical flow
- User enters an address.
- You send it to a geocoder.
- The geocoder returns:
- formatted address
- latitude
- longitude
- sometimes confidence / match quality
Common options
- Google Maps Geocoding API
- Mapbox Geocoding API
- OpenStreetMap Nominatim (free, but usage limits/policy matter)
- Here / TomTom / Bing Maps geocoding APIs
Example response
Input: 1600 Amphitheatre Parkway, Mountain View, CA
Output: lat: 37.422, lng: -122.084
Important considerations
- Ambiguous addresses: “Springfield” may return multiple matches.
- Partial addresses: results may be approximate.
- Normalization: the geocoder may standardize formatting.
- Rate limits and costs: many APIs bill per request.
- Privacy: addresses are sensitive data; handle securely.
If you’re building this yourself
The basic backend pattern is:
user address -> geocoding API -> lat/lng -> store/use results
If you want, I can also show:
- sample code in Python / JavaScript / PHP
- how to do this with Google Maps, Mapbox, or OpenStreetMap
- how to handle fuzzy or ambiguous addresses