find_trips
Find door-to-door trips
Finds the best round trips from where someone lives, not just from one airport: it adds the train or bus to every airport they can reach and ranks all options door to door, by price, by total travel time, or balanced. Use it when someone wants flights from their home town, could fly from several airports, or asks for the cheapest or fastest way to get somewhere, e.g. "I live in New Haven: should I fly to Lisbon from JFK, Newark, Boston or Hartford?" Not for a search from one airport already chosen. For a one-way trip set one_way (the trip length is then ignored). Multi-city: search each leg as one_way only when the user gave dates for it; otherwise ask for the dates. Set mode only when the user says how they get to the airport (car, train, bus, any): by default a home in the US compares driving, a taxi to a near airport and public transport, and a home elsewhere uses the train or bus. A named departure airport is an ordinary search: pass it as from_airports, with the home town the user gave. A month or holiday without a year means the next one coming; don't ask which year, and don't ask for the trip length or to confirm a town: search, and the answer says what it assumed. Any town or village works. The first search from a town we haven't seen takes about 20 seconds while we look up its train and bus connections; tell the user you're checking the connections from their town to each airport. Later searches from that town take a second or two. Give the home town and where to: airport, city or country codes, a list of them, or a region such as "Iberia" or "Southeast Asia". For "anywhere", a continent ("Asia") or "somewhere warm" it finds the cheapest places itself: pass "anywhere", "abroad" (another country) or the continent, or for warm, sunny or a beach the countries that fit the season with anywhere true; it searches the best 6 cities door to door. Dates are optional, but `dates` says where they came from: use "assumed" when the user gave none and you picked them (or
home必填modedates必填limitone_wayanywherecurrencyprioritydepart_tonights_maxnights_mintravellers另有 4 個