Almost nobody keeps a list of the countries they have been to. Almost everybody has ten years of photos. Every photo taken with location services on carries the coordinates where it was taken, written into the file by the camera — so the list already exists, scattered across your library, and the work is only extraction.
This page is the whole method: the free two-minute version on the phone, the free command-line version that produces a real list of countries and dates, and the failure modes, which are the interesting part and the reason your first answer will be wrong.
Open any photo in Photos and swipe up. If there is a map under the photo, that file has coordinates in it. If there is no map, it does not — and no tool, mine included, can invent one.
Things that typically have no location: screenshots, images saved from messaging apps and the web, photos taken while Location Services was off for the camera, and photos where the location was manually removed on sharing. Things that usually do: photos and videos from the iPhone camera itself, and from most modern cameras with a phone connection.
Photos → Library → the menu button → Show Map. Apple documents this in the iPhone User Guide, including the one limit that matters: only pictures and videos with embedded location data are included.
You now have a world map of pins, which is genuinely satisfying and answers roughly nothing. It will not tell you how many countries there are, when you were in each of them, or which trip each pin belonged to. For that, you have to get the numbers out.
This runs on a Mac or a PC, takes about fifteen minutes the first time, costs nothing, and never uploads a photo anywhere. Three steps.
In the macOS Photos app, select everything (Edit → Select All) and use File → Export → Export Unmodified Original. Export to an empty folder. It is important to export the unmodified original: edited exports can be re-encoded, and re-encoding is where location data goes missing.
If your photos are already in folders on a disk, skip this step entirely.
ExifTool is free, reads every format you are likely to have, and does not modify anything when you only read. One command turns a folder of photos into a CSV of coordinates and dates:
exiftool -r -m -q -f -n \
-if '$gpslatitude' \
-p '$gpslatitude,$gpslongitude,$datetimeoriginal' \
~/Desktop/photo-export > coords.csv
-r walks subfolders, -if skips files with no GPS, -n prints plain decimal degrees instead of the pretty format, and -f prints a dash where a file has no original date rather than dropping the line. On a library of tens of thousands of files this takes minutes, not hours, and produces something like:
33.9850,-118.4695,2026:08:31 14:06:22
35.6595,139.7005,2025:04:02 09:11:47
-
You do not need an API key, and you should not send ten thousand of your coordinates to a web service to find out. A local lookup is enough:
pip install reverse_geocoder
import csv, collections
import reverse_geocoder as rg # offline: ships its own dataset
rows = [r for r in csv.reader(open("coords.csv")) if len(r) >= 2]
pts = [(float(r[0]), float(r[1])) for r in rows]
hits = rg.search(pts, mode=1)
days = collections.defaultdict(set) # country code -> set of dates
for row, hit in zip(rows, hits):
stamp = row[2] if len(row) > 2 else "-"
day = stamp[:10].replace(":", "-") if stamp != "-" else None
days[hit["cc"]].add(day)
for cc, d in sorted(days.items(), key=lambda kv: -len(kv[1])):
print(f"{cc}\t{len(d)} day(s) with photos")
That prints your countries, ordered by how many days you have photographic evidence of being there. It is the honest version of the number people put in their bio.
The first three will show up in your CSV today. All five are the reason this problem is harder than it looks.
reverse_geocoder matches your coordinate to the closest populated place in its dataset. Ten kilometres from a border, or anywhere offshore, the closest town can be in the next country. The fix is a real point-in-polygon test against an administrative boundary file — the Natural Earth admin-0 dataset is the usual free choice — but be aware that the low-resolution versions cut corners on exactly the coastlines and enclaves where you needed precision.
A window-seat photo at cruising altitude is a perfectly valid GPS fix over a country you flew across without landing. Nearest-town lookups happily assign it. If you want a defensible list, drop fixes that sit alone in time and space — a single point hundreds of kilometres from the day's other points, with nothing before or after it — or filter on altitude where the EXIF records it.
DateTimeOriginal is local wall-clock time with nothing attached to say which clock. Newer files also carry OffsetTimeOriginal, older ones often do not. Grouping by date is therefore wrong by up to a day at both ends of a trip — which matters enormously if you are counting days and not at all if you are counting countries.
The natural instinct is to split a list of dated points into trips by gaps: a new trip starts after N days away or M kilometres moved. Both thresholds break. A day with no photos in the middle of a holiday splits one trip into two or three. A layover becomes a country visit. A weekend at home in the middle of a long stay abroad splits everything again.
Most people's photos are overwhelmingly taken where they live. Unless you exclude a home radius, the output is a list where the interesting entries are buried under thousands of points from within five kilometres of your front door.
There is a detail in Apple's PhotoKit worth knowing if you are writing this yourself rather than running a script: PHAsset exposes an asset's location directly, so you can walk an entire library and read coordinates and dates without decoding a single image. It is why a photo import can finish in seconds on a phone and why it does not need the photo contents at all.
The other half of that is permission. With limited library access — the "Selected Photos" option — you see only what the user picked, and your reconstruction will silently under-report. Apple's own privacy guidance for photo apps is the place to start if you are building this.
Disclosure. I make Driftlog, an iPhone app that does the above and then keeps going: it reads the location data in your existing photos to rebuild past trips, and it records the countries, regions and cities you pass through from now on while the app is closed, using the phone's coarse significant-location signal. One-time $6.99, no subscription, no ads, no account; the free version records your home country in full and names the rest. iOS 17 and later.
The limits, in the same breath: it reads photo metadata only, never the image; photo import needs Photos access set to All Photos and can only see photos that carry location; it records places, not routes; live recording needs Location set to Always with Precise Location on; a coordinate leaves the phone to be turned into a place name, which is the one outbound request it makes; and every failure mode on this page applies to it too — it just has my attempts at handling them built in.
Corrections welcome. If a command here does not work on your system, or a step has changed, email me at shiori.sutudio@gmail.com and I will fix the page and re-date it.