Google Flights itineraries by route and date — prices
serpapi.x.google-flightsLive Google Flights results — best/other flights, price insights, for a route and date
- 价格
- $0.015/success按供应商原价
- 成功率
- 100%近 30 天 · 4,268 次
- 延迟 p50
- 2.8 秒p95 14 秒
- 最后验证
- 2026年7月28日实测可用
GEThttps://toolswitch.dev/v1/tools/serpapi.x.google-flights?type=2&engine=google_flights&arrival_id=AUS&departure_id=CDG&outbound_date=2026-09-01预览在线试用即将上线供应商文档 ↗
- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
answers arrive in `best_flights` and `other_flights`; `price_insights` gives the typical price range.
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 查询参数 | ||||
type | 字符串 | 可选 | 1 round trip (default) | 2 one way | 3 multi-city | 2 |
engine | 字符串 | 必填 | google_flights | |
currency | 字符串 | 可选 | USD | |
arrival_id | 字符串 | 必填 | destination airport/location code | AUS |
return_date | 字符串 | 可选 | YYYY-MM-DD, required when type=1 | |
departure_id | 字符串 | 必填 | origin airport/location code | CDG |
outbound_date | 字符串 | 必填 | YYYY-MM-DD | 2026-09-01 |
- 查询参数
type字符串可选1 round trip (default) | 2 one way | 3 multi-city
示例:
2engine字符串必填示例:
google_flightscurrency字符串可选示例:
USDarrival_id字符串必填destination airport/location code
示例:
AUSreturn_date字符串可选YYYY-MM-DD, required when type=1
departure_id字符串必填origin airport/location code
示例:
CDGoutbound_date字符串必填YYYY-MM-DD
示例:
2026-09-01
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
预览
curl -X GET 'https://toolswitch.dev/v1/tools/serpapi.x.google-flights?type=2&engine=google_flights&arrival_id=AUS&departure_id=CDG&outbound_date=2026-09-01' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/serpapi.x.google-flights?type=2&engine=google_flights&arrival_id=AUS&departure_id=CDG&outbound_date=2026-09-01",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/serpapi.x.google-flights?type=2&engine=google_flights&arrival_id=AUS&departure_id=CDG&outbound_date=2026-09-01", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 $0.015/success 计费,已含服务费。