API Hop ドキュメント
Google Hotels API リファレンス
Google Hotels のホテル、候補、写真、レビューを検索します。
同時実行上限
AI と Data はそれぞれアカウント全体の同時実行枠を共有します。既定値は AI 5 / Data 2 で、サブスクリプションにより変わります。エンドポイント別の設定もカテゴリ全体の上限を超えられません。いずれかの上限に達すると HTTP 429 を返します。非同期タスクは実行終了まで枠を使用します。
GET /v1/google-hotels/search GET /v1/google-hotels/autocomplete GET /v1/google-hotels/photos GET /v1/google-hotels/reviews Google Hotels のホテル、候補、写真、レビューを検索します。
認証と料金
既定料金は成功したリクエストごとに $0.0003(300 credits)です。 API Hop API キーを使用します。利用可否は有効なゲートウェイと権限によります。成功したリクエストの料金はカタログとアカウントを確認してください。個別料金が優先され、成功した空の結果も課金されます。失敗時は予約額を解放します。タイムアウトは 60 秒で、自動再試行と自動ページングはありません。精算失敗による再呼び出しも行いません。
Authorization: Bearer YOUR_API_KEYGoogle Hotels: ホテルを検索
GET https://api.apihop.ai/v1/google-hotels/search
パラメーター
| フィールド | 型 | 制約 | 例 |
|---|---|---|---|
query | string | 検索語; query: optional | hotels in New York |
next_page_token | string | 次ページのトークン; next_page_token: optional; UTF-8 bytes: 24576 | - |
currency | string | 通貨コード (currency); currency: optional; ALL, DZD, ARS, AMD, AWG, AUD, AZN, BSD, BHD, BYN, BMD, BAM, BRL, GBP, BGN, XPF, CAD, CLP, CNY, COP, CRC, CUP, CZK, DKK, DOP, EGP, EUR, GEL, HKD, HUF, ISK, INR, IDR, IRR, ILS, JMD, JPY, JOD, KZT, KWD, LBP, MKD, MYR, MXN, MDL, MAD, TWD, NZD, NOK, OMR, PKR, PAB, PEN, PHP, PLN, QAR, RON, RUB, SAR, RSD, SGD, ZAR, KRW, SEK, CHF, THB, TRY, USD, UAH, AED, VND; ^[A-Z]{3}$ | USD |
country | string | 国または店舗コード (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 言語; language: optional | - |
limit | integer | 結果の上限; limit: optional; min: 1; max: 100 | 1 |
device | string | 端末; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | レスポンスを保存しない; zero_trace: optional | true |
check_in_date | string | 旅行日(YYYY-MM-DD)または対応する日付範囲 (check_in_date); check_in_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ | - |
check_out_date | string | 旅行日(YYYY-MM-DD)または対応する日付範囲 (check_out_date); check_out_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ | - |
adults | integer | 大人の人数 (adults); adults: optional; min: 1; max: 100 | 1 |
children | integer | 子供の人数 (children); children: optional; min: 0; max: 99 | 0 |
children_ages | string | 子供の年齢リスト (children_ages); 既定値: 12; children_ages: optional; UTF-8 bytes: 296; ^(?:[1-9]|1[0-7])(?:,(?:[1-9]|1[0-7])){0,98}$ | - |
sort_by | string | 並び順; sort_by: optional; relevance, lowest_price, highest_rating, most_reviewed | relevance |
min_price | integer | 最低価格 (min_price); min_price: optional; min: 0; max: 2147483647 | 0 |
max_price | integer | 最高価格 (max_price); max_price: optional; min: 1; max: 2147483647 | 1 |
rating | integer | 星の数(カンマ区切り); 7 → 3.5+, 8 → 4.0+, 9 → 4.5+; rating: optional; 7, 8, 9 | 7 |
hotel_class | string | 宿泊条件 (hotel_class); hotel_class: optional; UTF-8 bytes: 7 | - |
amenities | string | 宿泊条件 (amenities); amenities: optional; UTF-8 bytes: 300; ^[1-9][0-9]*(?:,[1-9][0-9]*)*$ | - |
free_cancellation | boolean | 宿泊条件 (free_cancellation); free_cancellation: optional | true |
special_offers | boolean | 宿泊条件 (special_offers); special_offers: optional | true |
eco_certified | boolean | 宿泊条件 (eco_certified); eco_certified: optional | true |
property_types | string | 宿泊条件 (property_types); property_types: optional; UTF-8 bytes: 100; ^[1-9][0-9]*(?:,[1-9][0-9]*)*$ | - |
brands | string | 宿泊条件 (brands); brands: optional; UTF-8 bytes: 300; ^[1-9][0-9]{0,5}(?:,[1-9][0-9]{0,5})*$ | - |
vacation_rentals | boolean | 宿泊条件 (vacation_rentals); vacation_rentals: optional | true |
bedrooms | integer | 寝室またはベッド数の下限 (bedrooms); bedrooms: optional; min: 0; max: 2147483647 | 0 |
bathrooms | integer | 浴室数の下限 (bathrooms); bathrooms: optional; min: 0; max: 2147483647 | 0 |
property_token | string | 最新の応答からコピーした選択トークン (property_token); property_token: optional; UTF-8 bytes: 256; ^[A-Za-z0-9_-]{16,256}$ | - |
入力検証
クエリパラメーターのみ受け付け、本文は使用しません。不明、重複、空、無効な値は拒否されます。JSON のみ対応し、自動ページ取得や再試行は行いません。規則: AND = 両方、OR = または、XOR = いずれか一つ、NOT = 不可、=> = 必須。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/min_price <= max_pricecheck_in_date AND check_out_date: supply both or neither; valid YYYY-MM-DD dates; check_out_date > check_in_datequery OR property_token OR next_page_token: requiredadults (default 2) + children <= 100; children_ages: comma-separated ages 0..17; count = childrenbedrooms OR bathrooms => vacation_rentals = true; vacation_rentals = true => NOT brandsTokens: copy the exact token from a fresh response; do not invent or reuse expired tokens; each page or token lookup is a separate billable successful request
例
curl --get "https://api.apihop.ai/v1/google-hotels/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "currency=USD" \
--data-urlencode "query=hotels in New York"Google Hotels: ホテル候補を取得
GET https://api.apihop.ai/v1/google-hotels/autocomplete
パラメーター
| フィールド | 型 | 制約 | 例 |
|---|---|---|---|
query | string | 検索語; query: REQUIRED | New York |
country | string | 国または店舗コード (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 言語; language: optional | - |
limit | integer | 結果の上限; limit: optional; min: 1; max: 100 | 1 |
device | string | 端末; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | レスポンスを保存しない; zero_trace: optional | true |
currency | string | 通貨コード (currency); currency: optional; ALL, DZD, ARS, AMD, AWG, AUD, AZN, BSD, BHD, BYN, BMD, BAM, BRL, GBP, BGN, XPF, CAD, CLP, CNY, COP, CRC, CUP, CZK, DKK, DOP, EGP, EUR, GEL, HKD, HUF, ISK, INR, IDR, IRR, ILS, JMD, JPY, JOD, KZT, KWD, LBP, MKD, MYR, MXN, MDL, MAD, TWD, NZD, NOK, OMR, PKR, PAB, PEN, PHP, PLN, QAR, RON, RUB, SAR, RSD, SGD, ZAR, KRW, SEK, CHF, THB, TRY, USD, UAH, AED, VND; ^[A-Z]{3}$ | ALL |
入力検証
クエリパラメーターのみ受け付け、本文は使用しません。不明、重複、空、無効な値は拒否されます。JSON のみ対応し、自動ページ取得や再試行は行いません。規則: AND = 両方、OR = または、XOR = いずれか一つ、NOT = 不可、=> = 必須。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/
例
curl --get "https://api.apihop.ai/v1/google-hotels/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=New York"Google Hotels: ホテルの写真を取得
GET https://api.apihop.ai/v1/google-hotels/photos
パラメーター
| フィールド | 型 | 制約 | 例 |
|---|---|---|---|
id | string | 検索結果のホテル識別子 (id); id: REQUIRED | ChgI-N6n0Nnyw_K2ARoLL2cvMXRqZGgzMjkQAQ |
country | string | 国または店舗コード (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 言語; language: optional | - |
limit | integer | 結果の上限; limit: optional; min: 1; max: 100 | 1 |
device | string | 端末; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | レスポンスを保存しない; zero_trace: optional | true |
next_page_token | string | 次ページのトークン; next_page_token: optional; UTF-8 bytes: 24576 | - |
入力検証
クエリパラメーターのみ受け付け、本文は使用しません。不明、重複、空、無効な値は拒否されます。JSON のみ対応し、自動ページ取得や再試行は行いません。規則: AND = 両方、OR = または、XOR = いずれか一つ、NOT = 不可、=> = 必須。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/Tokens: copy the exact token from a fresh response; do not invent or reuse expired tokens; each page or token lookup is a separate billable successful request
例
curl --get "https://api.apihop.ai/v1/google-hotels/photos" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=ChgI-N6n0Nnyw_K2ARoLL2cvMXRqZGgzMjkQAQ"Google Hotels: ホテルのレビューを取得
GET https://api.apihop.ai/v1/google-hotels/reviews
パラメーター
| フィールド | 型 | 制約 | 例 |
|---|---|---|---|
id | string | 検索結果のホテル識別子 (id); id: REQUIRED | ChgI-N6n0Nnyw_K2ARoLL2cvMXRqZGgzMjkQAQ |
next_page_token | string | 次ページのトークン; next_page_token: optional; UTF-8 bytes: 24576 | - |
sort_by | string | 並び順; sort_by: optional; relevance, newest, highest_rating, lowest_rating | relevance |
country | string | 国または店舗コード (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 言語; language: optional | - |
limit | integer | 結果の上限; limit: optional; min: 1; max: 10 | 10 |
device | string | 端末; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | レスポンスを保存しない; zero_trace: optional | true |
category_token | string | 最新の応答からコピーした選択トークン (category_token); category_token: optional; UTF-8 bytes: 2800; ^[A-Za-z0-9_-]+$ | - |
source_number | integer | 宿泊条件 (source_number); source_number: optional; min: -1; max: 2147483647 | -1 |
入力検証
クエリパラメーターのみ受け付け、本文は使用しません。不明、重複、空、無効な値は拒否されます。JSON のみ対応し、自動ページ取得や再試行は行いません。規則: AND = 両方、OR = または、XOR = いずれか一つ、NOT = 不可、=> = 必須。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/Tokens: copy the exact token from a fresh response; do not invent or reuse expired tokens; each page or token lookup is a separate billable successful request
例
curl --get "https://api.apihop.ai/v1/google-hotels/reviews" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=ChgI-N6n0Nnyw_K2ARoLL2cvMXRqZGgzMjkQAQ" \
--data-urlencode "limit=10"レスポンスとエラー
元の JSON と数値精度を保持します。例は空の成功結果です。HTTP 400: 入力、401: 認証、402: 残高、403: アクセス、405: メソッド、429: 制限、5xx: 障害。X-Request-Id を保存してください。
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}