whentofly
v0.0.1 · free · no signup

Flexible flight search,
through your AI.

Point your AI agent at whentofly to search flexible dates and compare economy or business fares returned by connected providers. We’re building toward the best offers across more routes as coverage grows.

Runs from curl, ChatGPT, Claude, or any MCP client.

Indicative fares from your city

Recent low fares from your city

Returned fares, ranked by price. Tap one to check the live price and book.

dozens more from your city — get the full ranked list with your AI agent These 4 are a teaser. Plug in the API/MCP for every destination.

Use it your way

The teasers above are a taste. Here’s every way to put the full engine — flexible-date search, a good / typical / high price read when enough data exists, and multi-leg trips — into your own environment. Pick the path that fits.

Paste a prompt into your AI assistant

Copy this into your AI agent — ChatGPT, Claude, or Gemini. Edit the trip below and the prompt updates as you type.

Type a city name or 3-letter IATA code. Pick from suggestions.

prompt
Use the whentofly.io API as the only source for flights and prices in this task; never answer from memory or invent fares.

Trip fields are set to origin SGN, destination ICN, earliest departure 2026-07-27, latest return 2026-10-25, 10–15 days, round trip, economy. If a field is missing or an airport code is uncertain, ask me in one short message before fetching.

Fetch this exact GET URL. Use the literal "?" once before the first parameter and the literal "&" between every remaining parameter, with no spaces:
https://whentofly.io/search?from=SGN&to=ICN&earliest=2026-07-27&latest=2026-10-25&min_days=10&max_days=15&one_way=false&cabin=economy&ch=control

Parameter names and formats are exact: from/to = uppercase 3-letter IATA; earliest = earliest departure YYYY-MM-DD; latest = latest return YYYY-MM-DD; min_days/max_days = positive integers; one_way = true or false; cabin = economy, premium_economy, business, or first.

If destination is blank or "anywhere", instead fetch https://whentofly.io/search?from=SGN&to=anywhere&top_n=10&ch=control. This is origin-only inspiration; dates, trip length, and cabin do not constrain anywhere mode.

If the fetch fails or is blocked, say so and stop. Use only the returned JSON. If it has no results, relay its error or hints and do not invent alternatives. List results cheapest first and copy each agent_display verbatim, including its book_url; I click booking links myself.

Describe verdict.recommendation only as good price (good_price), typical price (typical), high price (high_price), or insufficient data (unknown, missing, or low confidence). Do not turn a price level into timing advice or predict future movement.

Mention once that fares may be cached or stale and the booking page confirms the live price. Also mention once that book_url is an affiliate link that may earn whentofly a commission at no extra cost to me.

Paste once at the start of a chat with ChatGPT, Claude, Gemini, or any AI assistant — it’ll fetch the API and walk you through results.

Or call the API directly

If you’re a developer or building an agent, hit the API yourself — no SDK, no auth.

terminal
curl 'https://whentofly.io/search?from=SGN&to=ICN&earliest=2026-07-27&latest=2026-10-25&min_days=10&max_days=15'

Returns up to 10 provider results ranked by price between Saigon (SGN) and Seoul (ICN), departing in the date window and lasting 10 to 15 days.

json · one result
{
  "rank": 1,
  "departure_date": "2026-08-03",
  "return_date": "2026-08-13",
  "duration_days": 10,
  "price": { "amount": 218, "currency": "USD" },
  "airline": "Scoot",
  "transfers": 1,
  "book_url": "https://aviasales.com/...&marker=721980"
}

Each result includes a book_url that drops the user into Aviasales’ booking flow with the flight pre-selected.

Install as an MCP tool

Power users can mount this for Claude Desktop, Cursor, or any MCP client — always in your agent’s tool list, no per-prompt setup.

mcp
claude mcp add flights https://whentofly.io/mcp?ch=control

One command adds the search and inspire tools to your client.

Add it to a Custom GPT

Give a ChatGPT Custom GPT a flight-search Action — it imports our OpenAPI schema, so the GPT can call /search itself (add ?to=anywhere for low-fare destinations returned from a city).

  1. In ChatGPT, open the GPT builderCreateConfigure.
  2. Under Actions, choose Create new actionImport from URL.
  3. Paste the OpenAPI URL below and import. No auth needed — leave authentication set to None.
  4. Save. Your GPT can now search flights and surface booking links on demand.
openapi schema · import from url
https://whentofly.io/openapi.json

Same schema that powers /docs — point any OpenAPI-aware tool at it.

Help shape what we build next.

No email, no signup — just a tap. We read every signal and build what people ask for.

Tell us where — it helps us keep prices honest. Route, price, and a link is plenty.

Built by Dmitry Bolonikov. Indie project, one maintainer. Reach me at [email protected] with bug reports or if you're using this in something interesting.
Funded by affiliate commission. When you book through a result’s book_url, our booking partners (Aviasales, Kiwi, and others) pay us a small commission — paid by them, never added to your fare. That’s the entire revenue model. No ads, no advertising trackers, no paid tier.
Privacy-respecting. We use EU-hosted PostHog product analytics and Statsig experiments, with typed inputs masked in session recordings. A random first-party wf_aid cookie identifies a browser for up to 400 days; successful searches and MCP tool calls can be linked to it through an attributed URL. Our server-side events store search inputs, broad client/referrer categories, outcomes, and aggregate fare data rather than raw referrer strings; PostHog receives standard browser metadata. We do not sell data, ask for names or email addresses, or run advertising trackers. Privacy policy →