Google Flights price graph

GET https://api.api.sh/google-flights/v1/price-graph
1 credit / call travel & events try it in the playground →

Google Flights' price graph: the lowest fare per departure day over the next six months by default (or start_date..end_date, up to 300 days), one-way or for round trips of trip_length days. Each day comes with its price and return date; the cheapest and most expensive day and the median price are included.

Every response includes credits_used: the credits this call cost.

Parameters

nametypedescription
originrequired string Departure airport or city: 3-letter IATA code; several comma separated. Example: JFK
destinationrequired string Arrival airport or city: 3-letter IATA code; several comma separated. Example: LHR
trip_length integer Round trip: days between departure and return (1-60). Omit for one-way fares. Example: 7
start_date string First departure day, YYYY-MM-DD (default tomorrow).
end_date string Last departure day, YYYY-MM-DD (default 180 days after start_date).
adults integer Adults (1-9, default 1).
children integer Children (0-8).
infants_in_seat integer Infants with their own seat (0-8).
infants_on_lap integer Infants on a lap (0-8).
cabin economy | premium_economy | business | first Cabin class (default economy).
stops any | nonstop | 1 | 2 At most this many stops: any (default), nonstop, 1, 2.
airlines string Only these airlines: 2-letter IATA airline codes, comma separated (e.g. UA,DL).
currency string Price currency, a 3-letter code (default USD).
country string Two-letter country whose point of sale prices are shown (default US).

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/google-flights/v1/price-graph?origin=JFK&destination=LHR" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.