# Google ホテル検索タスクを設定

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/business_data/google/hotel_searches/task_post`

**Tags:** DataForSEO

Google Hotels の検索をキューに登録し、タスク `id` を返します。DataForSEO のエンベロープ構造です。データは `tasks[0].result`、結果ステータスは `tasks[0].status_code` に格納され、拒否されたリクエストでも HTTP 200 が返ります。`get_dataforseo_business_google_hotel_searches_fetch` で取得します。

### 料金の参考情報

- 計量方式：レスポンスで報告されるコスト。
- 参考リクエスト見積もり：0.2428 USD。
- 参考顧客乗数：1.0。確定済みの顧客金額に再適用しないでください。

参照用のメタデータのみであり、アカウントへの見積もり、保証された価格、支出上限ではありません。リソースクレジットは Felo クレジットではありません。最終的な請求は Felo の請求記録に従います。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "keyword": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>キーワード</em><br>任意フィールド<br>指定したキーワードはホテルの一覧を検索するために使用されます；<br>このフィールドを使用しない場合、指定したロケーションで見つかったホテルの一覧が返されます；<br><code>keyword</code> フィールドには<strong>最大 700 文字</strong>まで指定できます<br><strong>すべての %## はデコードされます（また、文字 ‘+’ はスペースにデコードされます）</strong><br><code>keyword</code> に “%” 文字を使用する場合は “%25” と指定してください； <br><strong>注意：</strong>正確な検索結果を得るため、ロケーション名がキーワードに自動的に追加されます<p>DataForSEO API の <code>keyword</code> および <code>keywords</code> フィールドのルールと制限については、こちらの<a href=\"https://dataforseo.com/help-center/rules-and-limitations-of-keyword-and-keywords-fields-in-dataforseo-apis\" rel=\"noopener noreferrer\" target=\"_blank\">ヘルプセンター記事</a>をご覧ください"
          },
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>タスクの優先度</em><br>任意フィールド<br>次の値を指定できます：<br>1 – 通常の実行優先度（デフォルトで設定）<br>2 – 高い実行優先度。実行優先度の高いタスクには追加料金がかかります。<br>コストは<a title=\"Pricing\" href=\"https://dataforseo.com/pricing/business-data/google-hotels-api\" target=\"_blank\" rel=\"noopener noreferrer\">料金ページ</a>で計算できます。"
          },
          "location_name": {
            "type": "string",
            "description": "<em>検索エンジンのロケーションの正式名</em><br><strong><code>location_code</code> または <code>location_coordinate</code> を指定しない場合は必須フィールド</strong><br><strong>このフィールドを使用する場合、<code>location_code</code> または <code>location_coordinate</code> を指定する必要はありません</strong><br><code>location_name</code> を含む利用可能なロケーションの一覧は、<code>https://api.dataforseo.com/v3/business_data/google/locations</code> に個別にリクエストして取得できます<br>例：<br><code class=\"long-string\">London,England,United Kingdom</code><br><strong>注意：</strong>正確な検索結果を得るため、指定した <code>location_name</code> がキーワードに自動的に追加されます"
          },
          "location_code": {
            "type": "integer",
            "description": "<em>検索エンジンのロケーションコード</em><br><strong><code>location_name</code> または <code>location_coordinate</code> を指定しない場合は必須フィールド</strong><br><strong>このフィールドを使用する場合、<code>location_name</code> または <code>location_coordinate</code> を指定する必要はありません</strong><br><code>location_code</code> を含む利用可能なロケーションの一覧は、<code>https://api.dataforseo.com/v3/business_data/google/locations</code> に個別にリクエストして取得できます<br>例：<br><code class=\"long-string\">2840</code>"
          },
          "location_coordinate": {
            "type": "string",
            "description": "<em>ロケーションの GPS 座標</em><br><strong><code>location_name</code> または <code>location_code</code> を指定しない場合は必須フィールド</strong><br><strong>このフィールドを使用する場合、<code>location_name</code> または <code>location_code</code> を指定する必要はありません</strong><br><code>location_coordinate</code> パラメータは <em>\"latitude,longitude\"</em> 形式で指定します<br><em>\"latitude\"</em> と <em>\"longitude\"</em> の小数点以下の最大桁数：7<br><strong>注意</strong>：座標を使用してロケーションを設定する場合、検索は最も近い集落で行われます；<br>例：<br><code class=\"long-string\">53.476225,-2.243572</code>"
          },
          "search_this_area": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>表示されているエリア内のホテルを表示</em><br>任意フィールド<br>次の値を指定できます：<code>true</code>、<code>false</code><br>デフォルト値：<code>true</code><br><code>false</code> に設定すると、<code>search_this_area</code> モードがオフになります<br><strong>注意：</strong><code>search_this_area</code> モードがオフの場合、検索時に <code>location_name</code> は <code>keyword</code> に追加されません<br>このパラメータの詳細については、<a href=\"https://dataforseo.com/help-center/how-to-use-search_this_area-parameter-in-google-hotel-searches\" target=\"_blank\">ヘルプセンター</a>をご覧ください"
          },
          "language_name": {
            "type": "string",
            "description": "<em>検索エンジンの言語の正式名</em><br><strong><code>language_code</code> を指定しない場合は必須フィールド</strong><br><strong>このフィールドを使用する場合、<code>language_code</code> を指定する必要はありません</strong><br><code>language_name</code> を付した利用可能な言語のリストは、<code>https://api.dataforseo.com/v3/business_data/google/languages</code> に個別にリクエストして取得できます<br>例：<br><code class=\"long-string\">English</code>"
          },
          "language_code": {
            "type": "string",
            "description": "<em>検索エンジンの言語コード</em><br><strong><code>language_name</code> を指定しない場合は必須フィールド</strong><br><strong>このフィールドを使用する場合、<code>language_name</code> を指定する必要はありません</strong><br><code>language_code</code> を付した利用可能な言語のリストは、<code>https://api.dataforseo.com/v3/business_data/google/languages</code> に個別にリクエストして取得できます<em><br></em>例：<em><br></em><code class=\"long-string\">en</code>"
          },
          "depth": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>解析深度</em><br>任意フィールド<br>Google Hotels 内の結果数<br>デフォルト値：<code>18</code> 件の自然検索結果<br>最大値：<code>140</code><br><strong>注意：</strong>レスポンスに有料掲載が含まれているかどうかに関係なく、アカウントには自然検索結果 18 件ごとに課金されます；<br>そのため、Google Hotels が 18 件を超える結果を返した場合、深度を <code>18</code> より大きく設定すると追加料金が発生する可能性があります；<br>指定した深度がレスポンス内の結果数より大きい場合、その差額はアカウント残高に自動的に返金されます"
          },
          "check_in": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>チェックイン日</em><br>任意フィールド<br>このフィールドを指定しない場合、明日の日付がデフォルトで使用されます；<br>日付形式：<code>\"yyyy-mm-dd\"</code><br>例：<br><code>\"2019-01-15\"</code><br><strong>注意：</strong>値は今日の日付より前にすることはできません"
          },
          "check_out": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>チェックアウト日</em><br>任意フィールド<br>このフィールドを指定しない場合、当社のシステムはデフォルトで 2 日後の日付を適用します；<br>日付形式：<code>\"yyyy-mm-dd\"</code><br>例：<br><code>\"2019-01-15\"</code><br><strong>注意：</strong>値は <code>check_in</code> 以下にすることはできません；<br><code>check_in</code> と <code>check_out</code> の値の範囲は 30 日を超えることはできません"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>通貨</em><br>任意フィールド<br>例：<br><code>\"USD\"</code>"
          },
          "adults": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>大人の人数</em><br>任意フィールド<br>このフィールドを指定しない場合、デフォルト値 <code>2</code> が適用されます；<br>大人と子供を合わせて最大 6 名まで指定できることに<strong>注意</strong>してください<br>例：<br><code>1</code>"
          },
          "children": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>子供の人数と年齢</em><br>任意フィールド<br>このフィールドを指定しない場合、検索に子供は含まれません；<br>子供の年齢は <code>0</code> から <code>17</code> までです；<br>大人と子供を合わせて最大 6 名まで指定できることに<strong>注意</strong>してください<br>14 歳の子供を 1 名含める場合は、次の値を設定します：<br><code>[14]</code><br>13 歳の子供 1 名と 8 歳の子供 1 名を含める場合は、次の値を設定します：<br><code>[13,8]</code>"
          },
          "stars": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>ホテルの星の数</em><br>任意フィールド<br>5 つ星ホテルの一覧のみを取得する場合は、このフィールドを <code>[5]</code> に設定します<br>例：<br><code>[3,4,5]</code>"
          },
          "min_rating": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>最低評価</em><br>任意フィールド<br>このフィールドを使用して、特定の値より高い宿泊客評価を指定できます<br>例：<br><code>2.5</code>"
          },
          "sort_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>結果の並べ替えパラメーター</em><br>任意フィールド<br>このフィールドを使用して結果を並べ替えられます<br>指定可能な並べ替えの種類：<br><code>relevance</code> – 最も関連性の高い順に並べ替え<br><code>lowest_price</code> – 最低価格順に並べ替え<br><code>highest_rating</code> – 最高評価順に並べ替え<br><code>most_reviewed</code> – レビュー数が多い順に並べ替え<br>デフォルト値：<code>relevance</code>"
          },
          "min_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>1 泊あたりの最低価格</em><br>任意フィールド<br>この値の通貨は <code>currency</code> フィールドによって決まります<br>例：<br><code>100</code>"
          },
          "max_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>1 泊あたりの最高価格</em><br>任意フィールド<br>この値の通貨は <code>currency</code> フィールドによって決まります<br>例：<br><code>600</code>"
          },
          "free_cancellation": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>無料キャンセル可能なホテル</em><br>任意フィールド<br>予約を無料でキャンセルできるホテルの一覧を取得する場合は、このフィールドを <code>true</code> に設定します<br>デフォルト値：<code>false</code>"
          },
          "is_vacation_rentals": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>バケーションレンタルを検索</em><br>任意フィールド<br>ホテルではなくバケーションレンタルの一覧を取得する場合は、このフィールドを <code>true</code> に設定します<br>デフォルト値：<code>false</code>"
          },
          "amenities": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>ホテルの設備</em><br>任意フィールド<br>このフィールドを使用して、さまざまなホテルの設備を指定できます<br>例：<br><code>  [<br>            \"free_parking\",<br>            \"pets_allowed\"<br>        ]<br></code><br>指定可能な値：<br><code>\"air_conditioning\",<br>\"all_inclusive_available\",<br>\"bar\",<br>\"free_breakfast\",<br>\"fitness_center\",<br>\"kid_friendly\",<br>\"free_parking\",<br>\"pets_allowed\",<br>\"pool\",<br>\"restaurant\",<br>\"room_service\",<br>\"spa\",<br>\"free_wifi\",<br>\"parking\",<br>\"indoor_pool\",<br>\"outdoor_pool\",<br>\"wheelchair_accessible\",<br>\"beach_access\"</code>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>ユーザー定義のタスク識別子</em><br>任意フィールド<br><em>文字数上限は 255 です</em><br>このパラメーターを使ってタスクを識別し、結果と照合できます<br>指定した <code>tag</code> の値は、レスポンスの <code>data</code> オブジェクトに含まれます"
          },
          "postback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>タスク結果を送信する URL</em><br>任意フィールド<br>タスクが完了すると、その結果を <code>gzip</code> 形式で圧縮し、指定した <code>postback_url</code> に POST リクエストで送信します<br>‘$id’ 文字列を <code>$id</code> 変数として、‘$tag’ を URL エンコードされた <code>$tag</code> 変数として使用できます。リクエストを送信する前に必要な値を設定します。<br>例：<br><code>http://your-server.com/postbackscript?id=$id</code><br><code>http://your-server.com/postbackscript?id=$id&amp;tag=$tag</code><br><strong>注意：</strong><code>postback_url</code> の特殊文字は URL エンコードされます； <br>たとえば、<code>#</code> 文字は <code>%23</code> にエンコードされます<p>詳細は<a href=\"https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">ヘルプセンター</a>を参照してください"
          },
          "pingback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>完了したタスクの通知 URL</em><br>任意フィールド<br>タスクが完了すると、指定した URL に GET リクエストを送信して通知します<br>‘$id’ 文字列を <code>$id</code> 変数として、‘$tag’ を URL エンコードされた <code>$tag</code> 変数として使用できます。リクエストを送信する前に必要な値を設定します。<br>例：<br><code>http://your-server.com/pingscript?id=$id</code><br><code>http://your-server.com/pingscript?id=$id&amp;tag=$tag</code><br><strong>注意：</strong><code>pingback_url</code> の特殊文字は URL エンコードされます； <br>たとえば、<code>#</code> 文字は <code>%23</code> にエンコードされます<p>詳細は<a href=\"https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">ヘルプセンター</a>を参照してください"
          }
        },
        "example": [
          {
            "language_code": "en",
            "location_name": "New York,New York,United States",
            "keyword": "cheap hotel",
            "check_in": "2023-06-01",
            "check_out": "2023-06-30",
            "currency": "USD",
            "adults": 2,
            "children": [
              "14"
            ],
            "sort_by": "highest_rating",
            "priority": 2,
            "tag": "example"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "language_code": "en",
      "location_name": "New York,New York,United States",
      "keyword": "cheap hotel",
      "check_in": "2023-06-01",
      "check_out": "2023-06-30",
      "currency": "USD",
      "adults": 2,
      "children": [
        "14"
      ],
      "sort_by": "highest_rating",
      "priority": 2,
      "tag": "example"
    }
  ]
}
```

## Responses

### 200 — 操作成功

Headers:
- `X-Request-Id` (string) — Felo サポートに問い合わせる際に伝えるリクエスト識別子。

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostResponseInfo"
    }
  ]
}
```

### 400 — リクエストを処理できませんでした。リクエストパラメータを確認してください。

### 401 — 有効な Felo API キーが必要です。

### 402 — 請求要件が満たされていないため、リクエストを続行できません。

### 403 — このアカウントにはこの操作を行う権限がありません。

### 429 — リクエストまたは支出の上限に達しました。

### 502 — サービスがリクエストを完了できませんでした。

### 503 — API または請求サービスが一時的に利用できません。

### 504 — リクエストの処理中にサービスがタイムアウトしました。

### default — エラーレスポンス。上流のパススルーレスポンスはプロバイダーの形式を使用する場合があります

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "API の現在のバージョン"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "一般的なステータスコード\nレスポンスコードの完全な一覧はこちらです"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "一般的な情報メッセージ\n一般的な情報メッセージの完全な一覧はこちらです"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "合計実行時間（秒）"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "タスクの総コスト（USD）",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 配列内のタスク数",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "エラーで返された tasks 配列内のタスク数",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "タスク識別子\n当社システム内で UUID 形式の一意のタスク識別子"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "タスクのステータスコード\nDataForSEO によって生成され、次の範囲の値になります: 10000-60000\nレスポンスコードの完全な一覧はこちらです"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "タスクの情報メッセージ\n一般的な情報メッセージの完全な一覧はこちらです"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "実行時間（秒）"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "タスクの総コスト（USD）",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "result 配列内の要素数",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL パス"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "POST リクエストで指定したものと同じパラメーターを含みます"
    }
  }
}
```

### Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostResponseInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostTaskInfo"
              }
            ]
          },
          "description": "<em>タスクの配列</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostTaskInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "object",
            "null"
          ],
          "description": "<em>結果の配列</em><br>この場合、値は <code>null</code> になります"
        }
      }
    }
  ]
}
```
