Call it
curl https://api.peume.com/v1/call/google-find-cheap-fares \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"departure_id": "your departure id",
"hl": "your hl"
}
}'const res = await fetch("https://api.peume.com/v1/call/google-find-cheap-fares", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"departure_id": "your departure id",
"hl": "your hl"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-find-cheap-fares",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"departure_id": "your departure id",
"hl": "your hl"
}
},
)
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: google-find-cheap-fares.
Parameters
departure_idstringThe departure airport code or location kgmid. An airport code is an uppercase 3-letter code. You can search for it using our Google Flights Autocomplete API or IATA. For example, `CDG` is Paris Charles de Gaulle Airport and `AUS` is Austin-Bergstrom International Airport. A location kgmid is a string that starts with `/m/` or `/g/`. You can search for a location on Wikidata and use its "Freebase ID" as the location kgmid. For example, `/m/0vzm` is the location kgmid for Austin, TX. You can specify multiple departure airports by separating them with a comma. For example, `CDG,ORY,/m/04jpl`.
hlstringThe language to use for the Google Flights Deals search. It's a two or three-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French), optionally followed by a two-letter or three-digit region code (e.g., `en-gb` for British English, or `es-419` for Latin American Spanish).
glstringThe country to use for the Google Flights Deals search. It's a two-letter country code. (e.g., `us` for the United States, `uk` for United Kingdom, or `fr` for France)
querystringThe natural language query for Google Flights Deals. e.g. `High rises`, `beach vacation next month`. Cannot be combined with `travel_duration` or `trip_length`. Describe the trip duration in `query` instead.
adultsstringThe number of adults. Default to 1.
trip_lengthstringA custom trip length in days when searching with flexible dates. Provide a single number for an exact duration, or two comma-separated numbers for a min/max range. Examples: `7` — exactly 7 days `5,10` — between 5 and 10 days Can be used alone (deals of this length, any departure date) or with `outbound_date` as a date range (e.g., `2026-12-02,2026-12-31`) to limit the departure window. Cannot be combined with `return_date`, `travel_duration`, or `query`. Not available for one-way flights (`type` = `2`). Each value must be at least `1`. When two values are provided, the first (min) must be ≤ t
typestringThe type of the flights. Available options: `1` - Round trip (default) `2` - One way
infants_on_lapstringThe number of infants on lap. Default to 0.
outbound_datestringWhen you want to depart. Use a single YYYY-MM-DD date for an exact departure date, or two comma-separated dates for a flexible departure window. Examples: `2026-12-02` — depart on this exact date `2026-12-02,2026-12-31` — depart anytime within this window With a **single date**: `return_date` (single date) is required for round trip flights. With a **date range**: optionally combine with one of `return_date` (as a range), `travel_duration`, or `trip_length` to control the trip length. If none are provided, deals of any duration are returned. If omitted entirely, deals for any date are returned
travel_durationstringA preset trip duration when searching with flexible dates. Available options: `1` - 1 week (default) `2` - Weekend `3` - 2 weeks Can be used alone (deals of this duration, any departure date) or with `outbound_date` as a date range (e.g., `2026-12-02,2026-12-31`) to limit the departure window. Cannot be combined with `return_date`, `trip_length`, or `query`. Not available for one-way flights (`type` = `2`).
max_durationstringThe maximum flight duration, in minutes. For example, specify `1500` for 25 hours. If your search returns no results, try increasing your `max_duration` by up to `200` minutes to account for route-specific scheduling variances.
infants_in_seatstringThe number of infants in seat. Default to 0.
max_pricestringThe maximum ticket price. Default to unlimited.
include_airlinesstringThe airline codes to be included. Split multiple airlines with comma. Each airline code should be a 2-character IATA code consisting of either two uppercase letters or one uppercase letter and one digit. You can search for airline codes on IATA. For example, `UA` is United Airlines. Additionally, alliances can be also included here: `STAR_ALLIANCE` - Star Alliance `SKYTEAM` - SkyTeam `ONEWORLD` - Oneworld `exclude_airlines` and `include_airlines` parameters can't be used together.
childrenstringThe number of children. Default to 0.
exclude_airlinesstringThe airline codes to be excluded. Split multiple airlines with comma. Each airline code should be a 2-character IATA code consisting of either two uppercase letters or one uppercase letter and one digit. You can search for airline codes on IATA. For example, `UA` is United Airlines. Additionally, alliances can be also included here: `STAR_ALLIANCE` - Star Alliance `SKYTEAM` - SkyTeam `ONEWORLD` - Oneworld `exclude_airlines` and `include_airlines` parameters can't be used together.
currencystringThe currency of the returned prices. Default to `USD`.
stopsstringThe number of stops during the flight. Available options: `0` - Any number of stops (default) `1` - Nonstop only `2` - 1 stop or fewer `3` - 2 stops or fewer
travel_classstringThe travel class. Available options: `1` - Economy (default) `2` - Premium economy `3` - Business `4` - First
json_restrictorstringThe fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
return_datestringWhen you want to return. Use a single YYYY-MM-DD date for an exact return date, or two comma-separated dates for a flexible return window. Examples: `2026-12-08` — return on this exact date (use with a single `outbound_date`) `2026-12-08,2027-01-07` — return anytime within this window (use with a range `outbound_date`) Not available for one-way flights (`type` = `2`). A single `return_date` must be paired with a single `outbound_date`. A range `return_date` must be paired with a range `outbound_date`. Cannot be combined with `travel_duration` or `trip_length` (use one or the other to define tr
