Does Trainline have an API? Partner access and options
As of 2026-11-11 we found no public Trainline developer API, and no official Trainline MCP server. Trainline's Global API is a commercial distribution product for travel sellers, and access is granted by application with negotiated fees. Its affiliate programme is a separate route for websites that link to Trainline. Wield has no Trainline recipe yet, so an AI agent cannot search Trainline through Wield today, and you can ask for one.
What your agent gets
Wield has no Trainline recipe. The registry index, which we read on 2026-11-11, lists no recipe for trainline.com or trainline.co.uk, so this page does not promise a tool. The hosted endpoint POST https://wield.run/api/v1/do may answer a simple search on the site when it is asked for the first time, through a steered visit. That is not a tested recipe, and we cannot promise the result.
Official and third-party routes
Trainline sells its rail and coach inventory to travel businesses through Partner Solutions. The Global API is one of those products. Its page names the intended users: travel management companies, online travel agents, online booking tools, global distribution systems, carriers and train operators. Fees are negotiable, bookings go through the partner's own site, and interested parties apply through a contact form or a sales address on the Partner Solutions page. The page does not mention a public developer API, sandbox or self-serve sign-up.
Trainline's affiliate page describes a separate route for websites that send customers to Trainline. An affiliate link is a way to earn commission on bookings. It is not an API for searching timetables or prices. Terms and commission are set by the affiliate programme.
Unofficial services sell parsed Trainline data, and some developers scrape the site. Those routes are unsupported by Trainline and can break without notice. We did not check Trainline's terms of use for automated access ourselves.
Use it in 60 seconds
- Any MCP client. Add the remote MCP server
https://wield.run/mcp. Public reads need no key, and hosted reads are limited to 60 an hour per network. Logins, actions and private recipes need a free key from wield.run/signin, with $1 of credit at sign-up. Until a Trainline recipe exists, your agent can file a request with therequest_recipetool. - Try the hosted endpoint with curl. This is a best-effort try, not a recipe:
curl -s https://wield.run/api/v1/do -H 'content-type: application/json' -d '{"task": "find the next direct train from London to Edinburgh on thetrainline.com"}'- Tasks that need your own login. Booking and managing tickets need your Trainline account. Wield has no Trainline login recipe yet, so there is nothing to run today. When one exists,
npx -y wield-mcp initand the Chrome extension from /install run it in your own browser, with your own session.
Example prompts
- "Does Trainline have an API I can use to check UK train times?"
- "Ask Wield to request a Trainline recipe for one-way fares on a single route."
- "Compare Trainline's partner route with the Deutsche Bahn search recipe for a travel planner."
- "Which of my rail searches need a login, and which are public reads?"
Limits and the site's terms
We did not verify Trainline's terms for automated access, so assume they restrict automated collection until you have read them. Wield's hosted runs follow robots.txt and skip any site that sets Content-Signal: ai-input=no. Runs are paced per site, and each Wield recipe lists the known restrictions of its site.
Wield does not solve bot checks for you. When a site shows a check, a run stops with site_challenge and asks you to solve it in your own tab.
Fares and availability change often. Check the final price on the booking page before you pay.
FAQ
Does Trainline have an official API?
Yes, but it is a commercial product. As of 2026-11-11 the Global API is sold to travel businesses under Partner Solutions, and we found no public developer API or sandbox.
Is there an official Trainline MCP server?
We found none as of 2026-11-11. Any Trainline MCP server you find is third-party, so read its code and terms before you connect it to an agent.
Can an AI agent search Trainline through Wield today?
Not through a tested recipe, because Wield has none for Trainline yet. The hosted endpoint may answer a simple search, but that answer is not a recipe and may be incomplete.
How do I ask Wield to add Trainline?
Send POST https://wield.run/api/v1/requests with a JSON body that names the site and one task, for example {"site": "trainline.com", "task": "search one-way train fares on one route"}. Your agent can also call the request_recipe tool.
Sources
- Trainline Partner Solutions: Global APIthetrainline.com
- Trainline affiliatesthetrainline.com