DEV Community

TravelHistoryTool
TravelHistoryTool

Posted on

Turning a Google Maps Timeline export into a clean list of trips abroad

A location point has a timestamp. A trip needs a departure and a return. Getting from one to the other takes more judgment than sorting a file by date.

Treat your Timeline export as a set of clues. The useful output is a short trip list where every boundary date has a source you can inspect. Keep uncertain boundaries visible throughout the process.

Get the file from the right device

First, open a few known journeys in Timeline on the phone that holds your history. Check an older trip as well as a recent one. A new phone's data may not cover the years you need.

On Android, open the phone's Settings app, then Location, Location services and Timeline. Choose “Export Timeline data,” continue to the storage picker and save the file. These are the steps in Google's Android export instructions.

On iPhone, open Google Maps and use the profile menu to reach Settings, then Location & Privacy. Select “Export Timeline data” and use Save to Files. Google's iPhone export instructions describe that route. Follow the current help page if your menus differ.

If you kept an older Takeout archive, examine its date coverage separately. Do not assume it contains the same period as the phone export. Avoid transferring an entire account archive when all you need is the location-history portion.

Inspect the shape before making assumptions

An export can be structured data such as JSON. It may describe saved locations or visits with associated times. Think in terms of records and nested groups, rather than expecting a ready-made row for every international journey. Exact layouts can differ between exports.

Open a working copy in a local text viewer that can handle the file size. Look at a small portion first. Identify how dates and locations appear in that file. Do not rename fields based on a sample someone posted for a different export version.

Check the earliest and latest dates you can find. Note large gaps. Also check whether times include timezone information. Keep the original timestamp available while reviewing a date near midnight; silently changing timezones can shift the calendar day.

Turn country changes into candidates

Choose your reference country before reviewing the records. A list of absences from the United States has different boundary events from a list of absences from the UK, even when both describe the same holiday.

Read the locations in time order during this stage. Look for a sequence that moves from the reference country to another country and later returns. Mark that interval as a candidate trip. Then inspect the evidence around each end.

The last saved location at home is not necessarily the departure time. The first saved location abroad is not necessarily the arrival time. Your phone may have recorded nothing during the journey. Use tickets or border records to check the dates that matter.

Keep foreign stops together until you return to the reference country. Otherwise, a journey through several countries can turn into overlapping absences. Combine duplicate observations of the same journey without discarding the files they came from.

Review the points that look convincing but are not

An aircraft can pass over a country without you entering it. Do not turn a point along a flight path into a country visit. Check the surrounding route and your actual itinerary.

Location drift can also put a point on the wrong side of a border. A single outlier surrounded by locations in another country deserves scrutiny. Look for a consistent sequence and compare it with independent records before calling it a crossing.

Airport locations need similar care. Being near a terminal does not prove that you boarded a flight. A cancelled booking and an airport visit can look like a journey until you check what happened afterward.

A blank period cannot tell you where you were. If you cannot support a return date, leave it unresolved. Do not bridge the gap merely because the next saved location looks familiar.

Reduce the data before sharing it

Your export may reveal home addresses and routines unrelated to an immigration form. Keep the original in private storage. Avoid putting raw location files in a public repository or attaching them to a public support issue.

For your working list, retain the departure and return dates, destination countries and a private source reference. Share only the detail the recipient needs. Check screenshots for addresses and account information before sending them anywhere.

Once the dates are confirmed, format them for the application. For N-400, Part 8 of the official form asks for U.S. departure and return dates and countries visited, latest trip first. A location export does not certify those facts.

An optional place to review the trips

TravelHistoryTool (travelhistorytool.com) accepts Timeline exports alongside other travel evidence. Its Google Maps Timeline travel history guide covers export and review. You can use TravelHistoryTool to check suggested trips and missing returns, with free results and a watermarked preview. Five PDF exports cost $6.99 without registration. The service is run by one person, is not a law firm and is independent of government agencies. Check its file-handling information before selecting personal records.

This is general information, not legal advice. Check the official instructions or talk to an immigration attorney or regulated adviser for your case.

Top comments (1)

Collapse
 
jun_liu_ca219b73a8f1489b5 profile image
jun liu •

Nice practical workflow — turning the raw Google Maps Timeline JSON into a deduped trip list is exactly the kind of small script that pays off on every trip. One tip: if you also export the same period as GPX, you can cross-check stays against actual GPS tracks and catch the 'passing through' days the timeline sometimes mislabels. Thanks for sharing the parser approach.