Expedia & Hotels.com reviews scraper avatar
Expedia & Hotels.com reviews scraper
Try for free

Pay $2.00 for 1,000 Reviews

View all Actors
Expedia & Hotels.com reviews scraper

Expedia & Hotels.com reviews scraper

tri_angle/expedia-hotels-com-reviews-scraper
Try for free

Pay $2.00 for 1,000 Reviews

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

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more

Node.js

Python

curl

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5    token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10    "startUrls": [
11        {
12            "url": "https://www.expedia.com/Prague-Hotels-Hotel-Krystal.h10966026.Hotel-Information",
13            "method": "GET",
14            "userData": {
15                "hotel": "Prague Hotel Krystal",
16                "doWeEndorseIt": "no opinion"
17            }
18        },
19        {
20            "url": "https://www.expedia.it/en/Berchtesgaden-Hotels-Alpensport-Hotel-Seimler.h2692552.Hotel-Information",
21            "method": "GET",
22            "userData": {
23                "your": [
24                    "custom",
25                    "data",
26                    "goes",
27                    "here"
28                ],
29                "doWeEndorseThisHotel": "no opinion"
30            }
31        }
32    ]
33};
34
35(async () => {
36    // Run the Actor and wait for it to finish
37    const run = await client.actor("tri_angle/expedia-hotels-com-reviews-scraper").call(input);
38
39    // Fetch and print Actor results from the run's dataset (if any)
40    console.log('Results from dataset');
41    console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42    const { items } = await client.dataset(run.defaultDatasetId).listItems();
43    items.forEach((item) => {
44        console.dir(item);
45    });
46})();
47
48// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
Developer
Maintained by Apify
Actor metrics
  • 29 monthly users
  • 99.5% runs succeeded
  • 2.8 days response time
  • Created in Mar 2023
  • Modified 4 days ago
Categories