Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

Google Flights Deals

เอกสาร API
https://api.sandbase.ai/v1/api/google-flights/deals

Find discounted Google Flights fares from a departure airport, with destination, price, discount, dates and airline.

ราคา
$0.01USD / คำขอ
Method
POST
การตอบกลับ
JSON
พารามิเตอร์
0 จำเป็น · 21 ไม่บังคับ

Playground

อินพุต
Parameter defines the 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,
Parameter defines the 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) Head to the Google countries page for a full list of supported Google countries.
Parameter defines the 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). Head to the Google languages page for a full list of supported Google languages.
Parameter defines the currency of the returned prices. Default to `USD`. Head to the Google Travel Currencies page for a full list of supported currency codes.
Parameter defines the 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.
Parameter defines the type of the flights. Available options: `1` - Round trip (default) `2` - One way
Parameter defines the travel class. Available options: `1` - Economy (default) `2` - Premium economy `3` - Business `4` - First
Parameter defines when 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-11-13` — depart on this exact date `2026-11-13,2026-12-12` — 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
Parameter defines when 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-11-19` — return on this exact date (use with a single `outbound_date`) `2026-11-19,2026-12-19` — 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
Parameter defines a 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-11-13,2026-12-12`) to limit the departure window. Cannot be combined with `return_date`, `trip_length`, or `query`. Not available for one-way flights (`type` = `2`).
Parameter defines a 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-11-13,2026-12-12`) 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
Parameter defines the number of adults. Default to 1.
Parameter defines the number of children. Default to 0.
Parameter defines the number of infants in seat. Default to 0.
Parameter defines the number of infants on lap. Default to 0.
Parameter defines the 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
Parameter defines the airline codes to be excluded. Split multiple airlines with comma. It can't be used together with `include_airlines`. 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.
Parameter defines the airline codes to be included. Split multiple airlines with comma. It can't be used together with `exclude_airlines`. 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.
Parameter defines the maximum ticket price. Default to unlimited.
Parameter defines the 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.
Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
เอาต์พุตพร้อมใช้งาน

เอาต์พุตของคุณจะแสดงที่นี่

กรอกอินพุตให้ครบ แล้วคลิก Run

API README

Google Flights Deals

Find discounted Google Flights fares from a departure airport, with destination, price, discount, dates and airline.

Request

curl -X POST "https://api.sandbase.ai/v1/api/google-flights/deals" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"departure_id": "AUS"}'

The result is returned in outputs[0].data as structured JSON.

Parameters

NameTypeRequiredDescription
departure_idstringNoParameter defines the 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 an
glstringNoParameter defines the 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) Head to the Google countries page for a full list of s
hlstringNoParameter defines the 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 c
currencystringNoParameter defines the currency of the returned prices. Default to USD. Head to the Google Travel Currencies page for a full list of supported currency codes.
querystringNoParameter defines the 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.
typestringNoParameter defines the type of the flights. Available options: 1 - Round trip (default) 2 - One way
travel_classstringNoParameter defines the travel class. Available options: 1 - Economy (default) 2 - Premium economy 3 - Business 4 - First
outbound_datestringNoParameter defines when 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-11-13 — depart on this exact date 2026-11-13,2026-12-12 —
return_datestringNoParameter defines when 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-11-19 — return on this exact date (use with a single `outbound_dat
travel_durationstringNoParameter defines a 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 d
trip_lengthstringNoParameter defines a 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 d
adultsstringNoParameter defines the number of adults. Default to 1.
childrenstringNoParameter defines the number of children. Default to 0.
infants_in_seatstringNoParameter defines the number of infants in seat. Default to 0.
infants_on_lapstringNoParameter defines the number of infants on lap. Default to 0.
stopsstringNoParameter defines the 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
exclude_airlinesstringNoParameter defines the airline codes to be excluded. Split multiple airlines with comma. It can't be used together with include_airlines. Each airline code should be a 2-character IATA code consisting of either two uppercase letters or one
include_airlinesstringNoParameter defines the airline codes to be included. Split multiple airlines with comma. It can't be used together with exclude_airlines. Each airline code should be a 2-character IATA code consisting of either two uppercase letters or one
max_pricestringNoParameter defines the maximum ticket price. Default to unlimited.
max_durationstringNoParameter defines the 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 varia
json_restrictorstringNoParameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.

Pricing

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

สำรวจเพิ่มเติม

APIs ที่เกี่ยวข้อง

APIs ทั้งหมด
APIราคาการตอบกลับ
Google Flights$0.01 ต่อการเรียกJSON
Google Flights$0.01 ต่อการเรียกJSON
Google Flights$0.01 ต่อการเรียกJSON
Google Flights$0.015 ต่อการเรียกJSON

คำถาม

คำถามที่พบบ่อย

ฉันจะใช้ Google Flights Deals API ได้อย่างไร?

ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/google-flights/deals โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด

Google Flights Deals API ราคาเท่าไร?

$0.01 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน

Google Flights Deals API รับพารามิเตอร์อะไรบ้าง?

ไม่ต้องระบุพารามิเตอร์ ตัวเลือก: departure_id (string), gl (string), hl (string), currency (string), query (string) และ type (string) และอีก 15 รายการ ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

Google Flights Deals API ส่งคืนอะไร?

การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส)

ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ Google Flights ไหม?

ไม่จำเป็น Google Flights Deals ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Google Flights API แยกต่างหาก