# Goole Flights

**SERP API谷歌查询参数**

通过Thordata的SERP API配置谷歌flight查询，支持高级参数、乘客数量输出选项等定制功能。

<details>

<summary><strong><code>departure_id</code></strong>,出发机场代码<strong>(必填)</strong></summary>

参数定义出发机场代码或位置 `kgmid`。

机场代码是三个大写的字母代码。您可以在 Google Flights或IATA上搜索。

例如，`CDG`是巴黎戴高乐机场，`AUS`是奥斯汀-伯格斯特国际机场。

位置 kgmid 是一个以 开头的字符串。您可以在Wikidata/m/上搜索位置，并使用其“Freebase ID”作为位置 `kgmid`。例如，是德克萨斯州奥斯汀的位置 `kgmid`。您可以指定多个出发机场，用逗号分隔。

**示例请求：**\
使用参数的示例值： **`departure_id`**: CDG

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_flights" \
 -d "departure_id=CDG" \
 -d "arrival_id=AUS" \
 -d "json=1" \
 -d "outbound_date=2025-08-31"
```

</details>

<details>

<summary><strong><code>arrival_id</code></strong>,到达机场代码 <strong>(必填)</strong></summary>

参数定义出发机场代码或位置 `kgmid`。

机场代码是三个大写的字母代码。您可以在 Google Flights或IATA上搜索。

例如，`CDG`是巴黎戴高乐机场，`AUS`是奥斯汀-伯格斯特国际机场。

位置 kgmid 是一个以 开头的字符串。您可以在Wikidata/m/上搜索位置，并使用其“Freebase ID”作为位置 `kgmid`。例如，是德克萨斯州奥斯汀的位置 `kgmid`。您可以指定多个出发机场，用逗号分隔。

**示例请求：**\
使用参数的示例值： **`arrival_id`**: AUS

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_flights" \
 -d "departure_id=CDG" \
 -d "arrival_id=AUS" \
 -d "json=1" \
 -d "outbound_date=2025-08-31"
```

</details>

## 高级参数

<details>

<summary><strong><code>outbound_date</code> ,</strong>出站日期<strong>(非必填)</strong></summary>

参数定义出站日期。格式为 `YYYY-MM-DD`。例如`2025-09-03`

**示例请求：**\
使用参数的示例值： **`departure_id`**: CDG,**`arrival_id`**: AUS,`outbound_date`:2025-08-31

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_flights" \
 -d "departure_id=CDG" \
 -d "arrival_id=AUS" \
 -d "json=1" \
 -d "outbound_date=2025-08-31"
```

</details>

<details>

<summary><strong><code>return_date</code> ,</strong>返回日期<strong>(非必填)</strong></summary>

参数定义返回日期。格式为 `YYYY-MM-DD`。例如`2025-09-06`

**示例请求：**\
使用参数的示例值： **`departure_id`**: CDG,**`arrival_id`**: AUS,`return_date`:2025-09-06

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_flights" \
 -d "departure_id=CDG" \
 -d "arrival_id=AUS" \
 -d "json=1" \
 -d "outbound_date=2025-08-31" \
 -d "return_date=2025-09-06"
```

</details>

<details>

<summary><strong><code>travel_class</code> ,</strong>旅行舱位<strong>(非必填)</strong></summary>

参数定义旅行舱位。

可用选项：

`1`- 经济舱（默认）

`2`- 高级经济舱

`3`- 商务舱

`4`- 头等舱

**示例请求：**\
使用参数的示例值：**`departure_id`**: CDG,**`arrival_id`**: AUS,`travel_class`:1

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_flights" \
 -d "departure_id=CDG" \
 -d "arrival_id=AUS" \
 -d "json=1" \
 -d "travel_class=1"
```

</details>

## 乘客人数

<details>

<summary><strong><code>adults</code> ,</strong>人数<strong>(非必填)</strong></summary>

此参数定义成人数量。默认为 1。

**示例请求：**\
使用参数的示例值： **`departure_id`**: CDG,**`arrival_id`**: AUS,**`adults`**:1

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_flights" \
 -d "departure_id=CDG" \
 -d "arrival_id=AUS" \
 -d "json=1" \
 -d "adults=1"
```

</details>

<details>

<summary><strong><code>children</code> ,</strong>孩子数量<strong>(非必填)</strong></summary>

参数定义孩子的数量。默认为 0。

**示例请求：**\
使用参数的示例值： **`departure_id`**: CDG,**`arrival_id`**: AUS,**`children`**:0

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_flights" \
 -d "departure_id=CDG" \
 -d "arrival_id=AUS" \
 -d "json=1" \
 -d "children=0"
```

</details>

<details>

<summary><strong><code>infants_in_seat</code>,</strong>座位上的婴儿人数<strong>(非必填)</strong></summary>

此参数定义座位上可容纳的婴儿数量。默认为 0。

**示例请求：**\
使用参数的示例值 **`departure_id`**: CDG,**`arrival_id`**: AUS,**`infants_in_seat`**:1

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_flights" \
 -d "departure_id=CDG" \
 -d "arrival_id=AUS" \
 -d "json=1" \
 -d "infants_in_seat=1"
```

</details>

<details>

<summary><strong><code>infants_on_lap</code> ,</strong>怀抱婴儿的数量<strong>(非必填)</strong></summary>

此参数定义怀抱婴儿的数量。默认为 0。

**示例请求：**\
使用参数的示例值  **`departure_id`**: CDG,**`arrival_id`**: AUS,**`infants_on_lap`**:0

```sh
curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_flights" \
 -d "departure_id=CDG" \
 -d "arrival_id=AUS" \
 -d "json=1" \
 -d "infants_on_lap=0"
```

</details>

如需进一步协助，请联系支持邮箱：[support@thordata.com](https://mailto:support@thordata.com/)。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.thordata.com/doc/zh/pa-qu/serp-api/cha-xun-can-shu/gu-ge/goole-flights.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
