Skip to content

Prismary/FlightOpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlightOpt — Skyscanner Route Optimizer

A local web app for finding the cheapest flights across flexible date windows and multi-leg routes, powered by the Apify Skyscanner Scraper.

Warning: This is an AI generated wrapper for memo23's Skyscanner scraper on Apify, do not expect exceptional human-readable code. Bug reports are welcome, though I'm not actively maintaining this project.


Setup

pip install flask
python app.py

Then open http://localhost:5000 in your browser.

Options

python app.py --port 5001          # run on a different port
python app.py --port 5001 --host 0.0.0.0  # accessible on your network

Run multiple instances simultaneously on different ports to separate searches or share with others on the same network.


Workflow

  1. Add API keys — go to the API Keys tab and paste your Apify API key(s).
  2. Configure legs — define your route(s) with origin, destination and date window(s).
  3. Choose a search mode — Separate, Round-trip, or Multi-city.
  4. Start search — the confirmation dialog shows the number of requests and the projected cost before anything is sent.
  5. Filter and export — results appear live as requests complete and can be filtered, sorted, and exported.

Search Modes

Separate

Each leg is searched independently as a one-way flight. One Apify request is sent per unique combination of origin airport, destination airport, and departure date. Use this when you want to mix and match legs freely, or compare individual segments.

Round-trip

Searches outbound and return together as a single round-trip query. You define one leg with both an outbound and a return date window. Every combination of outbound date × return date is queried.

Multi-city (up to 3 legs)

Searches all legs as a single connected multi-city itinerary. Every combination of dates across all legs is queried. Use this when the legs are dependent — e.g. you need to be in city B the day after leaving city A.


API Keys

  • Add keys one at a time or paste multiple at once (one per line).
  • Keys can optionally be named: my_key,apify_api_xxxxx
  • Balances are fetched automatically when the confirmation dialog opens.
  • Keys with a balance below $0.20 are skipped by default. Enable Use low-balance keys until exhaustion to override.
  • In parallel mode, each active key runs as an independent worker, processing one request at a time and picking up the next as soon as it finishes — effectively multiplying your throughput by the number of active keys.
  • If all keys are exhausted mid-search, the process pauses and a resume banner appears. Add new keys or re-enable existing ones, then click Resume.

Confirmation Dialog

Before any requests are sent, the dialog shows:

  • Total requests — the exact number of Apify actor runs that will be triggered.
  • Projected cost — based on $0.05 per request (residential proxy estimate).
  • Combined balance — fetched live from all active keys.
  • A warning if the projected cost exceeds the combined balance.
  • A warning if the search would push any key below the $0.20 low-balance threshold, with an inline option to override.

Results

Results appear progressively as requests complete. Each flight shows price, airline, stops, departure/arrival times, and layover details.

Tabs:

  • Whole Route — shown only in Separate mode with multiple legs; lets you combine the cheapest options across legs.
  • Leg 1, Leg 2, … — results for each individual leg or itinerary.

Filters:

  • Max price, max stops per leg, airline name.
  • Sort by price, number of layovers, or avoided airports.
  • Exclude specific layover airports (comma-separated IATA codes).

Export: JSON (structured or raw Apify format) and CSV.


Import

Already have Apify output? Drop a JSON file onto the Import tab or paste it directly. Results are added to any currently loaded results, not replaced.


Apify Actor

Actor: memo23/skyscanner-scraper
API endpoint: https://api.apify.com/v2/acts/{actor}/run-sync-get-dataset-items

The scraper uses residential proxies to query Skyscanner, which typically costs $0.05–0.20 per request. Be mindful of large date windows across many airports — the cartesian product grows quickly.

Example: 3 origin airports × 3 destination airports × 14 outbound days × 7 return days = 882 requests ≈ $44–$176


Cost Tips

  • Use narrow date windows first to identify promising routes, then expand.
  • In Separate mode, use the Whole Route tab to combine cheap legs after the fact, rather than using Multi-city mode which multiplies the request count.
  • Add multiple API keys and use parallel mode to complete large searches faster.

About

Flexible date flight optimizer via Skyscanner scraper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors