Google Sheets geocoding
Geocode addresses or reverse-geocode coordinates directly inside Google Sheets using a zero-dependency Apps Script with built-in caching.
You can geocode directly inside Google Sheets without paying for a third-party marketplace add-on. The BuddyGeo Apps Script adds both spreadsheet formulas and a batch menu action, with built-in 6-hour caching so recalculating a sheet does not double-charge credits.
For large files (2,000 to 50,000 rows), upload the sheet directly in Bulk geocoding for faster asynchronous processing and a free max-cost preview.
Install in 60 seconds
- Download
buddygeo-google-sheets.gs(or copy the script below). - In your Google Sheet, click Extensions → Apps Script.
- Replace the empty file with the BuddyGeo script and click Save.
- Reload your spreadsheet and click BuddyGeo → Set API Key in the top menu.
- Paste an API key from API keys. The Free tier includes 2,500 monthly credits with no credit card required.
Custom formulas
Once installed, use these formulas in any cell:
| Formula | Output |
|---|---|
=BUDDYGEO_GEOCODE(A2) | "43.642566, -79.387057" |
=BUDDYGEO_LAT(A2) | 43.642566 |
=BUDDYGEO_LON(A2) | -79.387057 |
=BUDDYGEO_GEOCODE(A2, "ca") | Restrict search to ISO country code ca |
=BUDDYGEO_REVERSE(B2, C2) | Nearest formatted street address for (lat, lon) |
Batch menu actions (recommended for 50–1,000 rows)
Spreadsheet formulas recalculate whenever Google Sheets refreshes. For static enrichment:
- Highlight your column of addresses (or two adjacent
LatitudeandLongitudecolumns). - Click BuddyGeo → Geocode selected addresses (or Reverse geocode selected Lat/Lon).
- BuddyGeo writes plain values directly into the adjacent columns so coordinates are saved permanently with zero future API calls.
Minimal formula snippet
function BUDDYGEO_GEOCODE(address) {
if (!address) return '';
var key = PropertiesService.getUserProperties().getProperty('BUDDYGEO_API_KEY');
var url = 'https://www.buddygeo.com/v1/search?q=' + encodeURIComponent(address) + '&limit=1';
var resp = UrlFetchApp.fetch(url, { headers: { 'X-API-Key': key } });
var data = JSON.parse(resp.getContentText());
if (!data.result || !data.result.length) return '';
var loc = data.result[0].location;
return loc.lat.toFixed(6) + ', ' + loc.lon.toFixed(6);
}Open in the app
Bulk CSV / XLSX uploader
Need to geocode 2,000 to 50,000 rows? Upload CSV or Excel directly with a free preview.
n8n & automation templates
Automate CRM, Airtable, and webhook geocoding in n8n, Make, or Clay.
Related guides
Bulk processing
Add coordinates to a spreadsheet of addresses, or addresses to a spreadsheet of coordinates, in the upload wizard or through the /v1/batch endpoints. Preview is free; only matched rows cost a credit.
Quickstart
Create a key, turn an address into coordinates with your first search, look up the address for a coordinate, and find both requests and their credits in your dashboard.
n8n, Make & Clay automations
Importable n8n workflow templates and HTTP enrichment recipes for Make.com and Clay.com using BuddyGeo's /v1/search and /v1/reverse endpoints.
MCP server for Claude, Cursor & AI agents
Connect Claude Desktop, Cursor, Windsurf, and remote AI agents to BuddyGeo over Hosted Streamable HTTP or local stdio MCP for verified geocoding, messy-address repair, Spatial Q&A, routing, and isochrones.
n8n, Make & Clay automations
Importable n8n workflow templates and HTTP enrichment recipes for Make.com and Clay.com using BuddyGeo's /v1/search and /v1/reverse endpoints.