Sand AISand AI MAGI-2MAGI-2가 이제 SandBase에서 제공됩니다: 네이티브 오디오가 포함된 1080p 동영상지금 사용해 보기

Google Flights Search

API 문서
https://api.sandbase.ai/v1/api/google-flights/search

Google Flights itineraries for a route and date: airlines, times, stops, durations, prices and price insights.

가격
$0.015USD / 호출
메서드
POST
응답
JSON
매개변수
필수 3개 · 선택 사항 3개

Playground

입력
origin airport/location code
destination airport/location code
YYYY-MM-DD
1 round trip (default) | 2 one way | 3 multi-city
YYYY-MM-DD, required when type=1
currency
출력준비됨

출력이 여기에 표시됩니다

입력을 완료한 다음 Run을 클릭하세요.

API README

Google Flights Search API

Returns Google Flights itineraries for one route and date. Each itinerary lists the flight legs, layovers, total duration, price and carbon emissions. You send an origin code, a destination code and an outbound date.

Use cases

  • Compare the cheapest one-way fares from Paris (CDG) to Austin (AUS) on a given day.
  • Build a flight picker that shows each leg, its airline, aircraft and departure and arrival times.
  • Filter itineraries by number of stops or layover length to find short connections.
  • Rank options by carbon emissions against the typical figure for the route.

Request

curl -X POST "https://api.sandbase.ai/v1/api/google-flights/search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"departure_id": "CDG", "arrival_id": "AUS", "outbound_date": "2026-12-15", "type": "2"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
arrival_idstringYesdestination airport/location code
departure_idstringYesorigin airport/location code
outbound_datestringYesYYYY-MM-DD
currencystringNocurrency
return_datestringNoYYYY-MM-DD, required when type=1
typestringNo1 round trip (default) / 2 one way / 3 multi-city

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "airports": [
    {
      "arrival": [
        {
          "airport": {
            "id": "AUS",
            "name": "Austin-Bergstrom International Airport"
          },
          "city": "Austin",
          "country": "United States",
          "country_code": "US",
          "image": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRKdjkMcBZuGRD1MjnuLQvdGtpT…",
          "thumbnail": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSQ73FSj9E8pKaNvjWKyEDQGfLV…"
        }
      ],
      "departure": [
        {
          "airport": {
            "id": "CDG",
            "name": "Aéroport de Paris-Charles de Gaulle"
          },
          "city": "Paris",
          "country": "France",
          "country_code": "FR",
          "image": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQGx8ii2KbSDdbdzfKye5oDN2bw…",
          "thumbnail": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSyQJ-woNs0iO22mPSkmRUM5gcs…"
        }
      ]
    }
  ],
  "best_flights": [
    {
      "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/DL.png",
      "booking_token": "WyJDalJJ…",
      "carbon_emissions": {
        "difference_percent": 16,
        "this_flight": 598000,
        "typical_for_this_route": 517000
      },
      "extensions": [
        "Checked baggage for a fee"
      ],
      "flights": [
        {
          "airline": "Delta",
          "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/DL.png",
          "airplane": "Airbus A330",
          "arrival_airport": {
            "id": "MSP",
            "name": "Minneapolis-Saint Paul International Airport",
            "time": "2026-12-15 13:10"
          },
          "departure_airport": {
            "id": "CDG",
            "name": "Aéroport de Paris-Charles de Gaulle",
            "time": "2026-12-15 10:30"
          },
          "duration": 580,
          "extensions": [
            "Average legroom (31 in)"
          ],
          "flight_number": "DL 153"
        }
      ],
      "layovers": [
        {
          "duration": 95,
          "id": "MSP",
          "name": "Minneapolis-Saint Paul International Airport"
        }
      ],
      "price": 949,
      "total_duration": 847,
      "type": "One way"
    }
  ],
  "other_flights": [
    {
      "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/multi.png",
      "booking_token": "WyJDalJJ…",
      "carbon_emissions": {
        "difference_percent": 38,
        "this_flight": 712000,
        "typical_for_this_route": 517000
      },
      "extensions": [
        "1 checked bag up to 23 kg included"
      ],
      "flights": [
        {
          "airline": "Air Tahiti Nui",
          "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/TN.png",
          "airplane": "Boeing 787",
          "arrival_airport": {
            "id": "LAX",
            "name": "Los Angeles International Airport",
            "time": "2026-12-15 14:00"
          },
          "departure_airport": {
            "id": "CDG",
            "name": "Aéroport de Paris-Charles de Gaulle",
            "time": "2026-12-15 11:35"
          },
          "duration": 685,
          "extensions": [
            "Average legroom (31 in)"
          ],
          "flight_number": "TN 7"
        }
      ],
      "layovers": [
        {
          "duration": 288,
          "id": "LAX",
          "name": "Los Angeles International Airport"
        }
      ],
      "price": 766,
      "total_duration": 1156,
      "type": "One way"
    }
  ],
  "price_insights": {
    "lowest_price": 766,
    "price_history": [
      [
        1788386400
      ]
    ],
    "price_level": "typical",
    "typical_price_range": [
      630
    ]
  }
}

Response fields

FieldMeaning
best_flights[] / other_flights[]Lists of itineraries. best_flights holds the top-ranked options and other_flights holds the rest. Both use the same structure.
best_flights[].priceTotal fare for the itinerary as a number. The response does not show the currency, so set currency in the request if you need a specific one.
best_flights[].total_durationTotal travel time of the itinerary, including layovers. The 847 value for a trip with 580 and 172 minute legs and a 95 minute layover suggests minutes.
best_flights[].flights[]The individual legs of the itinerary, in order. A one-stop itinerary has two legs.
best_flights[].flights[].departure_airport.id / best_flights[].flights[].arrival_airport.idAirport code for the start and end of a leg. Each object also has name and time in YYYY-MM-DD HH:MM format.
best_flights[].flights[].airline / best_flights[].flights[].flight_number / best_flights[].flights[].airplaneOperating airline, flight number such as DL 153, and aircraft type for the leg.
best_flights[].flights[].durationDuration of a single leg. Values like 580 and 172 are consistent with minutes.
best_flights[].layovers[]One entry per connection, with the airport id, name and layover duration.
best_flights[].carbon_emissions.this_flight / best_flights[].carbon_emissions.typical_for_this_route / best_flights[].carbon_emissions.difference_percentEmissions for this itinerary, the typical value for the route, and the percent difference between them. Negative values mean lower than typical.
best_flights[].booking_tokenToken string for the itinerary. Keep it if you need to refer to a specific option later.

Notes

  • Use airport codes such as CDG and AUS for departure_id and arrival_id.
  • type is 1 for round trip (default), 2 for one way or 3 for multi-city. return_date is required when type is 1.
  • Leg times are local-looking strings in YYYY-MM-DD HH:MM format. A leg can arrive on the next date, as the Istanbul connection shows.
  • The airports array describes the departure and arrival airports with city, country and country code.

Pricing

$0.015 per successful call. Failed calls are not charged.

더 살펴보기

관련 API

모든 API
API가격응답
Google Flights$0.015 / 호출JSON
Google Flights$0.01 / 호출JSON
Google Flights$0.01 / 호출JSON
Google Flights$0.01 / 호출JSON

질문

FAQ

Google Flights Search API를 어떻게 사용하나요?

Authorization 헤더(Bearer)에 SandBase API 키를 넣고, 매개변수를 JSON 본문으로 담아 https://api.sandbase.ai/v1/api/google-flights/search에 POST 요청을 보내세요. 이 페이지의 Playground에서도 코드를 작성하지 않고 직접 테스트할 수 있습니다.

Google Flights Search API 비용은 얼마인가요?

호출당 $0.015, SandBase 잔액에서 청구됩니다. 사용한 호출에 대해서만 요금이 부과되며, 구독은 없습니다.

Google Flights Search API는 어떤 매개변수를 받나요?

필수: departure_id (string), arrival_id (string) 및 outbound_date (string). 선택: type (string), return_date (string) 및 currency (string). 이 페이지의 Parameters 표와 Playground에 모든 필드가 나와 있습니다.

Google Flights Search API는 무엇을 반환하나요?

같은 HTTP 요청에서 반환되는 JSON 응답입니다(동기식). 이 페이지의 README에 샘플 응답이 포함되어 있습니다.

Google Flights 개발자 계정이나 API 키가 필요한가요?

아니요. Google Flights Search은 SandBase를 통해 실행되므로, SandBase API 키 하나로 이 엔드포인트와 카탈로그의 다른 모든 API 및 모델을 사용할 수 있습니다. Google Flights API 액세스를 별도로 신청할 필요는 없습니다.