# Hotels.com Scraper 🏨 (`easyapi/hotels-com-scraper`) Actor

Scrape detailed hotel listings from Hotels.com including prices, ratings, amenities, and images. Perfect for price monitoring, market analysis, and travel research.

- **URL**: https://apify.com/easyapi/hotels-com-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Travel, Integrations, Other
- **Stats:** 78 total users, 10 monthly users, 99.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Hotels.com Scraper 🏨

Extract detailed hotel information from Hotels.com search results. This powerful scraper collects comprehensive data about hotel listings, including pricing, ratings, locations, amenities, and images.

### 🎯 Use Cases

- Monitor hotel prices and availability
- Analyze competitive pricing strategies
- Track seasonal price fluctuations
- Gather market intelligence for the hospitality industry
- Build travel aggregation platforms
- Research tourism trends and patterns

### ✨ Features

- Scrapes detailed hotel information including:
  - Hotel name, ID, and location 📍
  - Current prices and total costs (including taxes) 💰
  - Guest ratings and review counts ⭐
  - High-quality hotel images 🖼️
  - Special offers and discounts 🏷️
  - Available amenities 🛎️
  - Direct booking URLs 🔗

- Advanced capabilities:
  - Handles dynamic loading and pagination
  - Random delays to prevent blocking
  - Proxy support for reliable scraping
  - Customizable maximum items limit
  - Resource optimization for faster scraping

### 💎 Output

The actor provides structured JSON data for each hotel listing, including:
- Complete hotel details
- Pricing information with tax breakdown
- Rating metrics and review statistics
- Image galleries with descriptions
- Special promotional badges
- Timestamp of data collection

### 🔧 Input Parameters

- `searchUrls`: Array of Hotels.com search URLs to scrape
- `maxItems`: Maximum number of hotel listings to collect (optional)
- `proxyConfiguration`: Proxy settings (optional)


#### Input Example
  
A full explanation of an input example in JSON.  
```json
{
    "searchUrls": [
       "https://www.hotels.com/Hotel-Search?destination=New%20York%2C%20New%20York%2C%20United%20States%20of%20America&regionId=2621&latLong=40.712843%2C-74.005966&flexibility=0_DAY&d1=2025-02-22&startDate=2025-02-22&d2=2025-02-23&endDate=2025-02-23&adults=2&rooms=1&isInvalidatedDate=false&theme=&userIntent=&semdtl=&useRewards=false&sort=RECOMMENDED"
    ],
    "maxItems": 150
}
````

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```json
[
    {
        "searchUrl": "https://www.hotels.com/Hotel-Search?destination=New%20York%2C%20New%20York%2C%20United%20States%20of%20America&regionId=2621&latLong=40.712843%2C-74.005966&flexibility=0_DAY&d1=2025-02-22&startDate=2025-02-22&d2=2025-02-23&endDate=2025-02-23&adults=2&rooms=1&isInvalidatedDate=false&theme=&userIntent=&semdtl=&useRewards=false&sort=RECOMMENDED",
        "hotelInfo": {
            "id": "15040315",
            "name": "Heritage Hotel",
            "location": "New York",
            "url": "https://www.hotels.cn/en/ho589913/heritage-hotel-new-york-united-states-of-america/?chkin=2025-02-22&chkout=2025-02-23&x_pwa=1&rfrr=HSR&pwa_ts=1738983656455&referrerUrl=aHR0cHM6Ly93d3cuaG90ZWxzLmNuL0hvdGVsLVNlYXJjaA%3D%3D&useRewards=false&rm1=a2&regionId=2621&destination=New+York%2C+New+York%2C+United+States+of+America&destType=MARKET&neighborhoodId=6226054&latLong=40.712843%2C-74.005966&sort=RECOMMENDED&top_dp=915&top_cur=CNY&userIntent=&selectedRoomType=201500843&selectedRatePlan=389917096&expediaPropertyId=15040315&searchId=e7a01b52-eff2-4a53-b486-0a36b7520c84"
        },
        "rating": {
            "score": "8.0",
            "text": "Very Good",
            "reviewCount": "1,498 reviews"
        },
        "price": {
            "current": "CNY1,017",
            "total": "CNY1,076 total",
            "taxInfo": "includes taxes & fees"
        },
        "images": [
            {
                "description": "Room",
                "url": "https://images.trvl-media.com/lodging/16000000/15050000/15040400/15040315/b2013cad.jpg?impolicy=resizecrop&rw=455&ra=fit"
            },
            {
                "description": "City view",
                "url": "https://images.trvl-media.com/lodging/16000000/15050000/15040400/15040315/6347ac03.jpg?impolicy=resizecrop&rw=455&ra=fit"
            },
            {
                "description": "Interior entrance",
                "url": "https://images.trvl-media.com/lodging/16000000/15050000/15040400/15040315/5ef2fd41.jpg?impolicy=resizecrop&rw=455&ra=fit"
            },
            {
                "description": "Reception",
                "url": "https://images.trvl-media.com/lodging/16000000/15050000/15040400/15040315/9405473f.jpg?impolicy=resizecrop&rw=455&ra=fit"
            }
        ],
        "badges": {
            "tertiary": "CNY102 off"
        },
        "amenities": [],
        "scrapedAt": "2025-02-08T03:01:03.217Z"
    },
    ...
]
```

### Related Actors

- 🏨 [Hotels.com Review Scraper](https://apify.com/easyapi/hotels-com-review-scraper) - Extract detailed hotel reviews including ratings, review text, management responses, and reviewer information.
- 🏨 [Hotels.com Image Scraper](https://apify.com/easyapi/hotels-com-image-scraper) - Scrape high-quality hotel images and their descriptions from Hotels.com product pages.
- 🏨 [Booking Search Scraper](https://apify.com/easyapi/booking-search-scraper) - Extract comprehensive hotel data from Booking.com search results with customizable search parameters.
- 🏨 [Booking Reviews Scraper](https://apify.com/easyapi/booking-reviews-scraper) - Collect detailed guest reviews and ratings from any Booking.com hotel page.
- 🏨 [Hostelworld Scraper](https://apify.com/easyapi/hostelworld-scraper) - Scrape detailed hostel information including prices, ratings, facilities and room types.
- 🏨 [Hostelworld Reviews Scraper](https://apify.com/easyapi/hostelworld-reviews-scraper) - Extract comprehensive hostel reviews and ratings for detailed market analysis.
- 📊 [Article Content Extractor](https://apify.com/easyapi/article-content-extractor) - Extract clean article content and metadata from any web page with structured output.
- 🔍 [TripAdvisor Hotels Scraper](https://apify.com/easyapi/tripadvisor-hotels-scraper) - Scrape hotel listings with detailed information about ratings, pricing and amenities.
- ⭐ [TripAdvisor Reviews Scraper](https://apify.com/easyapi/tripadvisor-reviews-scraper) - Extract detailed hotel reviews with comprehensive data and user information.
- 🏠 [VRBO Property Listing Scraper](https://apify.com/easyapi/vrbo-property-listing-scraper) - Scrape vacation rental listings with detailed property information and amenities.
- 🏠 [Realtor.com Scraper](https://apify.com/easyapi/realtor-com-scraper) - Extract detailed property listings including prices, features and location details.
- 🏠 [Rightmove Property Search Scraper](https://apify.com/easyapi/rightmove-property-search-scraper) - Collect comprehensive property data from the UK's leading property website.
- 🌍 [URL Metadata Crawler](https://apify.com/easyapi/url-metadata-crawler) - Extract comprehensive metadata from web pages including meta tags and Open Graph data.
- 📸 [Pinterest Image Downloader](https://apify.com/easyapi/pinterest-image-downloader) - Download high-quality images from Pinterest with batch processing capabilities.
- 🔍 [Keyword Suggestions Scraper](https://apify.com/easyapi/keyword-suggestions-scraper) - Get keyword suggestions from multiple search engines and e-commerce platforms.

# Actor input Schema

## `searchUrls` (type: `array`):

List of Hotels.com search result URLs to scrape

## `maxItems` (type: `integer`):

Maximum number of hotel listings to scrape (default: 100)

## `proxyConfiguration` (type: `object`):

Proxy settings for the scraper

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.hotels.com/Hotel-Search?destination=New%20York%2C%20New%20York%2C%20United%20States%20of%20America&regionId=2621&latLong=40.712843%2C-74.005966&flexibility=0_DAY&d1=2025-02-22&startDate=2025-02-22&d2=2025-02-23&endDate=2025-02-23&adults=2&rooms=1&isInvalidatedDate=false&theme=&userIntent=&semdtl=&useRewards=false&sort=RECOMMENDED"
  ],
  "maxItems": 150,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/hotels-com-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("easyapi/hotels-com-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call easyapi/hotels-com-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=easyapi/hotels-com-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Hotels.com Scraper 🏨",
        "description": "Scrape detailed hotel listings from Hotels.com including prices, ratings, amenities, and images. Perfect for price monitoring, market analysis, and travel research.",
        "version": "0.0",
        "x-build-id": "tmN2Oxbf7LX9Ngp90"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/easyapi~hotels-com-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-easyapi-hotels-com-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/easyapi~hotels-com-scraper/runs": {
            "post": {
                "operationId": "runs-sync-easyapi-hotels-com-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/easyapi~hotels-com-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-easyapi-hotels-com-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "searchUrls"
                ],
                "properties": {
                    "searchUrls": {
                        "title": "Search URLs",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "List of Hotels.com search result URLs to scrape",
                        "default": [
                            "https://www.hotels.com/Hotel-Search?destination=New%20York%2C%20New%20York%2C%20United%20States%20of%20America&regionId=2621&latLong=40.712843%2C-74.005966&flexibility=0_DAY&d1=2025-02-22&startDate=2025-02-22&d2=2025-02-23&endDate=2025-02-23&adults=2&rooms=1&isInvalidatedDate=false&theme=&userIntent=&semdtl=&useRewards=false&sort=RECOMMENDED"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Maximum Items",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of hotel listings to scrape (default: 100)",
                        "default": 150
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for the scraper",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
