# Expedia Review Scraper (`tri_angle/expedia-hotels-com-reviews-scraper`) Actor

Scraper to get reviews from URLs of hotels, apartments, and other accommodations listed on Expedia.com and Vrbo.com and Hotels.com portals

- **URL**: https://apify.com/tri\_angle/expedia-hotels-com-reviews-scraper.md
- **Developed by:** [Tri⟁angle](https://apify.com/tri_angle) (Apify)
- **Categories:** Travel
- **Stats:** 541 total users, 33 monthly users, 100.0% runs succeeded, 18 bookmarks
- **User rating**: 3.35 out of 5 stars

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Expedia / Hotels.com reviews scraper

This is a simple scraper to get reviews from URLs hotels, apartments and other accommodations listed on Expedia.com and Hotels.com portals.

For each hotel, input a link to the hotel detail page, which will look something like this:

```raw
https://www.expedia.com/Prague-Hotels-Pentahotel-Prague.h525006.Hotel-Information?chkin=2023-03-17&chkout=2023-03-18&x_pwa=1&rfrr=HSR&pwa_ts=1677850168323&sort=RECOMMENDED&top_dp=82&top_cur=USD&userIntent=
https://www.hotels.com/ho136900/hilton-prague-old-town-prague-czech-republic/?pwaDialogNested=PropertyDetailsReviewsBreakdownDialog
https://www.expedia.it/en/Berchtesgaden-Hotels-Alpensport-Hotel-Seimler.h2692552.Hotel-Information
```

Additionally, you can click on the "Advanced" button in the URL input field and provide any `userData`. Everything provided here will be available on each review as `customData`, to allow later easy identification of which review belongs to which hotel.

You will get raw review data, so individual reviews will look something like this:

```json
{
    "contentDirectFeedbackPromptId": null,
    "id": "123456789abcdef",
    "superlative": "Excellent",
    "locale": "en_GB",
    "title": "",
    "brandType": "Expedia",
    "reviewScoreWithDescription": {
        "label": "10 out of 10 Excellent",
        "value": "10/10 Excellent"
    },
    "text": "Excellent location and value for money. Great service. Clean. ",
    "seeMoreAnalytics": {
        "linkName": "See more reviews",
        "referrerId": "HOT.HIS.See_more."
    },
    "submissionTime": {
        "longDateFormat": "Apr 15, 2022"
    },
    "impressionAnalytics": null,
    "themes": [
        {
            "icon": {
                "id": "sentiment_4"
            },
            "label": "Liked: Cleanliness, staff & service, amenities, property conditions & facilities"
        }
    ],
    "reviewFooter": {
        "messages": [
            {
                "seoStructuredData": {
                    "itemscope": true,
                    "itemprop": "author",
                    "itemtype": "https://schema.org/Person",
                    "content": "John"
                },
                "text": {
                    "text": "Stayed 1 night in Apr 2022"
                }
            }
        ]
    },
    "reviewInteractionSections": [
        {
            "primaryDisplayString": "0",
            "accessibilityLabel": "Mark review 3 as helpful. 0 other users found review 3 helpful.",
            "reviewInteractionType": "HELPFUL_REVIEW",
            "feedbackAnalytics": {
                "linkName": "Helpful review",
                "referrerId": "HOT.HIS.ReviewsOverlay.THUMB_UP.UPVOTE"
            }
        },
        {
            "primaryDisplayString": null,
            "accessibilityLabel": null,
            "reviewInteractionType": "REVIEW_REPORT_FLAG",
            "feedbackAnalytics": null
        }
    ],

    "reviewAuthorAttribution": {
        "text": "John"
    },
    "photoSection": null,
    "photos": [],
    "travelers": ["Traveled with family"],
    "translationInfo": null,
    "propertyReviewSource": null,
    "reviewRegion": null,
    "managementResponses": [
        {
            "id": "3b23cd4c-ac5c-42a7-91f2-89b8d8dec7e2",
            "header": {
                "text": "Response from Jane on Apr 19, 2022"
            },
            "response": "Thank you so much, we appreciate it a lot!"
        }
    ],
    "hotelId": "123456",
    "customData": {
        "userDataKey1": "your custom data here",
        "userDataKey2": ["arbitrary JSON data can be here"]
    }
}
```

Actor icon attribution: [Condominium icons created by Uniconlabs - Flaticon](https://www.flaticon.com/free-icons/condominium)

# Actor input Schema

## `startUrls` (type: `array`):

URLs of hotels to scrape reviews from. If you add any userData, it will be included in each review for given hotel under the key `customData`

## `maxReviewsPerHotel` (type: `integer`):

Maximum number of reviews to scrape per hotel. If you keep it empty, there will be no limit

## `sortBy` (type: `string`):

Note: this will not affect the order of reviews in the dataset, since review items are scraped in parallel, so later pages might finish before previous ones. However, it helps in the case you are limiting maximum number of reviews per hotel.

## `minDate` (type: `string`):

Scrape only reviews after this date. Use format YEAR-MONTH-DAY, e.g. 2019-01-25. Ignored when using any other sorting than Most recent

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.expedia.com/Prague-Hotels-Hotel-Krystal.h10966026.Hotel-Information",
      "method": "GET",
      "userData": {
        "hotel": "Prague Hotel Krystal",
        "doWeEndorseIt": "no opinion"
      }
    },
    {
      "url": "https://www.expedia.it/en/Berchtesgaden-Hotels-Alpensport-Hotel-Seimler.h2692552.Hotel-Information",
      "method": "GET",
      "userData": {
        "your": [
          "custom",
          "data",
          "goes",
          "here"
        ],
        "doWeEndorseThisHotel": "no opinion"
      }
    }
  ],
  "sortBy": "Most relevant",
  "minDate": "1990-01-01"
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.expedia.com/Prague-Hotels-Hotel-Krystal.h10966026.Hotel-Information",
            "method": "GET",
            "userData": {
                "hotel": "Prague Hotel Krystal",
                "doWeEndorseIt": "no opinion"
            }
        },
        {
            "url": "https://www.expedia.it/en/Berchtesgaden-Hotels-Alpensport-Hotel-Seimler.h2692552.Hotel-Information",
            "method": "GET",
            "userData": {
                "your": [
                    "custom",
                    "data",
                    "goes",
                    "here"
                ],
                "doWeEndorseThisHotel": "no opinion"
            }
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tri_angle/expedia-hotels-com-reviews-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 = { "startUrls": [
        {
            "url": "https://www.expedia.com/Prague-Hotels-Hotel-Krystal.h10966026.Hotel-Information",
            "method": "GET",
            "userData": {
                "hotel": "Prague Hotel Krystal",
                "doWeEndorseIt": "no opinion",
            },
        },
        {
            "url": "https://www.expedia.it/en/Berchtesgaden-Hotels-Alpensport-Hotel-Seimler.h2692552.Hotel-Information",
            "method": "GET",
            "userData": {
                "your": [
                    "custom",
                    "data",
                    "goes",
                    "here",
                ],
                "doWeEndorseThisHotel": "no opinion",
            },
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tri_angle/expedia-hotels-com-reviews-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 '{
  "startUrls": [
    {
      "url": "https://www.expedia.com/Prague-Hotels-Hotel-Krystal.h10966026.Hotel-Information",
      "method": "GET",
      "userData": {
        "hotel": "Prague Hotel Krystal",
        "doWeEndorseIt": "no opinion"
      }
    },
    {
      "url": "https://www.expedia.it/en/Berchtesgaden-Hotels-Alpensport-Hotel-Seimler.h2692552.Hotel-Information",
      "method": "GET",
      "userData": {
        "your": [
          "custom",
          "data",
          "goes",
          "here"
        ],
        "doWeEndorseThisHotel": "no opinion"
      }
    }
  ]
}' |
apify call tri_angle/expedia-hotels-com-reviews-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/4zyibEJ79jE7VXIpA/builds/qWWKLGqt56DKvPYuj/openapi.json
