Call it
curl https://api.peume.com/v1/call/chart-route-demand \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"origins": "your origins",
"destinations": "your destinations"
}
}'const res = await fetch("https://api.peume.com/v1/call/chart-route-demand", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"origins": "your origins",
"destinations": "your destinations"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/chart-route-demand",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"origins": "your origins",
"destinations": "your destinations"
}
},
)
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: chart-route-demand.
Parameters
originsRequiredstringComma-separated origin selectors `<Level>:<Code>` (e.g. `Country:US,Country:CA`). v1: at most one of origins/destinations may have more than one entry.
destinationsRequiredstringComma-separated destination selectors `<Level>:<Code>` (e.g. `Country:FR`).
departure_date_fromstringStart of the departure window (YYYY-MM-DD). Supply together with departure_date_to; omit both (recommended) for no departure-date filter — each bucket then counts searches for all departure dates. A window anchored at the query date counts only long-advance-purchase searches in old buckets and near-departure searches in recent ones, ramping the curve artificially.
departure_date_tostringEnd of the departure window (YYYY-MM-DD). Supply together with departure_date_from; omit both for no departure-date filter.
traveler_typestringSolo · Couple · Group · Family
trip_typestringoneway · roundtrip
trip_duration_minstringtrip_duration_maxstringsearch_window_minstringsearch_window_maxstringtrend_windowintegerNumber of buckets N, in the chosen granularity unit (min 2; max depends on granularity: day <= 60, week <= 52, month <= 12; default 12). The series spans the last N complete buckets, excluding the in-progress one (day: last N days ending yesterday; week: last N full Monday-Sunday weeks; month: last N full calendar months).
granularitystringBucket size for the returned series: week (default), day, or month.
day · week · month
