I often travel and buy tickets.
And I also often suffer from the interface of air ticket aggregators.
I can not choose a ticket and make a purchase.
I know exactly where I want to go.
I know about how many days.
And at about what dates - for example, this month.
This time I wanted to fly to Serfaus - this is a ski village in Austria.
Fly no earlier than January 5, return to later January 15. For 6-8 days.
Now you need to find the best ticket for these conditions.
The “best” in my case is a combination of an objective price and subjective convenience of a flight — time of departure / arrival, airport of departure, airline, and so on.
In the last three points I suffer.
Because I do not want to poke and check. I do not want to switch between tabs.
And I want to see really affordable tickets with departure time and price and choose one of them.
And buy it.
But, in the end, I do not find the right ticket for a psychologically comfortable time.
And without making a purchase, I leave.
... there is no such scenario for aggregators.
Half-hour googling showed that in 2017 there is no free API for searching for tickets.
None of the aggregators.
Google has the only API available. Called QPX Express .
With the help of QPX and Google App Script, in 70 minutes, an add-on was written to a Google table, which reads from it where you need to fly, searches for tickets, and writes all the price options to it.
The result looks like this:
At the top of the table I fill in from / to (IATA airport codes separated by commas) and in which date range I want to fly. I indicate how many days (comma-separated) I am ready to spend on the trip.
On the second half of the sheet, I get the result - a list of air tickets, ranked by price.
On one sheet I have all the appropriate options for air travel.
With the built-in filtering tools I can select the dates / time I need.
It remains to go to the airline's website and buy a ticket.
Minus the solution - access to the API costs money (the first 50 requests per day are free, then $ 0.035 for 1 request), so it wasn’t possible to create a microsite for everyone.
While you can not drive a "Serfaus" in the "Where". I think that this will be solved by one of the Google APIs.
If you want to look for tickets in the same way, here is the instruction how to do it.
Just test the QPX API here for free.
Hotel search is absolutely the same case, which closes just as uncomfortable.
And the ideal service is the one that will give the best couple of hotel tickets by the given criteria of flexible search.
If you know which services can give a free / paid API to search for tickets and / or hotels - write in the comment / PM.
Source: https://habr.com/ru/post/339166/
All Articles