Documentazione API Hop
Riferimento Google Hotels
Cerca hotel, suggerimenti, foto e recensioni su Google Hotels.
Limite di concorrenza
IA e Data condividono ciascuno un pool di richieste simultanee per account: 5 IA / 2 Data per impostazione predefinita, secondo l’abbonamento. Anche i limiti degli endpoint sono vincolati al pool di categoria. Al raggiungimento di un limite viene restituito HTTP 429. Le attività asincrone occupano un posto fino al termine dell’esecuzione.
GET /v1/google-hotels/search GET /v1/google-hotels/autocomplete GET /v1/google-hotels/photos GET /v1/google-hotels/reviews Cerca hotel, suggerimenti, foto e recensioni su Google Hotels.
Autenticazione e fatturazione
Il prezzo predefinito è $0.0003 (300 credits) per richiesta riuscita. Usa la chiave API API Hop. L’accesso dipende dai gateway attivi e dai permessi. Consulta catalogo e account per il prezzo per richiesta riuscita; prevalgono i prezzi dell’account. Anche i risultati vuoti riusciti sono fatturati. Gli errori liberano la prenotazione. Timeout: 60 secondi, senza tentativi o paginazione automatici. Gli errori di contabilizzazione non ripetono la richiesta al fornitore.
Authorization: Bearer YOUR_API_KEYGoogle Hotels: Cerca hotel
GET https://api.apihop.ai/v1/google-hotels/search
Parametri
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
query | string | Testo di ricerca; query: optional | hotels in New York |
next_page_token | string | Token pagina successiva; next_page_token: optional; UTF-8 bytes: 24576 | - |
currency | string | Codice valuta (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 | Codice paese o negozio (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Lingua; language: optional | - |
limit | integer | Limite risultati; limit: optional; min: 1; max: 100 | 1 |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Non archiviare le risposte; zero_trace: optional | true |
check_in_date | string | Data (YYYY-MM-DD) o intervallo supportato (check_in_date); check_in_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ | - |
check_out_date | string | Data (YYYY-MM-DD) o intervallo supportato (check_out_date); check_out_date: optional; ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ | - |
adults | integer | Numero di adulti (adults); adults: optional; min: 1; max: 100 | 1 |
children | integer | Numero di bambini (children); children: optional; min: 0; max: 99 | 0 |
children_ages | string | Elenco età dei bambini (children_ages); Valore predefinito: 12; children_ages: optional; UTF-8 bytes: 296; ^(?:[1-9]|1[0-7])(?:,(?:[1-9]|1[0-7])){0,98}$ | - |
sort_by | string | Ordinamento; sort_by: optional; relevance, lowest_price, highest_rating, most_reviewed | relevance |
min_price | integer | Prezzo minimo (min_price); min_price: optional; min: 0; max: 2147483647 | 0 |
max_price | integer | Prezzo massimo (max_price); max_price: optional; min: 1; max: 2147483647 | 1 |
rating | integer | Stelle separate da virgole; 7 → 3.5+, 8 → 4.0+, 9 → 4.5+; rating: optional; 7, 8, 9 | 7 |
hotel_class | string | Filtro alloggi (hotel_class); hotel_class: optional; UTF-8 bytes: 7 | - |
amenities | string | Filtro alloggi (amenities); amenities: optional; UTF-8 bytes: 300; ^[1-9][0-9]*(?:,[1-9][0-9]*)*$ | - |
free_cancellation | boolean | Filtro alloggi (free_cancellation); free_cancellation: optional | true |
special_offers | boolean | Filtro alloggi (special_offers); special_offers: optional | true |
eco_certified | boolean | Filtro alloggi (eco_certified); eco_certified: optional | true |
property_types | string | Filtro alloggi (property_types); property_types: optional; UTF-8 bytes: 100; ^[1-9][0-9]*(?:,[1-9][0-9]*)*$ | - |
brands | string | Filtro alloggi (brands); brands: optional; UTF-8 bytes: 300; ^[1-9][0-9]{0,5}(?:,[1-9][0-9]{0,5})*$ | - |
vacation_rentals | boolean | Filtro alloggi (vacation_rentals); vacation_rentals: optional | true |
bedrooms | integer | Numero minimo di camere o letti (bedrooms); bedrooms: optional; min: 0; max: 2147483647 | 0 |
bathrooms | integer | Numero minimo di bagni (bathrooms); bathrooms: optional; min: 0; max: 2147483647 | 0 |
property_token | string | Token di selezione dalla risposta recente (property_token); property_token: optional; UTF-8 bytes: 256; ^[A-Za-z0-9_-]{16,256}$ | - |
Convalida
Solo parametri di query, senza corpo. Valori sconosciuti, duplicati, vuoti o non validi sono rifiutati. Solo risposte JSON; nessuna paginazione o ripetizione automatica. Regole: AND = entrambi, OR = oppure, XOR = uno solo, NOT = escluso, => = richiede.
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
Esempi
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: Consulta suggerimenti di hotel
GET https://api.apihop.ai/v1/google-hotels/autocomplete
Parametri
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
query | string | Testo di ricerca; query: REQUIRED | New York |
country | string | Codice paese o negozio (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Lingua; language: optional | - |
limit | integer | Limite risultati; limit: optional; min: 1; max: 100 | 1 |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Non archiviare le risposte; zero_trace: optional | true |
currency | string | Codice valuta (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 |
Convalida
Solo parametri di query, senza corpo. Valori sconosciuti, duplicati, vuoti o non validi sono rifiutati. Solo risposte JSON; nessuna paginazione o ripetizione automatica. Regole: AND = entrambi, OR = oppure, XOR = uno solo, NOT = escluso, => = richiede.
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})?$/
Esempi
curl --get "https://api.apihop.ai/v1/google-hotels/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=New York"Google Hotels: Consulta foto degli hotel
GET https://api.apihop.ai/v1/google-hotels/photos
Parametri
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
id | string | ID hotel dai risultati (id); id: REQUIRED | ChgI-N6n0Nnyw_K2ARoLL2cvMXRqZGgzMjkQAQ |
country | string | Codice paese o negozio (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Lingua; language: optional | - |
limit | integer | Limite risultati; limit: optional; min: 1; max: 100 | 1 |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Non archiviare le risposte; zero_trace: optional | true |
next_page_token | string | Token pagina successiva; next_page_token: optional; UTF-8 bytes: 24576 | - |
Convalida
Solo parametri di query, senza corpo. Valori sconosciuti, duplicati, vuoti o non validi sono rifiutati. Solo risposte JSON; nessuna paginazione o ripetizione automatica. Regole: AND = entrambi, OR = oppure, XOR = uno solo, NOT = escluso, => = richiede.
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
Esempi
curl --get "https://api.apihop.ai/v1/google-hotels/photos" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=ChgI-N6n0Nnyw_K2ARoLL2cvMXRqZGgzMjkQAQ"Google Hotels: Consulta recensioni degli hotel
GET https://api.apihop.ai/v1/google-hotels/reviews
Parametri
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
id | string | ID hotel dai risultati (id); id: REQUIRED | ChgI-N6n0Nnyw_K2ARoLL2cvMXRqZGgzMjkQAQ |
next_page_token | string | Token pagina successiva; next_page_token: optional; UTF-8 bytes: 24576 | - |
sort_by | string | Ordinamento; sort_by: optional; relevance, newest, highest_rating, lowest_rating | relevance |
country | string | Codice paese o negozio (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Lingua; language: optional | - |
limit | integer | Limite risultati; limit: optional; min: 1; max: 10 | 10 |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Non archiviare le risposte; zero_trace: optional | true |
category_token | string | Token di selezione dalla risposta recente (category_token); category_token: optional; UTF-8 bytes: 2800; ^[A-Za-z0-9_-]+$ | - |
source_number | integer | Filtro alloggi (source_number); source_number: optional; min: -1; max: 2147483647 | -1 |
Convalida
Solo parametri di query, senza corpo. Valori sconosciuti, duplicati, vuoti o non validi sono rifiutati. Solo risposte JSON; nessuna paginazione o ripetizione automatica. Regole: AND = entrambi, OR = oppure, XOR = uno solo, NOT = escluso, => = richiede.
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
Esempi
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"Risposte ed errori
JSON originale e precisione sono conservati. Esempio di risultato vuoto riuscito. HTTP 400: input; 401: autenticazione; 402: credito; 403: accesso; 405: metodo; 429: limite; 5xx: servizio. Conserva X-Request-Id.
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}