The Scenario
You are a logistics analyst. Your monitoring system recorded 200 GPS pings from a delivery van over the past week — latitude in column A and longitude in column B of a Google Sheet. Your compliance report requires street-level addresses, not coordinates. The ops director asked for the report by end of day Thursday. It is Wednesday afternoon.
The bad version:
- Open the Google Maps API docs, realize you need to set up a project, enable billing, and generate a key just to test reverse geocoding on a handful of rows.
- Paste coordinates into an online reverse geocoder one row at a time, copy the result, switch back to the sheet, paste, move to the next row.
- Reach row 50 and discover three coordinates are in the middle of a river — GPS drift — and now you have to decide whether to flag them or estimate their nearest road address.
The compliance report is not optional. You have 150 rows left and approximately two hours before you need to send it.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that runs inside your Google Sheet. It reads the coordinate data in your sheet and calls the Mapbox reverse geocoding API for each row, then writes the results back — column by column, without you touching a single API call.
For each row with latitude in column A and longitude in column B, use Mapbox reverse geocoding to look up the address and write the full address into column C, city into column D, and country into column E. Flag any rows where the coordinates appear to be over water or return no match in column F.
What You Get
- Column C with the full street-level address for each coordinate pair.
- Column D with city name.
- Column E with country.
- Column F flagged with OVER WATER or NO MATCH for any coordinate that Mapbox cannot resolve to a road-level address — making your three river pings immediately visible without a separate audit step.
What If the Data Is Not Quite Ready
The coordinates have too many decimal places and some are clearly wrong
You want to sanity-check the coordinate ranges before calling the API, so you do not waste calls on obviously bad data.
First, check all values in columns A and B. Flag any latitude outside -90 to 90 or longitude outside -180 to 180 in column F as INVALID COORD. Then reverse-geocode only the unflagged rows using Mapbox and write address, city, and country into columns C, D, and E.
The GPS pings span multiple days and you only want one address per location cluster
The van made repeated stops at the same depot, generating dozens of near-identical pings. You want one canonical address per unique stop, not 200 nearly-duplicate rows.
Group the GPS coordinates in columns A and B by clusters of pings within 50 meters of each other. For each cluster, reverse-geocode the centroid using Mapbox and write the resolved address into column C, with the number of original pings in that cluster in column D.
The sheet has the coordinates swapped — longitude in column A and latitude in column B
Your upstream export got the order wrong.
The coordinates in this sheet have longitude in column A and latitude in column B. Swap them before reverse geocoding, then call Mapbox reverse geocoding for each row and write the full address into column C and the city into column D.
Full pipeline: validate, deduplicate, reverse-geocode, and flag outliers
First, flag any coordinates in columns A and B that fall outside continental US bounds in column F as OUT OF BOUNDS. Then cluster the remaining pings within 100-meter radius groups, take the centroid of each cluster, reverse-geocode it using Mapbox, and write the address to column C and ping count to column D. Mark any clusters of one as SINGLETON in column E — those are likely one-off GPS errors worth reviewing.
One pass handles validation, deduplication, and lookup without running separate steps.
Try It
Get the 7-day free trial of SheetXAI and open your next GPS export — whether it is a week of delivery pings or a one-off fleet report — and ask SheetXAI to reverse-geocode the coordinates through Mapbox. The geocoding article covers the forward direction if you are working from addresses instead of coordinates. The Mapbox hub has the full list of geographic workflows.
