Hotels.com API endpoint
Returns Hotels.com search-box suggestions for a partial destination or property name in `q` (up to 120 characters). Each suggestion has its type, primary and secondary text, full location name, coordinates, and region or property id. A query with no match returns an empty `suggestions` list.
/hotels/autocompleteq (required): partial destination or property text, up to 120 characters.Returns anonymous destination and property suggestions from the Hotels.com search box. A valid no-match response has an empty suggestions array. Availability and prices are not included.
| Field | Filled in, of 9 checked | Values in the sample |
|---|---|---|
| type | 9 | SearchLocationBasicItem in all 9 |
| geo_type | 8 | NEIGHBORHOOD (3), CITY (2), AIRPORT (2) and 1 more |
| region_id | 8 | |
| primary_text | 9 | “New York” and 8 other values |
| secondary_text | 8 | New York, United States (4), New York, New York, United Stat… (4) |
| location_full_name | 9 | |
| latitude | 8 | |
| longitude | 8 | |
| airport_code | 2 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| q | string | Yes | Partial destination or property name | New York | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/hotels/autocomplete?q=New+York" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "New York",
"suggestions": [
{
"type": "SearchLocationBasicItem",
"geo_type": "CITY",
"region_id": "178293",
"primary_text": "New York",
"location_full_name": "New York, NY, United States",
"latitude": 40.7128,
"longitude": -74.006
}
]
}
}Request schema
No body schema
Response schema
#/definitions/hotels.autocompleteResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | hotels.AutocompleteResponse | No | ||||
| data.query | string | No | ||||
| data.suggestions | array | No | ||||
| data.suggestions[].airport_code | string | No | ||||
| data.suggestions[].geo_type | string | No | ||||
| data.suggestions[].latitude | number | No | ||||
| data.suggestions[].location_full_name | string | No | ||||
| data.suggestions[].longitude | number | No | ||||
| data.suggestions[].primary_text | string | No | ||||
| data.suggestions[].property_id | string | No | ||||
| data.suggestions[].region_id | string | No | ||||
| data.suggestions[].secondary_text | string | No | ||||
| data.suggestions[].type | string | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/hotels/autocomplete?q=New+York" \
-H "x-api-key: $CRAWLORA_API_KEY"