Jump to content

Website for bus times? (UK)

I know there are plenty of websites that do this, and the TFL (Transport For London) has it's own service. I wanted to known, how would it be done? Do I have to connect to their API and database to achieve this? 

 

 

CPU: AMD Ryzen 5 5600X | CPU Cooler: Stock AMD Cooler | Motherboard: Asus ROG STRIX B550-F GAMING (WI-FI) | RAM: Corsair Vengeance LPX 16 GB (2 x 8 GB) DDR4-3000 CL16 | GPU: Nvidia GTX 1060 6GB Zotac Mini | Case: K280 Case | PSU: Cooler Master B600 Power supply | SSD: 1TB  | HDDs: 1x 250GB & 1x 1TB WD Blue | Monitors: 24" Acer S240HLBID + 24" Samsung  | OS: Win 10 Pro

 

Audio: Behringer Q802USB Xenyx 8 Input Mixer |  U-PHORIA UMC204HD | Behringer XM8500 Dynamic Cardioid Vocal Microphone | Sound Blaster Audigy Fx PCI-E card.

 

Home Lab:  Lenovo ThinkCenter M82 ESXi 6.7 | Lenovo M93 Tiny Exchange 2019 | TP-LINK TL-SG1024D 24-Port Gigabit | Cisco ASA 5506 firewall  | Cisco Catalyst 3750 Gigabit Switch | Cisco 2960C-LL | HP MicroServer G8 NAS | Custom built SCCM Server.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

21 minutes ago, Abdul201588 said:

I know there are plenty of websites that do this, and the TFL (Transport For London) has it's own service. I wanted to known, how would it be done? Do I have to connect to their API and database to achieve this? 

 

 

Are you trying to make a website to combine everything? I think Google's way ahead of you since they combine all the data from the companies apis.

I edit my posts a lot.

Link to comment
Share on other sites

Link to post
Share on other sites

Yes, to get live data you need to sign up to TFL's API which is accessible as a range of XML feeds. Static and semi-static information, like the location of bus stops or the published timetables for a given route can usually be grabbed on a daily basis, and you can then use the data to compare with a given map point for finding the nearest stop. This comparison would happen on your server. 

 

Once you know the nearest stop, you can request a live arrivals feed for that stop up to every 30 seconds, though every 1-2 minutes is recommended.

 

The overall process is a bit more complicated than this, but I hope it serves as a basic primer to get you in the right frame of mind. You can check out more info here: https://api.tfl.gov.uk/

Please ignore my typos... I type too fast. Or Swype too fast on my tablet. One of those. 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×