# Expedia Hotel Data Aggregator - Organize and Examine Insights (`dainty_screw/expedia-hotel-collector---store-and-analyze-data`) Actor

Effortlessly gather and store key details of Expedia hotels, including names, ratings, and prices. Use our tool for competitive analysis and strategic planning in the hospitality sector.

- **URL**: https://apify.com/dainty_screw/expedia-hotel-collector---store-and-analyze-data.md
- **Developed by:** [codemaster devops](https://apify.com/dainty_screw) (community)
- **Categories:** Automation, Travel
- **Stats:** 60 total users, 1 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

#### Expedia Hotel Data Aggregator - Organize and Examine Insights

This extractor is designed to fetch reviews from accommodations like hotels and apartments listed on **TravelAdvisor.com** and **LodgeFinder.com**.

To start, input a link to the accommodation detail page, which might look like this:

```raw
https://www.traveladvisor.com/Prague-Hotels-HighTower-Prague.h525006.Hotel-Details?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.lodgefinder.com/ho136900/grand-prague-downtown-prague-czech-republic/?pwaDialogNested=PropertyDetailsReviewsBreakdownDialog
https://www.traveladvisor.com/en/Berchtesgaden-Hotels-MountainView-Lodge.h2692552.Hotel-Details
```

Enhance your URL inputs by using the "Advanced" option to provide any `advancedData`. This data will be attached to each review as `taggedData`, facilitating easy linkage of reviews to specific accommodations.

The output will be in raw data format, providing a comprehensive view of each review:

```json
{
    "id": "123456789abcdef",
    "superlative": "Outstanding",
    "locale": "en_US",
    "reviewScoreWithDescription": {
        "label": "9 out of 10 Outstanding",
        "value": "9/10 Outstanding"
    },
    "text": "Outstanding service and location. Impeccably clean.",
    "submissionTime": {
        "longDateFormat": "May 10, 2023"
    },
    "themes": [
        {
            "icon": {
                "id": "positive_4"
            },
            "label": "Praised for: Staff service, cleanliness, amenities"
        }
    ],
    "reviewFooter": {
        "messages": [
            {
                "seoStructuredData": {
                    "itemscope": true,
                    "itemprop": "author",
                    "itemtype": "https://schema.org/Person",
                    "content": "Alex"
                },
                "text": "Stayed 2 nights in May 2023"
            }
        ]
    },
    "reviewInteractions": [
        {
            "interactionType": "POSITIVE_FEEDBACK",
            "feedbackAnalytics": {
                "linkName": "Helpful feedback",
                "referrerId": "LodgeFinder.Reviews.Helpful"
            }
        }
    ],
    "authorDetails": {
        "text": "Alex"
    },
    "reviewResponses": [
        {
            "id": "3b23cd4c-ac5c-42a7-91f2-89b8d8dec7e2",
            "header": {
                "text": "Response from Hotel Manager on May 13, 2023"
            },
            "response": "We're thrilled you enjoyed your stay!"
        }
    ],
    "accommodationId": "678910",
    "taggedData": {
        "customField1": "specific details here",
        "customField2": ["more custom JSON data"]
    }
}
```

#### COnnect with US

- **YouTube**: [Visit our channel](https://www.youtube.com/@CodeMaster-421)
- **Instagram**: [Follow us on Instagram](https://www.instagram.com/quicklifesolutionsofficial/)
- **AI Newsletter**: [Subscribe to our newsletter](https://sendfox.com/quicklifesolutions)
- **Free Consultation**: [Book a free consultation call](https://tidycal.com/quicklifesolutions/free-consultation)
- **More Tools**: [Explore our Apify actors](https://apify.com/dainty_screw)

#### Support :

- **Discord**: [Raise a Support ticket here ](https://discord.gg/2WGj2PDmHb)

# Changelog

This Actor's version history is a separate document: https://apify.com/dainty_screw/expedia-hotel-collector---store-and-analyze-data/changelog.md

# 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

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

Optionally use Apify Proxy

## `debugLog` (type: `boolean`):

Enables more verbose logging

## `maxRequestRetries` (type: `integer`):

Maximum number of retries when a request fails

## `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"
      }
    }
  ],
  "maxReviewsPerHotel": 99999999,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxRequestRetries": 8,
  "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("dainty_screw/expedia-hotel-collector---store-and-analyze-data").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("dainty_screw/expedia-hotel-collector---store-and-analyze-data").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 '{
  "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 dainty_screw/expedia-hotel-collector---store-and-analyze-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dainty_screw/expedia-hotel-collector---store-and-analyze-data"
        }
    }
}
```

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/KMOlHOpNSzpU6DlLL/builds/D5glZ8348a2jz1mN6/openapi.json
