Call it
curl https://api.peume.com/v1/call/rank-destinations-by-demand \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"origin": "your origin"
}
}'const res = await fetch("https://api.peume.com/v1/call/rank-destinations-by-demand", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"origin": "your origin"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/rank-destinations-by-demand",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"origin": "your origin"
}
},
)
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: rank-destinations-by-demand.
Parameters
originRequiredstringOrigin selector `<Level>:<Code>` (e.g. `Country:US`), or `global` for all origins. Required for the destination endpoints.
departure_date_fromstringStart of the departure window (YYYY-MM-DD). Supply together with departure_date_to; omit both for no departure-date filter (all departure dates).
departure_date_tostringEnd of the departure window (YYYY-MM-DD). Supply together with departure_date_from; omit both for no departure-date filter (all departure dates).
traveler_typestringSolo · Couple · Group · Family
trip_typestringoneway · roundtrip
trip_duration_minstringMinimum trip length in nights (return_date − dep_date). Round-trips only.
trip_duration_maxstringMaximum trip length in nights (must be >= trip_duration_min).
search_window_minstringMinimum advance-purchase window in days (dep_date − search_date): keep demand from searches made at least this many days before departure.
search_window_maxstringMaximum advance-purchase window in days (must be >= search_window_min).
snapshot_window_daysintegerNumber of most-recent days of search activity aggregated into the demand level (min 2, default 7, max 90 — a 1-day window is the current day, whose data is incomplete; data is kept for 90 days).
limitintegerMaximum number of result rows. Default 20, max 200.
levelstringRanked output granularity: country (default) or city. Applies to destination/market (not audience).
country · city
destination_countrystringDestination country selector `Country:<code>` (e.g. `Country:FR`). Optional and allowed ONLY together with level=city: it scopes the ranked destinations to a single country so that country’s cities are ranked. Must be a country — a City selector is rejected.
