Use Expedia Hotel Rate & Guest Rating Finder with Python
Searches Expedia for a destination and travel dates and returns hotel names, nightly and total pricing, guest ratings, neighborhoods, and promotional badges.
1. Choose the data you need
Review the published README for supported collection modes, examples, and limits. The recipe below uses the current published input definition.
2. Prepare a source-based input
This JSON contains published prefills and required-field defaults. Review every value for your task before running it; it is not a promise of successful collection.
{
"adults": 2,
"amenities": [],
"availableOnly": false,
"checkIn": "",
"checkOut": "",
"childrenAges": [],
"destination": "New York",
"freeCancellationOnly": false,
"includePropertyDetails": false,
"includeRoomRates": false,
"maxItems": 1,
"minGuestRating": "any",
"mode": "search",
"propertyType": "any",
"rooms": 1,
"sortBy": "recommended",
"starRatings": [],
"startUrls": []
}
Download input.example.json and save your reviewed copy as input.json.
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | required | Search by destination, or scrape Expedia hotel and search URLs/IDs. |
destination | string | optional | City, area, landmark, airport, or hotel name to search (mode=search). Examples: New York, London, Tokyo, Times Square. |
destinationId | string | optional | Optional Expedia region ID to skip destination lookup (mode=search). Use only if you already know the region ID. |
startUrls | array | optional | Expedia hotel pages, Hotel-Search links, share links, or bare hotel IDs such as h17117062 or 17117062 (mode=urls). |
checkIn | string | optional | YYYY-MM-DD. Leave empty to use 30 days from today. |
checkOut | string | optional | YYYY-MM-DD. Leave empty to use 2 nights after check-in. |
adults | integer | optional | Adult guests per room (1-14). |
childrenAges | array | optional | One age (0-17) per child. Leave empty for no children. |
rooms | integer | optional | Number of rooms (1-8). |
maxItems | integer | optional | Hard cap on hotel records (1-1000). Expedia returns up to 500 per request; larger caps use nextSubSet pagination. |
sortBy | string | optional | Order of the hotel search results. |
starRatings | array | optional | Only these star classes (1-5). Leave empty for all stars. |
minGuestRating | string | optional | Minimum guest review score on Expedia's 10-point scale. |
minPrice | number | optional | Minimum nightly price in USD. Hotels without a nightly price are skipped when a price limit is set. |
maxPrice | number | optional | Maximum nightly price in USD. Hotels without a nightly price are skipped when a price limit is set. |
propertyType | string | optional | Restrict results to a type of place. |
amenities | array | optional | Only hotels with all selected amenities. Leave empty for no amenity filter. |
freeCancellationOnly | boolean | optional | Only return properties with a fully refundable rate. |
availableOnly | boolean | optional | Only return properties with rooms available for the selected dates. |
propertyName | string | optional | Filter by property name, for example Marriott or Hilton. |
includePropertyDetails | boolean | optional | Add exact star class, address, coordinates, full amenities, policies, and gallery images. This fetches one property page per hotel (mode=search). |
includeRoomRates | boolean | optional | Add room types, live nightly rates, payment policy, and cancellation policy for each hotel. This makes one extra request per hotel. |
3. Start an Actor run
Set APIFY_TOKEN in your environment. Python 3.10 or newer is sufficient; this recipe uses no third-party packages.
Execution may incur charges. Review current pricing on Apify. The request asks for a 120-second timeout and a charge limit; these settings are subject to Apify’s pricing and do not guarantee an all-inclusive spending cap.
import json
import os
import urllib.request
# Save the schema-derived example as input.json; review and edit it first.
with open("input.json", encoding="utf-8") as stream:
actor_input = json.load(stream)
token = os.environ["APIFY_TOKEN"]
request = urllib.request.Request(
"https://api.apify.com/v2/acts/aGnG4rQ2ykpjOw44W/runs?timeout=120&maxTotalChargeUsd=0.50",
data=json.dumps(actor_input).encode("utf-8"),
headers={"Authorization": "Bearer " + token, "Content-Type": "application/json"},
method="POST",
)
# This starts a potentially billable run. Do not automatically retry this POST.
with urllib.request.urlopen(request, timeout=40) as response:
run = json.load(response)["data"]
print("Run ID:", run["id"])
print("Status:", run["status"])
# Inspect and download results in Apify Console once the run succeeds.
4. Inspect the actual results
Open the run in Apify Console and wait for a successful completion. Use the published output schema to locate results and the dataset schema to understand declared views. Missing or optional record fields must not be treated as guaranteed values.
Expedia hotel records with live nightly and total rates, exact star class, guest rating and review count, address and coordinates, amenities, images, and optional room rates and cancellation policies.
Questions before you run
Which inputs are required?
The published required fields are mode
What does this guide verify?
The fields, prefills, and schema links are rendered from the published build. This is a usage recipe, not a paid live extraction test. Source availability and collection results can vary.
What if the run request times out?
Check Apify Console before retrying. The first request may already have created a run. Do not automatically repeat a run-creation POST.
Generated from source build omOFbmXA6vxSUIWfn and its README and schemas. Source changes regenerate this guide; no third-party editorial claims are inferred.