How is this done? This question is for any "air ticket booking", "hotel booking" etc website. India USA anywhere... An example site is www.makemytrip.com or http://www.yatra.com/?redirect=no&origin=US How do these websites find out which flight has seats available? How do these websites find out which hotels have rooms available? I think there must be some sort of API and if someone here knows about it, please post a link. Although these are big companies, and can afford a lot of man power, but I seriously doubt that the database is updated manually. Then how is it done?
I highly doubt there is ONE API for all these sites - I'm assuming the use whatever API (if any) is available pr. airline's booking system, and if there is none available, maybe they scrape the website in real-time. It's not impossible, just takes a bit of coding, not to mention quite a bit of knowledge (the scraping, not necessarily the use of APIs, although some of them can be very sparsely documentet)
You are right, there is not one single API for all airlines. I too think that there are separate APIs for each airlines, but where to find it. Is it available to just selected "paid" users? Also what about the hotels. Most hotels listed with these companies don't even have websites, let alone API. They are mostly small guesthouses with few exceptions ( 4 and 5 stars ). Then how do these websites find out which hotels have rooms available? This is too much work with manual labour.
They might not have a website, but again, their systems might be online - if they have one. If not, maybe they provide the data off-hand - it's not very expensive to have someone in China or similar punch in a lot of number in an existing system.
http://www.aa.com/i18n/agency/General/aa_direct_connect.jsp There's one for American Airlines. You just have to Google API + airline companies name. Some won't have it so as PoPSiCLe said they would have to scrape them off the site. Which is a lot more work and more challenging but not at all impossible. I hope you're not trying to start one of these sites as there are already 100's of them and it would take quite a bit of work to make.
Yatra/Makemytrip etc have exclusive tie ups with hotels and airlines who authorize them to use their APIs. Yatra etc have to work with several API integration points on their web application to consume services from the providers(airlines/hotels). In case there are no APIs, then email is used for correspondence and a support person will manually make the booking, An example flow would be. 1. Customer books a room at 3 star hotel via example.com, since no API is present a message is shown to user saying "Confirmation pending" 2. Example.com dispatches an email to 3 star hotel support staff 3. Support staff checks availability of requested room in their system and makes/cancels the booking 4. Support staff them informs example.com staff about the booking status 5. example.com informs customer about booking and ask to make payment if confirmed or gives the customer an option to pay the hotel directly Each hotel will have a different flow based on Cancellation policy, payment terms The web application and API automation is just part of the operations, For smooth overall functioning there is still a lot of manual operations involved, Lot of service staff is required to keep integrity and maintain customer relationship. Lot of business relations/negotiations has to go on on between providers and the site officials.