# Google ホテル情報タスクを設定

**API:** Data API

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

**Tags:** DataForSEO

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

### 料金の参考情報

- 計量方式：レスポンスで報告されるコスト。
- 参考リクエスト見積もり：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": {
          "hotel_identifier": {
            "type": "string",
            "description": "<em>ホテル固有の識別子</em><br><strong><code>keyword</code> を指定しない場合は必須フィールド</strong><br><strong>このフィールドを使用する場合、<code>keyword</code> を指定する必要はありません</strong><br>Google 検索内のホテルエンティティの一意の識別子；<br>Advanced <a href=\"/v3/serp/google/organic/overview/\" rel=\"noopener noreferrer\" target=\"_blank\">Google SERP API</a> にリクエストを送信して値を取得できます（レスポンスの <code>hotels_pack</code> 要素に含まれます）。または Business Data API の <a href=\"/v3/business_data/google/hotel_searches/task_post/\" rel=\"noopener noreferrer\" target=\"_blank\">Hotel Searches エンドポイント</a>を使用します<br>例：<br><code>ChYIq6SB--i6p6cpGgovbS8wN2s5ODZfEAE</code>"
          },
          "keyword": {
            "type": "string",
            "description": "<em>キーワード</em><br><strong><code>hotel_identifier</code> を指定しない場合は必須フィールド</strong><br><strong>このフィールドを使用する場合、<code>hotel_identifier</code> を指定する必要はありません</strong><br>指定するキーワードはホテルエンティティの名前を示す必要があります<br><code>keyword</code> フィールドには<strong>最大 700 文字</strong>まで指定できます<br><strong>すべての %## はデコードされます（また、文字 ‘+’ はスペースにデコードされます）</strong><br><code>keyword</code> に “%” 文字を使用する場合は “%25” と指定してください"
          },
          "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>"
          },
          "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>"
          },
          "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>"
          },
          "check_in": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>チェックイン日</em><br>任意フィールド<br>このフィールドを指定しない場合、明日の日付がデフォルトで使用されます；<br>値は今日の日付より前にすることはできません<br>日付形式：<code>\"yyyy-mm-dd\"</code><br>例：<br><code>\"2019-01-15\"</code>"
          },
          "check_out": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>チェックアウト日</em><br>任意フィールド<br>このフィールドを指定しない場合、当社のシステムはデフォルトで 2 日後の日付を適用します；<br><strong>注意：</strong>値は <code>check_in</code> 以下にすることはできません；<br><code>check_in</code> と <code>check_out</code> の値の範囲は 30 日を超えることはできません<br>日付形式：<code>\"yyyy-mm-dd\"</code><br>例：<br><code>\"2019-01-15\"</code>"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>通貨</em><br>任意フィールド<br>例：<br><code>\"USD\"</code>"
          },
          "adults": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>大人の人数</em><br>任意フィールド<br>このフィールドを指定しない場合、2 名の大人がデフォルトで使用されます<br>例：<br><code>1</code>"
          },
          "children": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>子供の人数と年齢</em><br>任意フィールド<br>このフィールドを指定しない場合、検索に子供は含まれません；<p>14 歳の子供を 1 名含める場合は、次の値を設定します：<br><code>[14]</code><br>13 歳の子供 1 名と 8 歳の子供 1 名を含める場合は、次の値を設定します：<br><code>[13,8]</code>"
          },
          "load_prices_by_dates": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>宿泊価格を日付別に読み込む</em><br>任意フィールド<br>このパラメータに <code>true</code> を指定すると、日付別に分割されたホテル宿泊価格の配列 <code>prices_by_dates</code> がレスポンスに含まれます<br>このパラメータを使用すると、<strong>リクエストの基本料金が 2 倍</strong>請求されます"
          },
          "prices_start_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>価格を日付別に読み込む開始日</em><br>任意フィールド<br>このパラメータを使用するには、<code>load_prices_by_dates</code> に <code>true</code> を指定する必要があります<br>このパラメータを指定しない場合、開始日は <code>check_in</code> の日付に設定されます<br>日付形式：<code>yyyy-mm-dd</code><br>例：<br><code>2025-05-20</code>"
          },
          "prices_end_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>価格を日付別に読み込む終了日</em><br>任意フィールド<br>このパラメータを使用するには、<code>load_prices_by_dates</code> に <code>true</code> を指定する必要があります<br>このパラメータを指定しない場合、当月の日付別価格が取得されます<br>日付形式：<code>yyyy-mm-dd</code><br>例：<br><code>2025-05-21</code>"
          },
          "prices_date_range": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>日次価格データを取得するための既定の期間</em><br>任意フィールド<br>このパラメータを使用するには、<code>load_prices_by_dates</code> に <code>true</code> を指定する必要があります<br><code>prices_start_date </code> を指定しない場合、開始日は <code>check_in</code> の日付に設定されます<br>指定可能な値：<code>month</code>、<code>three_months</code>、<code>six_months</code>、<code>year</code><br>デフォルト値：<code>month</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>をご覧ください"
          },
          "postback_data": {
            "type": "string",
            "description": "<em>postback_url のデータ型</em><br><strong><code>postback_url</code> を指定する場合は必須フィールド</strong><br>サーバーに送信されるデータ型に対応します<br>指定可能な値：<br><code>advanced</code>、<code>html</code>"
          },
          "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>例：<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",
            "hotel_identifier": "ChYIq6SB--i6p6cpGgovbS8wN2s5ODZfEAE",
            "tag": "some_string_123",
            "postback_url": "https://your-server.com/postbackscript.php",
            "postback_data": "advanced"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "language_code": "en",
      "location_name": "New York,New York,United States",
      "hotel_identifier": "ChYIq6SB--i6p6cpGgovbS8wN2s5ODZfEAE",
      "tag": "some_string_123",
      "postback_url": "https://your-server.com/postbackscript.php",
      "postback_data": "advanced"
    }
  ]
}
```

## Responses

### 200 — 操作成功

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

**application/json**

Schema: object | null

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

### 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_BusinessDataGoogleHotelInfoTaskPostResponseInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelInfoTaskPostResponseInfo`

```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_BusinessDataGoogleHotelInfoTaskPostTaskInfo"
              }
            ]
          },
          "description": "<em>タスクの配列</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_BusinessDataGoogleHotelInfoTaskPostTaskInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelInfoTaskPostTaskInfo`

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