Skip to content

Run it every day

From a new key to a job that runs by itself

PRO is $10 a month for 2,500 requests. A route checked every morning, a month of dates at a time, uses 62 of them. Pick one of the four setups below, set it up once, and it tells you when the fare is worth a look.

Step 1

Get the key and check it

  1. Open the plans on RapidAPI, sign in and subscribe. PRO is $10 for 2,500 requests a month, then $0.003 each. The free BASIC plan (50 a month, hard cap, no card) is enough to test every setup on this page.
  2. Copy your X-RapidAPI-Key from the listing’s Endpoints tab.
  3. Check it. This call asks RapidAPI whether the key is subscribed and costs no request:
curl · costs 0 requests
export RAPIDAPI_KEY="..."
curl -sS "https://api.flightpowers.com/v1/verify" -H "x-api-key: $RAPIDAPI_KEY"

Step 2

What each setup uses

Requests in a 31-day month, against PRO's 2,500. A month of dates is one request on the REST API (cheapest dates). Over MCP it is one request per date and city.

SetupThe watchA dayA monthOf PRO
fare-watcher1 route, 1 trip length, a month of dates2622.5%
fare-watcher2 x 2 airports, 2 trip lengths, a month of dates (the shipped example)1031012%
fare-watcher3 x 8 airports, 3 trip lengths, a month of dates802,48099%
n8n1 route, 1 date pair1311.2%
cron1 route, 1 trip length, a month of dates2622.5%
Claude or Cursor2 cities, 1 departure date2622.5%
Claude or Cursor2 cities, every date of a month621,92277%

A search that fails with a server error is retried once (the n8n workflow sends it once), so a bad day can add a few. On the free plan, the small watches fit on weekdays: 50 requests is 25 runs of 2.

Setup 1

GitHub Actions: copy the template, add the key

fare-watcher scans a month of dates once a day and opens a GitHub issue when Google marks the fare low, when it is under Google's usual range, or at your target. No server, and the price history stays in your repo.

  1. Open github.com/mtnrabi/fare-watcher and press Use this template. Make it private if you don’t want your watch to be public.
  2. Settings > Secrets and variables > Actions > New repository secret, name RAPIDAPI_KEY.
  3. Edit watch.json with your airports (a small one below).
  4. Actions > fare watch > Run workflow once. After that it runs every day at 06:17 UTC.
watch.json · one route
{
  "from": ["JFK"],
  "to": ["LIS"],
  "nights": [7],
  "window": { "starts_in_days": 45, "days": 31 },
  "currency": "USD",
  "confirm": 1,
  "max_requests": 4
}

2 requests a day, 62 in a 31-day month. That is 2.5% of PRO’s 2,500. The shipped example (2 x 2 airports, 2 trip lengths) is 10 a day and 310 a month. 3 x 8 airports at 3 trip lengths is 80 a day and 2,480 a month, about all of PRO. python fare_watch.py --plan prints the count for your watch without sending anything.

real run · 2026-11-25 20:42 UTC · booking links cut
1 origin(s) x 1 destination(s) x 1 trip length(s), departures 2027-01-09 to 2027-02-08:
31 dated fares read, 2 requests.

route      nights  cheapest departure  return      USD  dearest date in the window
JFK → LIS  7       2027-01-12          2027-01-19  556  697

Confirmed with a full search
route      dates                     calendar  full search  Google says  usual range  stops  airline (outbound)
JFK → LIS  2027-01-12 to 2027-01-19  556       556          typical      410-650      0      Tap Air Portugal / JetBlue

No alert: nothing new that qualifies.

Setup 2

n8n: import one workflow

A schedule at 08:00, one round-trip search, and an email (or Slack message) only when the fare is under your target, under Google's usual range, or rated low.

  1. Download fare-watch-http-request.json and use Workflows > Import from file. (The same repo has a version for the FlightPowers node.)
  2. On Search round trip, create a Header Auth credential: name x-rapidapi-key, value your key.
  3. Edit Watch settings: airports, target price, email. The dates roll: 45 days out, 7 nights.
  4. Add your SMTP credential on Email me, press Execute workflow once, then Activate.

1 request a day, 31 in a 31-day month. That is 1.2% of PRO’s 2,500. One date pair, so it is the smallest of the four. Copy the workflow for each route you watch.

real run · 2026-11-25 20:42 UTC · the workflow's own request and Code node, booking link cut
Subject: Fare watch: JFK-LIS 563 USD (typical)

JFK -> LIS, 2027-01-09 to 2027-01-16: 563 USD round trip
Outbound: LEVEL, Vueling, 1 stop(s), 11:45 PM on Sat, Jan 9
Return: Vueling, LEVEL, 1 stop(s), 2:05 PM on Sat, Jan 16
Google: typical (usual 420-730 USD)
Why: at or under your target of 600
Book: https://www.google.com/travel/flights?tfs=...
Fetched 2026-11-25 20:42 UTC. Fares change within minutes.

We ran the workflow’s request and its Code node outside the n8n editor with the shipped settings (target 600) and always_send on. The email step is n8n’s own.

Setup 3

Plain cron: one Python file

Standard library only. It finds the cheapest date in a rolling month, prices that trip in full, adds a line to fares.csv, and marks a DEAL when Google says low or the fare is at your target.

shell
mkdir -p ~/fares && cd ~/fares
curl -sSO https://flightpowers.com/daily_fare.py        # then edit FROM, TO, NIGHTS, TARGET
(umask 077; echo 'export RAPIDAPI_KEY="your-key"' > env)
. ./env && python3 daily_fare.py                    # one run now, 2 requests

crontab -e                                          # add this line: every day at 06:17
17 6 * * * cd $HOME/fares && . ./env && python3 daily_fare.py >> watch.log 2>&1

2 requests a day, 62 in a 31-day month. That is 2.5% of PRO’s 2,500. One route is one copy of the script. 40 routes a day still fit in PRO.

real run · 2026-11-25 20:42 UTC
2026-11-25 20:42 UTC  LHR-JFK 2027-01-21 to 2027-01-28: calendar 483, full search 599 USD, Google says typical (usual 425-930)

Two prices, because Google’s calendar is the lowest fare of any itinerary that day and the full search returns the best ones on price, time and stops together. It marks the DEAL again every day the fare stays there (setup 1 remembers what it already told you). Set SLACK_WEBHOOK_URL in env to get the deals in Slack.

Read daily_fare.py (52 lines)
daily_fare.py
#!/usr/bin/env python3
"""Two requests a day: the cheapest date in the window, then that trip in full."""
import csv, json, os, sys, time, urllib.error, urllib.request
from datetime import date, datetime, timedelta, timezone

FROM, TO, NIGHTS, TARGET = "LHR", "JFK", 7, 450     # your route, trip length, target in CURRENCY
STARTS_IN_DAYS, DAYS, CURRENCY = 45, 31, "USD"      # rolling window, 61 days at most
HOST = "google-flights-live-api.p.rapidapi.com"

def call(path, body):
    req = urllib.request.Request(
        f"https://{HOST}/api/google_flights/{path}/v1", method="POST",
        data=json.dumps({**body, "_fp_source": "site-docs", "_fp_tool": "daily-cron"}).encode(),
        headers={"Content-Type": "application/json", "x-rapidapi-host": HOST,
                 "x-rapidapi-key": os.environ["RAPIDAPI_KEY"]})
    for attempt in (1, 2):
        try:
            return json.load(urllib.request.urlopen(req, timeout=90))
        except urllib.error.HTTPError as e:
            if e.code < 500 or attempt == 2:          # 4xx: fix the request or the plan
                sys.exit(f"{path}: HTTP {e.code} {e.read()[:200]!r}")
        except OSError as e:
            if attempt == 2:
                sys.exit(f"{path}: {e}")
        time.sleep(5)                                 # 5xx or network: the search did not finish, one retry

first = date.today() + timedelta(days=STARTS_IN_DAYS)
month = call("cheapest_dates", {
    "from_airport": FROM, "to_airport": TO, "nights": NIGHTS, "currency": CURRENCY,
    "departure_date_from": str(first), "departure_date_to": str(first + timedelta(days=DAYS - 1))})
best = month.get("cheapest")
if not best:
    sys.exit("no priced date in the window")
trips = call("roundtrip", {
    "from_airport": FROM, "to_airport": TO, "currency": CURRENCY.lower(), "limit": 10,
    "departure_date": best["departure_date"], "return_date": best["return_date"]})
trip = min(trips, key=lambda t: t["total_price_as_number"], default={})
price, verdict = trip.get("total_price_as_number"), trip.get("price_range_in_relation_to_other_periods")
now = f"{datetime.now(timezone.utc):%Y-%m-%d %H:%M}"

with open("fares.csv", "a", newline="") as f:         # your own price history
    csv.writer(f).writerow([now, FROM, TO, best["departure_date"], best["return_date"], best["price"], price, verdict])
line = (f"{now} UTC  {FROM}-{TO} {best['departure_date']} to {best['return_date']}: calendar {best['price']:.0f}, "
        f"full search {price or 'no trip'} {CURRENCY}, Google says {verdict or 'nothing'} "
        f"(usual {trip.get('price_insights_low', '?')}-{trip.get('price_insights_high', '?')})")
print(line)
if verdict == "low" or min(best["price"], price or best["price"]) <= TARGET:
    print("DEAL", trip.get("buy_link", ""))
    if os.environ.get("SLACK_WEBHOOK_URL"):           # optional: a Slack incoming webhook
        urllib.request.urlopen(urllib.request.Request(
            os.environ["SLACK_WEBHOOK_URL"], headers={"Content-Type": "application/json"},
            data=json.dumps({"text": f"{line}\n{trip.get('buy_link', '')}"}).encode()), timeout=20)

Setup 4

Claude or Cursor: a scheduled prompt

Add the MCP server once, paste your key once, and give the prompt a schedule. No code.

  1. Add the server: Add to Claude (after Continue, choose ‘Sign in when needed’) or Add to Cursor. Or paste https://flights.flightpowers.com/mcp.
  2. Sign in with Google, then paste your RapidAPI key once at flights.flightpowers.com/connect. Until you do, the first 10 searches a day are free.
  3. Claude: make a scheduled task at claude.ai/code/routines or with /schedule. It runs on Anthropic’s side, on a paid plan, and can use your connectors (Anthropic’s docs).
  4. Cursor: make an automation at cursor.com/automations with a schedule trigger and this MCP server as a tool (Cursor’s docs).
  5. Paste the prompt:
prompt
Every day, use the FlightPowers Flights tool search_roundtrip_flights once:
from JFK to LIS and DUB, departing 60 days from today, 7 nights, limit 5.
If Google's verdict on any fare is "low", or a fare is under 400 USD, tell me the
fare, the dates, the airline, the usual range and the booking link.
Otherwise write one line: the cheapest fare to each city. Do not search again.

2 requests a day, 62 in a 31-day month. That is 2.5% of PRO’s 2,500. Every date counts here: two cities over a whole month of dates is 62 a day and 1,922 a month. For a month of dates every day, setups 1 and 3 do it in 2.

real tool call · 2026-11-25 20:42 UTC · rows trimmed
search_roundtrip_flights
{"from_airport": "JFK", "to_airport": ["LIS", "DUB"], "departure_date": "2027-01-26", "nights": 7, "limit": 2}

to_airport    dates                     total  stops  airline (outbound)          Google says  usual range
Dublin (DUB)  2027-01-26 to 2027-02-02  $394   2      Icelandair                  typical      345-610
Lisbon (LIS)  2027-01-26 to 2027-02-02  $556   0      Tap Air Portugal | JetBlue  typical      410-650

search_coverage: requested_combinations 2, searched_combinations 2, hub_requests_billed 2

The tool call the prompt makes, with a fixed date and limit 2, sent to the server directly on our own key. The schedule itself is Claude’s or Cursor’s; their docs above were read on 2026-11-25. Every answer carries api_usage, so you can see what a run spent.

Next

Once it runs