Call it
curl https://api.peume.com/v1/call/discover-destinations-by-fare \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"origins": [],
"trip_type": "oneway"
}
}'const res = await fetch("https://api.peume.com/v1/call/discover-destinations-by-fare", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"origins": [],
"trip_type": "oneway"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/discover-destinations-by-fare",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"origins": [],
"trip_type": "oneway"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: discover-destinations-by-fare.
Parameters
originsRequiredarrayIATA city or airport codes. See `origin_type` for how an untyped code is read.
destinationsarrayIATA city or airport codes. Omit for global discovery (`/flights/destinations`) or to scan every destination from the origins. See `destination_type` for how an untyped code is read.
origin_typestringHow to read the code: `city` searches every airport of the city, `airport` only that one airport. Omit it and the platform applies one rule: a code that names a multi-airport city is searched as the city; every other code is searched as the airport. Untyped NYC, LON or PAR is the city; untyped JFK, LHR or CDG is the airport; and untyped LAX, MIA or LAS — codes a city shares with its main airport — is the CITY, so results can land at any airport of that city. If the user named the airport, send `airport`; if they named the city, omit the field.
city · airport
destination_typestringHow to read the code: `city` searches every airport of the city, `airport` only that one airport. Omit it and the platform applies one rule: a code that names a multi-airport city is searched as the city; every other code is searched as the airport. Untyped NYC, LON or PAR is the city; untyped JFK, LHR or CDG is the airport; and untyped LAX, MIA or LAS — codes a city shares with its main airport — is the CITY, so results can land at any airport of that city. If the user named the airport, send `airport`; if they named the city, omit the field.
city · airport
departure_datesarraydeparture_date_rangesarrayreturn_datesarrayreturn_date_rangesarraystay_daysintegerstay_days_rangeobjecttrip_typeRequiredstringoneway · roundtrip
cabin_classstringeconomy · premium_economy · business · first
direct_onlybooleanOnly direct flights: non-stop on every leg.
accuracystringHow strict the freshness check on cached fares is. `standard` (default) returns fares estimated to be at least 80% likely to still be available at the cached price; `high` raises that to 95%, so fewer fares come back.
standard · high
include_carriersarrayKeep only itineraries ticketed by these IATA carriers (the validating carrier, which issues the ticket). A codeshare segment marketed or operated by another airline does not change the match. Unlike `/flights/search`, which matches the marketing carrier of every segment.
exclude_carriersarrayDrop itineraries ticketed by these IATA carriers (the validating carrier). Must not overlap `include_carriers`.
max_totalnumberCaps the cached fare's total. Cached fares are priced for one adult.
currencystringlocalestringlimitintegerThe maximum number of destinations returned, 1 to 100, default 20. It counts destinations, not itineraries: each destination carries up to `flights_per_destination` itineraries.
offsetintegersort_bystringThe order of the results. `lowest`, the only order today, is cheapest first by the cached one-adult total; on `/flights/destinations` it orders destinations by their cheapest itinerary. Omit it for the same order.
lowest
flights_per_destinationinteger