API di Google Flights

Google Flights Calendar API

Get the Google Flights price calendar for a route: the lowest fare for every departure date across a window of up to 120 days, one way or as a round trip of a fixed length, with the return date of each round trip, a flag on every date within 5% of the cheapest, and the cheapest date of the window, as normalized JSON. Choose cabin class, adults and currency. Prices are the total for all passengers; dates with no fare are left out.

POST/v1/run/google_flights.calendar
Disponibilità
100,00%
30d · 1 chiamata
Richieste
1
30d
Risposta
1,3s
mediana · 30d

Prezzi

Prezzi dell'API Google Flights Calendar

Paghi
8,50 USD
0,85 USD/1k richieste, solo per ciò che usi. Nessun piano mensile.
Le tue prime 117 richieste sono gratuite con il saldo iniziale di 0,10 USD.

Provalo

Ottieni Google Flights Calendar in una sola richiesta

Apri in
Risposta di esempio
Le esecuzioni gratuite restituiscono solo i primi 3 risultati. Ricarica una chiave per ottenere la risposta completa.
{
  "data": {
    "adults": 42,
    "cabinClass": "example",
    "cheapestDepartureDate": "2024-01-15T09:30:00Z",
    "cheapestPrice": 19.99,
    "currency": "USD",
    "dates": [
      {
        "departureDate": "2024-01-15T09:30:00Z",
        "isLowPrice": true,
        "price": 19.99,
        "returnDate": "2024-01-15T09:30:00Z"
      }
    ],
    "departureDateFrom": "2024-01-15T09:30:00Z",
    "departureDateTo": "2024-01-15T09:30:00Z",
    "destination": "example",
    "origin": "example",
    "tripLengthDays": 180,
    "tripType": "one_way"
  },
  "found": true,
  "reason": "not_found"
}

Riferimento completo di parametri e risposta - ogni campo, tipo ed esempio per questo endpoint.

Riferimento

Una richiesta, una sola forma di risposta.

Ogni campo che invii e ogni campo che ricevi, ciascuno con un esempio reale.

Ultima verifica 2026-11-07 · disponibilità e latenza misurate su 30d

Corpo della richiesta

JSON, inviato a questo endpoint.

  • departureDateFromstring

    2026-12-07

    First departure date of the calendar in YYYY-MM-DD format (e.g. 2027-01-12). Today or later.

  • departureDateTostring

    2027-01-05

    Last departure date of the calendar in YYYY-MM-DD format (e.g. 2027-02-10). At most 120 days after departureDateFrom.

  • destinationstring

    LHR

    Arrival airport as a three-letter IATA code in capitals (e.g. LHR), or a Google place ID for a city to cover all of its airports (e.g. /m/04jpl for London).

  • originstring

    JFK

    Departure airport as a three-letter IATA code in capitals (e.g. JFK), or a Google place ID for a city to cover all of its airports (e.g. /m/02_286 for New York).

  • adultsinteger

    Number of adult passengers (1-9, default 1). Prices are for all passengers together. Child passengers cannot be priced on the calendar.

  • cabinClassenum

    Cabin class (default economy).

  • currencystring

    ISO 4217 currency code for prices (e.g. USD, EUR, GBP; default USD).

  • tripLengthDaysinteger

    For a round trip, the number of days between departure and return (1-30, e.g. 7): each date is then priced as a round trip returning that many days later. Omit it for one way.

Tu invii. Un piccolo corpo JSON. I valori mostrati sono esempi da sostituire con i tuoi.

Risposta

JSON, un valore di esempio per campo.

datadata

The price calendar, or null when no date in the window has a fare.

  • adultsinteger

    Number of adult passengers the prices cover.

  • cabinClassstring

    Cabin class the calendar was priced in: economy, premium_economy, business or first.

  • cheapestDepartureDatestring

    Departure date with the lowest fare in the window, YYYY-MM-DD.

  • cheapestPricenumber

    Lowest fare in the window, for all passengers, in currency.

  • currencystring

    ISO 4217 currency code of every price.

  • departureDateFromstring

    First departure date of the window, YYYY-MM-DD.

  • departureDateTostring

    Last departure date of the window, YYYY-MM-DD.

  • destinationstring

    Arrival airport IATA code or city place ID the calendar was priced to.

  • originstring

    Departure airport IATA code or city place ID the calendar was priced from.

  • tripLengthDaysinteger

    Days between departure and return on a round trip; null on one way.

  • tripType"one_way" | "round_trip"

    one_way, or round_trip when a trip length was given.

each datedata.dates[]

One entry per departure date that has a fare, in date order. Dates with no fare are left out. Populated whenever the provider has data for the entity.

  • departureDatestring

    Departure date, YYYY-MM-DD.

  • isLowPriceboolean

    Whether this fare is within 5% of the cheapest fare in the window.

  • pricenumber

    Lowest fare departing on this date, the total for all passengers, in currency.

  • returnDatestring

    Return date of the round trip priced for this departure date, YYYY-MM-DD; null on one way.

top level
  • foundboolean

    Whether any departure date in the window has a fare.

  • reason"not_found"

    Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.

Tu ricevi. Campi con nome e tipo nella stessa struttura, qualunque fonte risponda.

FAQ

Sull'API Google Flights Calendar

L'API Google Flights Calendar di AnyAPI restituisce dati Google Flights come JSON normalizzato da una sola chiamata POST a /v1/run/google_flights.calendar. Get the Google Flights price calendar for a route: the lowest fare for every departure date across a window of up to 120 days, one way or as a round trip of a fixed length, with the return date of each round trip, a flag on every date within 5% of the cheapest, and the cheapest date of the window, as normalized JSON. Choose cabin class, adults and currency. Prices are the total for all passengers; dates with no fare are left out. AnyAPI restituisce un unico schema normalizzato qualunque fonte la serva. Costa da 0,85 USD ogni 1.000 richieste, in dollari statunitensi, senza abbonamento e senza minimo mensile. Negli ultimi 30 giorni, il 100,0% delle chiamate Google Flights Calendar tramite AnyAPI è riuscito, con un tempo di risposta mediano di 1,3 secondi su 1 chiamate misurate.

Costa da 0,85 USD ogni 1.000 richieste, in dollari statunitensi, senza abbonamento e senza minimo mensile. Ricarichi un portafoglio in USD e ogni chiamata lo scala. Alcune richieste fallite finanziate dal portafoglio comportano costi di elaborazione che trasferiamo al costo, senza ricarico; la risposta di errore mostra l'importo addebitato.

Get the Google Flights price calendar for a route: the lowest fare for every departure date across a window of up to 120 days, one way or as a round trip of a fixed length, with the return date of each round trip, a flag on every date within 5% of the cheapest, and the cheapest date of the window, as normalized JSON. Choose cabin class, adults and currency. Prices are the total for all passengers; dates with no fare are left out. La risposta è JSON normalizzato con la stessa busta che restituisce ogni endpoint AnyAPI, quindi analizzare un secondo endpoint significa cambiare l'URL e nient'altro.

Negli ultimi 30 giorni, il 100,0% delle chiamate Google Flights Calendar tramite AnyAPI è riuscito, con un tempo di risposta mediano di 1,3 secondi su 1 chiamate misurate. Sono misurazioni di AnyAPI sul traffico che passa dal gateway, ricalcolate di continuo, non un obiettivo di livello di servizio pubblicato.

Sì. Un nuovo account AnyAPI parte con 0,10 USD di saldo gratuito e senza bisogno di carta, che copre 117 chiamate Google Flights Calendar a 0,00085 USD ciascuna.

Invia una richiesta POST a https://api.getanyapi.com/v1/run/google_flights.calendar con la tua chiave AnyAPI in un header "Authorization: Bearer" e l'input come corpo JSON. La stessa chiave e lo stesso portafoglio funzionano su ogni endpoint AnyAPI.

No. Aggiungi dollari statunitensi a un unico saldo prepagato AnyAPI e ogni richiesta lo scala. Non c'è un piano mensile né un minimo, e lo stesso saldo paga ogni endpoint AnyAPI.

Sì. Installa @getanyapi/sdk da npm per TypeScript o getanyapi da pip per Python. Entrambi chiamano ogni endpoint AnyAPI con la stessa chiave, e funziona anche qualsiasi client HTTP.

Sì. Un agente può collegarsi al server MCP di AnyAPI su https://api.getanyapi.com/mcp, oppure creare da solo la propria chiave di prova gratuita con un POST non autenticato a https://api.getanyapi.com/agent/signup e chiamare questo endpoint via HTTP.