# Google Hotels Autocomplete

<p>The <strong>Google Hotels Autocomplete API</strong> provides real-time location and hotel name suggestions as users type, powered by the same suggestion engine behind Google Hotels. Build type-ahead search experiences for travel apps, hotel booking platforms, and destination discovery tools.</p><h3>What You Get</h3><ul><li><strong>Hotel suggestions</strong> — Specific accommodations matching the query (e.g., "Paris Hotel Las Vegas", "Hilton London Bankside")</li><li><strong>Location suggestions</strong> — Cities, regions, and landmarks (e.g., "Paris, France", "Times Square, New York")</li><li><strong>Direct booking links</strong> — Each suggestion includes a ready-to-use <code>scrappa_google_hotels_link</code> to fetch full hotel search results</li><li><strong>Thumbnails &amp; metadata</strong> — Hotel images, Knowledge Graph IDs (<code>kgmid</code>), and property tokens for deeper lookups</li></ul><h3>Common Use Cases</h3><ul><li><strong>Travel search bars</strong> — Power autocomplete dropdowns in hotel booking interfaces with instant suggestions</li><li><strong>Destination discovery</strong> — Help users explore locations by surfacing relevant cities and landmarks as they type</li><li><strong>Hotel name resolution</strong> — Resolve partial hotel names to exact properties with unique identifiers and property tokens</li><li><strong>Multi-language support</strong> — Localize suggestions for 50+ languages using the <code>hl</code> and <code>gl</code> parameters</li></ul><h3>How It Works</h3><p>Send a partial query (minimum 2 characters) and the API returns ranked suggestions from Google's hotel database. Use the <code>type</code> parameter to filter results:</p><ul><li><code>hotel</code> (default) — Returns only accommodation suggestions (specific hotels, resorts, hostels)</li><li><code>location</code> — Returns only geographic suggestions (cities, regions, landmarks)</li><li><code>all</code> — Returns both hotel and location suggestions together</li></ul><h3>Response Type Values</h3><p>Each suggestion includes a <code>type</code> field indicating the suggestion category:</p><ul><li><code>accommodation</code> — Hotels, resorts, hostels, and other lodging properties</li><li><code>location</code> — Cities, regions, landmarks, and geographic areas</li></ul><p>Each suggestion includes a <code>scrappa_google_hotels_link</code> that you can call directly to get full hotel search results for that location or property — no extra parameter mapping needed.</p><h3>Scrappa vs. Building Your Own</h3><p>Google does not offer a public Hotels Autocomplete API. Building this yourself requires reverse-engineering Google's internal <code>batchexecute</code> protocol, handling protobuf-encoded payloads, and maintaining parsers as Google changes their internal format. Scrappa handles all of this, returning clean JSON with a simple REST interface.</p>

- **Documentation:** [https://scrappa.co/docs/google-hotels-api/google_hotels_autocomplete](https://scrappa.co/docs/google-hotels-api/google_hotels_autocomplete)
- **API group:** Google Hotels API
- **Endpoint:** `GET https://scrappa.co/api/google-hotels/autocomplete`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | Yes | Location search query |
| `gl` | string | No | 2-letter country code for localization (e.g., us, gb, de, fr) |
| `hl` | string | No | 2-letter language code for results (e.g., en, es, fr, de) |
| `currency` | string | No | 3-letter currency code used in suggestion links (e.g., USD, EUR, GBP) |
| `type` | string | No | Type of suggestions to return: location (cities/locations only), hotel (accommodations only), all (both). Default: hotel |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/google-hotels/autocomplete?q=Berlin"
```

## Example response

```json
{
    "search_parameters": {
        "engine": "google_hotels_autocomplete",
        "q": "Paris",
        "gl": "us",
        "hl": "en",
        "currency": "USD"
    },
    "suggestions": [
        {
            "position": 1,
            "value": "paris hotel las vegas",
            "type": "accommodation",
            "highlighted_words": [
                "hotel las vegas"
            ],
            "autocomplete_suggestion": "paris hotel las vegas",
            "scrappa_google_hotels_link": "https://scrappa.co/api/google-hotels/search?q=Las+Vegas%2C+NV&check_in_date=2026-09-27&check_out_date=2026-09-28&adults=2&children=0&currency=USD&hl=en&gl=us&property_token=ChgIgbj58O-AraJFGgovbS8wMzQ4czYwEAE",
            "location": "Las Vegas, NV",
            "thumbnail": "https://lh3.googleusercontent.com/grass/AKc-QJEPi1pQEfr-uPrS56QJayOxIX_eB0VMbaasFAlqvvL0jM_cI_a_D9_lrItRAZpRCCIRP8yh8iZqTQw-WRk7PCoe2Q=w92-h92-n-k-no",
            "kgmid": "/m/0348s60",
            "data_cid": "4991312229159558145",
            "property_token": "ChgIgbj58O-AraJFGgovbS8wMzQ4czYwEAE"
        }
    ],
    "response_time_ms": 587
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The q, hl, gl, currency, or type query parameter failed validation before the Google Hotels autocomplete request ran. |
| 403 | Google Hotels Upstream Blocked | The upstream service is temporarily unavailable. Please retry shortly. |
| 429 | Google Hotels Rate Limited | The upstream service is temporarily unavailable. Please retry shortly. |
| 502 | Temporary Upstream Failure | The upstream service is temporarily unavailable. Please retry shortly. |
| 502 | Autocomplete Parse Failure | Google returned HTTP 200, but the response could not be parsed into the documented autocomplete suggestion shape. |
| 503 | Autocomplete Temporarily Unavailable | The upstream returned HTTP 503, the provider-backed request could not connect, or Scrappa hit an unexpected temporary autocomplete failure after validation passed. |
| 503 | The upstream service is temporarily unavailable. Please retry shortly. | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
