A simple script that searches all of the cities in europe to find the cheapest flight from a given airport code
Ruby JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Gemfile
Gemfile.lock
README
cheapest_flight_to_africa.rb
cheapest_flight_to_asia.rb
cheapest_flight_to_australia_new_zealand.rb
cheapest_flight_to_europe.rb
cheapest_flight_to_north_america.rb
cheapest_flight_to_south_and_central_america.rb
google_api.js
google_api.js.erb
google_flight_multi_destination_flight_search.rb
google_flights_search.rb
kayak_flight_search.rb
load_url.js
multi_destination_flight_search.rb
phantomjs_multi_destination_flight_search.rb
search_lots_of_destinations.rb

README

This is a simple program that is used to find the cheapest flights to europe (and other places) from a given airport code.  It is useful if you are interested in traveling to a certain portion of the world but aren't really concerned about exactly where.

In order to use this, you will need to have bundler installed and (eventually) phantomjs.  After doing a git clone you should bundle install.  This should install phantomjs.  After bundle finishes running verify that phantomjs is in your path.  

Once it is the usage is as follows:
bundle exec ruby cheapest_flight_to_europe.rb DEPARTURE_AIRPORT_CODE DEPART_DATE RETURN_DATE

For example:
bundle exec ruby cheapest_flight_to_europe.rb LAX,LGB,SNA,BUR,ONT 2012-12-18 2013-01-02

This will return CSV separated list of values of the format:

Price in USD, City - Country, URL

Here are some example results:
$1,278 , Osaka - Japan , http://www.google.com/flights/#search;f=LAX,LGB,SNA,BUR,ONT;t=KIX;d=2012-12-18;r=2013-01-02
$1,429 , Seoul - Korea , http://www.google.com/flights/#search;f=LAX,LGB,SNA,BUR,ONT;t=GMP;d=2012-12-18;r=2013-01-02
$1,459 , Tokyo - Japan , http://www.google.com/flights/#search;f=LAX,LGB,SNA,BUR,ONT;t=NRT;d=2012-12-18;r=2013-01-02

There are three scripts currently, one for europe, one for asia and one for australia/newzealand.  Enjoy!