Recipe · Flights API
Round-trip search with Cursor
Round-trip is a first-class paired-leg search: one object per itinerary with both legs already matched and a combined total, not two one-way lists the agent has to cross-join. The agent reads total_price and presents real bookable combinations.
Free tier on RapidAPI. No card to try.
Step 1 · Connect
Add to .cursor/mcp.json
Restart Cursor. It hits the 401, registers itself, and offers you the sign-in: Add the URL, click Sign in, sign in with Google, and paste your RapidAPI key once on the page that opens. One URL, whichever way you connect. The same shape works in any mcp.json-style client. For scripts, CI and clients without a sign-in button, keep the same URL and add a header instead: { "mcpServers": { "flights": { "url": "https://flights.flightpowers.com/mcp", "headers": { "x-rapidapi-key": "YOUR_RAPIDAPI_KEY" } } } }
{
"mcpServers": {
"flights": { "url": "https://flights.flightpowers.com/mcp" }
}
}Bring your own RapidAPI key: every request is billed to your own subscription, never ours.
Step 2 · Ask it
The prompt
Verbatim: paste it, or anything shaped like it. The agent maps it to the call below.
“I need a round trip New York to Paris, out October 6, back October 13. What are my options?”
Step 3 · Under the hood
What the agent calls
No glue code: the agent reads the tool schema, picks the tool, and fills these parameters from your prompt.
// search_roundtrip_flights
{
"from_airport": "JFK",
"to_airport": "CDG",
"departure_date": "2026-10-06",
"return_date": "2026-10-13",
"limit": 5
}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.
total_pricestringThe combined price of the paired round-trip itinerary: one number for both legs, because they were searched together. total_price_as_number is the integer.
total_duration_secondsnumberTravel time across both legs, in seconds, sortable without parsing a display string.
departure_flight_airlinestringOperating carrier on the outbound leg.
return_flight_airlinestringOperating carrier on the return leg, paired to the same itinerary, not cross-joined.
buy_linkstring (URL)A Google Flights deep link that reopens this exact itinerary. Hand it to the user; it just works.
Questions, answered plainly
- Is my key billed to me?
- Yes. The MCP server is bring-your-own-key: Cursor sends your RapidAPI key with each call and usage meters against your own subscription on RapidAPI. There is no FlightPowers account and no second bill.
- Does this need a server of mine?
- No. The MCP servers are hosted at flights.flightpowers.com and hotels.flightpowers.com: you add a URL to Cursor, not a deployment.
- 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.
Also works with
Round-trip search, elsewhere in your stack
More recipes
More to build in Cursor
One-way flight search
Flights API · search_oneway_flights
Price-insights check
Flights API · search_oneway_flights
Cheapest-date scan
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.