The Scenario
A web analyst pulled server logs for the past two weeks and has 1,000 visitor IP addresses in a Google Sheet. The product team wants a geographic breakdown of the user base — which cities and countries are driving traffic — to inform the localization roadmap discussion next Thursday. The analyst needs to enrich every IP with city and country data before the data can be visualized.
The bad version:
- Find a free IP geocoding tool online, paste 25 IPs at a time (the batch limit), copy the results table, paste into the sheet, adjust column alignment because the output format doesn't match, repeat 40 times.
- The free tool flags every tenth batch as rate-limited, so you add waits between submissions and the whole process takes an afternoon.
- Three hundred rows in, the tool returns "Unknown" for a block of IPs that are clearly valid addresses. It's unclear if the service is down or if those are internal network addresses. No way to tell without investigating each one.
The localization discussion is Thursday. The visualization still needs to be built.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Google Sheet. It reads the IP column, calls Radar's IP geocoding API for each row, and writes city, region, and country back into the columns you specify — 1,000 rows in one pass.
For each IP address in column A, call Radar's IP geocode API and write the returned city, region, and country to columns B, C, and D
What You Get
- Column B: city for each IP address
- Column C: region or state
- Column D: country
- Rows where Radar returned no geographic match get a clear "Unknown" entry so you can identify and separately handle internal or private IP ranges
What If the Data Is Not Quite Ready
Some rows have blank IPs or formatting issues (extra spaces, port numbers appended)
For each row in column A: strip any port number or extra whitespace from the IP, then call Radar's IP geocode API and write city, region, and country to columns B, C, and D — mark rows with empty or clearly invalid IPs as Invalid in column B
You want country codes instead of full country names for the visualization tool
For each IP in column A, call Radar's IP geocode API and write city to column B, region to column C, and ISO country code (e.g. "US", "DE") to column D
You need to deduplicate — many IPs appear multiple times and you only want to geocode each unique IP once
Identify all unique IP addresses in column A, geocode each via Radar, then write the city, region, and country back to every row that shares that IP — mark any that failed to resolve in column E
Validate IPs, geocode, and build a country-frequency summary in one pass
For each IP in column A: validate it's a properly formatted public IP, call Radar's IP geocode API, write city, region, and country to columns B, C, and D — then add a summary table starting at row 1005 listing each country, the count of IPs from that country, and the percentage of total traffic
The summary table saves the manual pivot step before the visualization build.
Try It
Get the 7-day free trial of SheetXAI and open any Google Sheet with a column of IP addresses — ask it to geocode each via Radar and write city, region, and country into the sheet. For geocoding street addresses instead, see bulk forward geocoding, or return to the Radar integration overview.
