# 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:** 97 total users, 4 monthly users, 98.5% 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,easyapi/hotels-com-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9IsqbT80jFalzhzuv/builds/tmN2Oxbf7LX9Ngp90/openapi.json
