Expedia Scraper or API: What You Get
An Expedia scraper is code that runs a hotel search for a destination and a date range, reads each result's price, rating and position, then opens hotels for their rooms and rate plans. Every date pair and guest count is a different page, so the scraper's workload grows with the dates you track, not just the hotels. The alternative is four Expedia endpoints that return the same data as JSON at 1 credit per successful call. This post compares the two on a recorded Paris search and rooms call, prices tracking per hotel and date, and gives a verdict per use case.
What does an Expedia scraper have to fetch, parse and maintain?
An Expedia scraper is a search-results parser, a hotel-page parser and a scheduler that multiplies both by every date you care about. The search parser reads name, position, price and rating for each hotel in a region. The hotel parser reads rooms and their rate options. The scheduler decides which check-in dates, lengths of stay and guest counts to request, because each combination is its own page with its own prices.
The parsing is the part that breaks. On a travel results page, one block can hold a price, a crossed-out price, a badge and a sponsored marker, and any site's layout changes as it ships new designs. On many sites prices arrive after the first page response, in which case a plain HTTP fetch returns a page without them and you end up running a browser. A price only means something next to the dates, guests and currency it was shown for, so the scraper also has to record what it asked for next to what it read.
The operational layer is the same as for any scraper: pacing, retries, alerts when a run returns empty prices, and storage of raw pages for re-parsing. A large booking site has to tell people from automated traffic, so a job that requests hundreds of date pairs a day should expect slow responses and blocked requests; if that happens, stop rather than work around it. Read Expedia's terms of use before you build a collector. Google Flights Scraper or API covers the same date-multiplied problem for airfares.
What do the Expedia endpoints return?
The Expedia API has four GET endpoints, each costing 1 credit per successful call. Two of them, hotels-search and hotels-rooms, take dates and return prices; the other two look up a destination and a hotel's details. Dates go in as check_in and check_out strings in the form the recordings use, such as 2026-11-20.
| Endpoint | Returns | Required parameters | Optional parameters |
|---|---|---|---|
GET /v1/expedia/destinations |
Destinations | query |
limit |
GET /v1/expedia/hotels-search |
Hotels in a region for a date range | check_in, check_out, region_id |
adults, children, region_name, sort, limit, offset |
GET /v1/expedia/hotels-rooms |
Rooms and rate plans for one hotel | check_in, check_out, property_id |
adults, children |
GET /v1/expedia/hotels-detail |
Hotel detail | property_id |
check_in, check_out, adults |
sort takes recommended, price_low_to_high or review. destinations takes a place name as query; there's no recorded response for it here, so run it in the playground on the Destinations page to see what it returns before you rely on it for region_id values. The recorded search below uses region_id=2734 with region_name=Paris, France.
What do the recorded search and rooms calls show?
The two recorded calls cover the same stay, three nights in Paris from 2026-11-20 for two adults, at two levels. The search returns one price per hotel in a ranked list; the rooms call returns each room and its rate plans for one of those hotels. The search's first property_id, 564660, is the one the rooms call uses, so the recordings show the hand-off a scraper would make by following a link.
The region search
curl "https://api.perceptlayer.com/v1/expedia/hotels-search?region_id=2734®ion_name=Paris%2C+France&check_in=2026-11-20&check_out=2026-11-23&adults=2&limit=10" \
-H "X-API-Key: $API_KEY"
{
"success": true,
"data": {
"region_id": "2734",
"check_in": "2026-11-20",
"check_out": "2026-11-23",
"hotels": [
{
"property_id": "564660",
"position": 1,
"name": "Mercure Paris Centre Tour Eiffel",
…
"guest_rating": 8,
"guest_rating_label": "Very good",
"review_count": 1000,
"total_price": 690,
"price_per_night": 230,
…
"free_cancellation": false,
"sponsored": true,
…
"currency": "EUR"
},
{
"property_id": "994215",
"position": 2,
…
"total_price": 1203,
"original_price": 1329,
"price_per_night": 401,
…
"sponsored": true,
…
}
],
"total_results": 500,
"offset": 0,
"has_more": true,
"next_offset": 10
},
…
}
The rooms call for the first hotel
curl "https://api.perceptlayer.com/v1/expedia/hotels-rooms?property_id=564660&check_in=2026-11-20&check_out=2026-11-23&adults=2" \
-H "X-API-Key: $API_KEY"
{
"success": true,
"data": {
"property_id": "564660",
…
"currency": "EUR",
"rooms": [
{
"unit_id": "226385",
"name": "Classic Room, 1 Double Bed",
"features": ["18 sq m", "Sleeps 2"],
…
"rate_plans": [
{ "rate_plan_id": "397104173", "total_price": 690, "price_per_night": 230 },
{ "rate_plan_id": "397104181", "total_price": 825, "price_per_night": 275 }
]
},
{
"unit_id": "226392",
"name": "Classic Room, 2 Single Beds",
…
"rate_plans": [
{ "rate_plan_id": "397104205", "total_price": 700, "price_per_night": 233 },
…
]
}
]
},
…
}
What in these responses still needs care?
Named fields remove the parsing, not the interpretation. The recordings show five details a tracker has to handle, and a scraper would meet the same ones inside HTML.
| Detail | What the recordings show | What to do |
|---|---|---|
| Sponsored results | Both hotels shown have sponsored: true, at position 1 and 2 |
Store sponsored with position; filter it out before you report organic rank |
| Discounts | original_price: 1329 appears on the second hotel only |
Treat it as optional; a missing value means no crossed-out price, not zero |
| Rounded nightly prices | Rate plan 397104205 has total_price: 700 and price_per_night: 233 for 3 nights |
Compare stays on total_price; 700 ÷ 3 is 233.33 |
| Currency | currency: "EUR" on each hotel and on the rooms response |
Store it on every row; don't assume one currency across runs |
| IDs as strings | property_id: "564660", region_id: "2734", rate_plan_id: "397104173" |
Keep them as text; don't cast to integers |
The search price for hotel 564660, total_price: 690, is the same as its cheapest rate plan in the rooms call. That holds for this pair of recordings; check it on your own hotels before you treat the search price as the lowest room rate.
How do an Expedia scraper and the endpoints compare?
A scraper costs engineering time, possibly browser automation, and terms and blocking risk; the endpoints cost 1 credit per successful call and return prices as numbers with a currency. The table compares them on a recurring job: tracking prices and rank for a set of hotels across upcoming dates.
| DIY Expedia scraper | Expedia endpoints | |
|---|---|---|
| Region search | Parse result cards per date pair | hotels-search with region_id, check_in, check_out |
| Prices | Text to parse from each result card | total_price, price_per_night, original_price as numbers, plus currency |
| Rank and ads | Infer from layout and badges | position and sponsored on each hotel |
| Rooms and rate plans | A second parser per hotel page | hotels-rooms: rooms[] with unit_id, name, features, amenities, rate_plans[] |
| Paging | Find and follow the site's paging | limit and offset; response has total_results, has_more, next_offset |
| Joining records | Whatever ID the page exposes | property_id in search and rooms |
| When the page changes | Parsers return blanks until fixed | Same JSON fields; no parser of yours to fix |
| Failures | Yours to detect | HTTP status and error code; a failed call costs 0 credits |
| Cost | Hosting, any browser automation, your time | 1 credit per successful call |
What does each hotel-date cost?
Cost follows calls, and every call is for one date pair. Room-level tracking is 1 credit per hotel per date pair: 20 hotels across the next 30 check-in dates is 20 × 30 = 600 calls × 1 credit = 600 credits per sweep. Run that daily and it's 18,000 credits over 30 days, inside the 50,000-credit Build pack.
Region-level tracking is cheaper per hotel, because one search call covers a page of hotels. The recorded call used limit=10 and returned next_offset: 10; at that page size, the top 50 hotels for one date pair is 5 calls, so 30 dates is 5 × 30 = 150 credits a day, or 4,500 credits over 30 days. Combine them by searching the region and calling hotels-rooms only for hotels whose total_price moved. The 100 free credits you get once on signup cover a test sweep of a few hotels. See pricing for what credits cost and the credits docs for how they're debited.
A date sweep in Python
This script searches Paris for 3-night stays starting on each of the next 7 days and stores one row per hotel per date in SQLite. It reads only fields in the recorded search response and costs 7 credits.
import os
import sqlite3
from datetime import date, timedelta
import requests
API = "https://api.perceptlayer.com/v1/expedia/hotels-search"
HEADERS = {"X-API-Key": os.environ["API_KEY"]}
db = sqlite3.connect("expedia_prices.db")
db.execute(
"""CREATE TABLE IF NOT EXISTS prices (
run_date TEXT, check_in TEXT, property_id TEXT, position INTEGER,
name TEXT, total_price REAL, currency TEXT, sponsored INTEGER,
PRIMARY KEY (run_date, check_in, property_id))"""
)
today = date.today()
for offset in range(1, 8):
check_in = today + timedelta(days=offset)
params = {
"region_id": "2734",
"region_name": "Paris, France",
"check_in": check_in.isoformat(),
"check_out": (check_in + timedelta(days=3)).isoformat(),
"adults": 2,
"limit": 10,
}
r = requests.get(API, params=params, headers=HEADERS, timeout=60)
r.raise_for_status()
for h in r.json()["data"].get("hotels", []):
db.execute(
"INSERT OR REPLACE INTO prices VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
(today.isoformat(), check_in.isoformat(), h["property_id"], h.get("position"),
h.get("name"), h.get("total_price"), h.get("currency"), int(bool(h.get("sponsored")))),
)
db.commit()
A failed call raises before its rows are written and costs nothing. The errors docs list the codes, such as rate_limited (429), which comes with a Retry-After header. Paging past the first 10 uses offset; the response's next_offset has the matching name, so check the second page in the playground before you loop on it.
Which route fits your job?
Pick by how many dates you track and what you do with the prices: a scraper's cost is upkeep that grows with every date pair, the endpoints' cost is 1 credit per call. These verdicts assume a recurring job; for one trip, open Expedia in a browser.
- Rate parity or competitor pricing for a set of hotels: call
hotels-roomsper hotel per date pair and storerate_plan_id,total_priceandcurrency. 1 credit per hotel-date. - Market price levels for a destination: run
hotels-searchper date pair withsort=price_low_to_highorrecommendedand storetotal_pricebyproperty_id. - Rank and visibility tracking: run
hotels-searchwith the same parameters each day and storepositionwithsponsored, so ads don't distort the trend. - Discount tracking: store
original_pricewhere it appears and compare it withtotal_price. - An AI agent planning trips: give it the Expedia endpoints through the MCP server, as the AI agents docs describe, so it calls
hotels-searchinstead of browsing. - Learning to scrape: build against a practice site, not a booking platform.
Hotel API: Expedia, Booking.com and Google Hotels compares three hotel sources, Expedia Hotels API: Search Hotels and Rooms as JSON walks through the flow step by step, and the travel APIs page lists the rest. To check prices for your own city and dates, run hotels-search in the playground on the Expedia API page, then get a free API key.
APIs in this post
Frequently asked questions
Is scraping Expedia allowed?
That depends on Expedia's terms of use and the law where you operate, so read the terms and get legal advice before collecting at commercial scale. Don't get around blocks, challenges or other protections. Hotel prices, ratings and room names are business data; if you collect reviews later, leave reviewers' names and profiles out of what you store.
How many credits does tracking one hotel cost?
Each successful call costs 1 credit and covers one date pair. Tracking one hotel's rooms for 30 check-in dates is 30 credits per sweep; doing it daily is 900 credits over 30 days. Searching a region instead covers a page of hotels per call, so it costs less per hotel when you track many in one city.
Does the search price match the room price?
In the recorded calls for hotel 564660, 2026-11-20 to 2026-11-23, the search returned total_price: 690 and the cheapest rate plan in the rooms call was also total_price: 690. That is one pair of recordings, not a rule. Call hotels-rooms when you need every rate plan, and compare on total_price rather than the rounded price_per_night.
Does a failed Expedia call cost credits?
No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a code, a message and a request_id, plus X-Credits-Used: 0. A client timeout is different: the request may have succeeded and been billed, so check X-Credits-Remaining before retrying a large sweep.
How fast can I run a 600-call sweep?
Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so 600 calls take 10 minutes. Paying accounts run at least 5 requests a second (300 a minute), which brings the sweep to 2 minutes. The rate limits docs list the rate each pack includes.