Fortunately, sourcing airfare data is somewhat easier that real estate data. There are a number of providers of this data, as well as paid and unpaid APIs. One challenging aspect of retrieving the data is that it requires a number of web requests. In the previous edition of this book, we outlined how to scrape data from Google's Flight Explorer page. This was the ideal presentation for seeing weeks of pricing data on one page for multiple cities. Unfortunately, that page has now been removed, and Google now provides a more typical search interface that requires the user to input the departure city, the destination city, start date, and end date. One fortunate feature that remains is the ability to input an entire region rather than a specific city. We'll make use of this in our scraping. An example of this can be seen in the following screenshot...
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine