Recipe · Flights API
Cheapest-date scan with REST
The tool accepts a date RANGE and expands it internally: one call, not thirty. The agent gets a fare per day and answers with the cheapest date and how much picking it saves. Over REST, the same scan is a parallel burst of per-date requests; the rate limits (150–500/min by tier) exist exactly for this.
Free tier on RapidAPI. No card to try.
Step 1 · Connect
POST to api.flightpowers.com
The API on our own domain, with an OpenAPI spec at a fixed path. x-api-key, x-rapidapi-key and Authorization: Bearer are all accepted and equivalent. The key is the one RapidAPI issued you; there is no second account.
curl -X POST "https://api.flightpowers.com/v1/flights/oneway" \
-H "x-api-key: $RAPIDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"from_airport":"LHR","to_airport":"JFK","departure_date":"2026-10-13"}'Bring your own RapidAPI key: every request is billed to your own subscription, never ours.
Step 2 · The job
The job
The job in plain words. In REST you express it as the configuration below instead of a prompt.
“What is the cheapest day to fly LIS to New York in November?”
Step 3 · Under the hood
The request
One POST, flat JSON in, flat JSON out. Field names are the ones in the OpenAPI spec.
POST https://api.flightpowers.com/v1/flights/oneway
{
"from_airport": "LIS",
"to_airport": "JFK",
"departure_date": "2026-11-01",
"limit": 5
}The date range is an MCP convenience. Over HTTP it is one request per date, fired in parallel: 30 dates meters as 30 requests, and the per-minute rate limit on your plan is what makes the burst finish quickly.
Step 4 · Read the response
Fields your logic reads
The response is flat JSON. These are the fields this recipe branches on, with what each one means.
departure_datestring (YYYY-MM-DD)The date this fare applies to, the axis a date-range scan pivots on.
pricestringThe fare as Google Flights displays it: “$56”. The numeric twin price_as_number rides alongside for sorting and arithmetic.
price_range_in_relation_to_other_periods"low" | "typical" | "high" | nullGoogle’s verdict on the current fare against that band, the single field alerting, ranking, and “book now” logic branch on.
Questions, answered plainly
- Is my key billed to me?
- Yes. The key is the one RapidAPI issued you, and usage meters against that subscription whichever host you call. There is no FlightPowers account and no second bill.
- Does this need a server of mine?
- No. It is one HTTPS request from whatever already runs your code. The OpenAPI spec is at flightpowers.com/openapi.json if you want to generate a client.
- What does it cost?
- The Google Flights Live API's free tier is 10 requests/month with a hard cap: enough to verify your key works, not to evaluate. The PRO plan is $10/month for 2,500 requests, and every plan includes every endpoint. Budget one request per date scanned: a 30-day sweep meters as 30 requests.
Also works with
Cheapest-date scan, elsewhere in your stack
More recipes
More to build in REST
One-way flight search
Flights API · search_oneway_flights
Round-trip search
Flights API · search_roundtrip_flights
Price-insights check
Flights API · search_oneway_flights
Hotel search
Hotels API · search_hotels
Rate-parity check
Hotels API · find_hotel_by_name
Fare-alert cron
Flights API · search_oneway_flights
Get live flight and hotel data
Live Google Flights and Booking.com data as clean JSON. Free tier on RapidAPI, no card to try.
Free tier: 10 requests/month. No card to try.