In my last post, I briefly mentioned spending part of a Sunday getting Bob, my dot, to research train tickets and collect the results in Google Sheets. There was quite a bit hidden in that sentence, time to unpack it a little, and think about how much better train ticket purchases could be if you actually want to optimize for something specific.
I had two trips to work out, some flexibility over when to travel, and an interest in reasonably priced First Class tickets (which I often see pop up, but no idea when to really expect them). I do these trips multiple times a month often on regular class tickets, and have been for the past few years, and often end up with all sorts of ticket purchases, advanced ones on the cheap, off peak returns, and many purchased last minute. I wanted to see the options without running slightly different versions of the same search myself, then trying to remember which one had produced the useful fare, over multiple days, multiple possible destination stations etc.
I’m expecting after writing this, someone might come and tell me about the perfect UK train ticket purchase and comparison website, but to my knowledge it doesn’t yet exist?
I ended up with hundreds of recorded comparisons of individual ticket prices, and four preferred direct trains costing on average £42.90 each (all for first class tickets), totaling £171 (Or £157 with split tickets). The off peak return price for these journeys would be £102.80, so only around £70 (or £50) more for 4 first class trains, which hopefully will mean that I actually get a seat on all of these trains, vs my last trip on Friday where I didn’t even get on the train as it was full…

The loose brief
The starting point was fairly ordinary. Two trips, approximate dates, one adult and no Railcard. There were three destination stations that would work for me, so fixing the search to one station would have thrown away useful options before we had even started.
I also had a rough idea of what would make first class interesting: anything under about £35 was worth listing, and perhaps up to £40, given these are the prices I had seen when I had bought one off first class tickets before. That gave the agent something more useful than a request to find the cheapest ticket.
The return dates were flexible too, which took another round of conversation to explore properly. A useful outward journey was only half the job. I wanted to compare both directions across the dates I could actually travel, with the same attention to stations, price and timing.
Already, doing this by hand, you are looking at 4 different searches for locations for the outward journey, multiplied by the number of days i might be able to travel, plus additional clicking to actually see all availbile times, and the same for the return.
The spreadsheet
I asked for a spreadsheet because this quickly became more information than I wanted to compare in a chat. A cheap result looks useful in isolation. Put its departure, arrival, journey length and changes next to a few alternatives, and it becomes much easier to judge. This is ultimately what is missing when it comes to every ticket purchasing flow I have experienced, the comparison. It’s something that flight comparisons seem to achieve a little better, but UK trains suck.
The wider collection ended up with 503 comparison rows for the first trip and 1,000 for the second. Those are recorded itinerary comparisons, including some separately priced combinations. They are not 1,503 distinct trains, and they are certainly not a complete catalogue of every available fare. Quickly comparing these numbers to how many results you typically get on a single trainline.com ticket search today, I see 8 trains on desktop, so getting this much data would have taken me 187 searches or page loads?
The sheet let me move between a broad view of the options and a smaller set of recommendations, filtering based on my new opinions as I saw all of the data, and tweaking my requirements given things that were cropping up. I could ask Bob to expand a date range, check another station, or explain why a particular result looked unusually cheap, then have that reflected in the same place. And entertainingly, this surfaced at least one round of engineering works on a Sunday, where first class tickets look cheap, but you’ll be on a bus.

According to the agent, figuring out all of the details of the routes meant opening the journey details. A price and an overall duration were not enough to establish whether the whole itinerary was by train. It also meant accepting that some rows in the broad collection were still unverified, and would need looping back to later if they looked appealing enough.
First class needed similar care. A journey can have a first class long distance leg and a standard class local leg, not something that I would really care about, but it’s another data point worth shoving in the spreadsheet.
How the data was gathered
The fares came from the public GWR booking site, accessed in a browser. The agent took the rendered journey cards and expanded fare panels as structured page text, including the fare labels and restrictions. Loading earlier and later results expanded the search beyond the initially displayed services. Candidate journeys then needed their detail panels opened so the individual legs could be checked for transport mode and class. Separately priced local-leg combinations and return-ticket options needed additional searches. The GWR site looks something like this.

This collection came from the booking-site pages, rather than a direct rail fares API integration, though I did briefly look for open APIs for this, coming up short, but there is a possible API that you can apply for for personal use with some sort of small fee? (It is also documented as deprecated though?). I can only assume this is what all of the booking sites actually still use. SOAP FTW!
I did try and get the agent to utilize a few different sites, especially sites that offer up split ticket pricings such as TrainSplit Split My Fare or Trainline, however the agent seemed to stall with all of these, claiming that they crashed in the browser before presenting any useful information. However, it seemed to do an OK job figuring out possible splits by itself for some of the specific trains that I had shortlisted.
One of the trains I had shortlisted was £45.60, however it found a split first class ticket for £40.60, saving £5. And a second that was £48 reduced down to £38.60, saving £9.40. So another saving of £15 in total.
My side
My part was mostly describing what I wanted, looking at the results, and saying what needed changing. I could ask for broader return options, rule out buses, distinguish mixed-class travel, and compare a cheaper journey against a more convenient one in ordinary language. After that I could review all of the raw data in a spreadsheet, filter it down, and ultimately make a final decision.
There were repeated prompts, retries and corrections along the way. Even with that back and forth, I ended up with the comparisons in a form I could use. I did not need to write the collection or spreadsheet code myself. I could spend my attention on whether £5 was worth an earlier start and a change, while then agent did the repeated searches and kept the output organized.
Will I be doing this again? Yes probably…
Did it lead me to actually booking my tickets? Not yet, I’ll do that tomorrow!
A potential prompt
Now this itself is entirely written by GPT 6 Astra, but might potentially serve someone else that wants to perform a similar experiment…
Help me find UK train tickets for [number of adults], with [Railcards or none], from [origin] to [destination and acceptable nearby stations].
I can travel out between [dates] and return between [dates]. I prefer First Class below £[target], but show worthwhile options up to £[maximum]. My acceptable departure and arrival times are [times]. I prefer [direct trains / at most X changes], with at least [X] minutes to change.
Exclude any journey containing a replacement bus. Check the individual legs, and clearly label mixed-class journeys. Don’t treat a displayed First Class price as proof that every leg has First Class.
Start with a small shortlist. Compare through fares with split tickets, preferably on the same train, including booking and split-ticket fees. Explain any seat changes or ticket restrictions. If something cannot be verified, mark it unknown rather than assume.
Put the results in [spreadsheet or table], including date, times, duration, changes, class by leg, ticket type, total price, split details, source and checked-at time. Show the best few options and explain their trade-offs. Recheck my chosen journeys before I book. Don’t buy or reserve anything.