
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
realtime-trains-scraper
Advanced tools
Get Unlimited and Fully Detailed UK Train Data from Realtime Trains without an API Key.
Get Unlimited and Fully Detailed UK Train Data from Realtime Trains without an API Key.
⚡ Lightning Fast | Data from Realtime Trains is Fetched in a Matter of Seconds!
📑 Detailed JSON Response | To get the Detailed Data instead of the Simple Data, you would have to contact the Realtime Trains Team. By using this package, you don't have to do that!
🔓 100% Free & Unlimited Access to Data | By utilising Node Fetch and Cheerio, you can fetch data whenever and as many times as you want to, without any API Key!
To install the package, simply run the following command in your terminal:
npm install realtime-trains-scraper
const realtimeTrains = require('realtime-trains-scraper');
// Fetching Data using the Station Code
realtimeTrains.getTrains("KGX");
// Fetching Data using the Station Name. However, this is not recommended as the Station Code is more reliable.
realtimeTrains.getTrains("London King's Cross");
You can also add a second parameter to specify how many results you want to get.
realtimeTrains.getTrains("KGX", 10); // Defaults to 15 (Max).
{
"operator": {
"name": "LNER",
"code": "GR"
},
"stp": "WTT",
"plannedArrival": "2055",
"actualArrival": "2056",
"plannedDeparture": null,
"actualDeparture": null,
"origin": {
"name": "Edinburgh",
"code": "EDB"
},
"destination": {
"name": "London Kings Cross",
"code": "KGX"
},
"callingPoints": [
{
"name": "Berwick-upon-Tweed",
"code": "BWK",
"platform": "1",
"plannedArrival": "1711",
"actualArrival": "1709",
"plannedDeparture": "1712",
"actualDeparture": "1712",
"delay": null
},
{
"name": "Newcastle",
"code": "NCL",
"platform": "3",
"plannedArrival": "1756",
"actualArrival": "1754",
"plannedDeparture": "1759",
"actualDeparture": "1759",
"delay": null
},
{
"name": "Darlington",
"code": "DAR",
"platform": "1",
"plannedArrival": "1827",
"actualArrival": "1825",
"plannedDeparture": "1829",
"actualDeparture": "1829",
"delay": null
},
{
"name": "York",
"code": "YRK",
"platform": "3",
"plannedArrival": "1855",
"actualArrival": "1855",
"plannedDeparture": "1858",
"actualDeparture": "1859",
"delay": "+1"
},
{
"name": "Stevenage",
"code": "SVG",
"platform": "2",
"plannedArrival": "2028",
"actualArrival": "2033",
"plannedDeparture": "2030",
"actualDeparture": "2035",
"delay": "+5"
},
{
"name": "London Kings Cross",
"code": "KGX",
"platform": "0",
"plannedArrival": "2055",
"actualArrival": "2054",
"plannedDeparture": null,
"actualDeparture": null,
"delay": "-1"
}
],
"platform": "0",
"uid": "C86178",
"trainid": "1E23",
"sourceURL": "https://www.realtimetrains.co.uk/service/gb-nr:C86178/2021-08-30/detailed",
"isPassengerTrain": true,
"isCalling": true,
"isCancelled": false,
"runsAsRequired": false
}
If any of the Arrival or Departure Times are null
, the field for that data on the timetable has been left blank.
A '+'
symbol in the Delay indicates that the train is delayed by 'x'
minutes.
A '-'
symbol in the Delay indicates that the train is early by 'x'
minutes.
If No Delay is present, the Delay field will be null
.
👋 Need Help? Join Our Discord Server!
👾 Found a Bug, or Something Outdated? Open an Issue, or Fork and Submit a Pull Request on our GitHub Repository!
FAQs
Get Unlimited and Fully Detailed UK Train Data from Realtime Trains without an API Key.
We found that realtime-trains-scraper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.