Skip to content
Blog

Hotel Price API: Track Hotel Rates by Country

Carmine Cella4 min read
Hotel Price API: the same room shows $169 before tax to a US visitor and €190 with taxes included to a German visitor

Hotel Price API: Track Hotel Rates by Country

A search for a hotel price API usually leads to partner programs with restricted access. Teams that monitor public rates therefore collect the same pages a traveler sees. This guide explains how geolocation drives localized pricing for a single room. It then shows a fair cross-country test in Python.

Is there a public hotel price API?

Platforms build most official options, including the Booking.com API, for hotels, channel managers and affiliates. An open hotel API that returns rates for any property is rare.

Public rate monitoring therefore relies on two sources. The first is the public property URL, a logged-out hotel listing with dates and guests encoded in the query string. That page typically lists room types, nightly prices and review scores. The second is Google results for a hotel search such as "hotels in Rome", which reveal the properties and prices a market sees.

Hotel rate scraping is the web scraping of these pages on a schedule to build structured price data. Teams that scrape Booking.com usually stay logged out and avoid personal data.

Why the same hotel shows different prices by country

The page often selects a currency through IP geolocation. Some markets also display tax-inclusive prices, while others add VAT and city tax at checkout.

Diagram: the same hotel and dates requested from the US shows $169 per night before VAT and city tax, and from Germany shows €190 with taxes included
Same hotel, same night, two countries

A fair test isolates the exit country as the only variable. The same principle underlies any rate parity check. Keep dates, guests and currency identical in the URL, and send both requests logged out within minutes. Then compare the same room type and record which taxes each price includes.

Python example: one hotel listing from two countries

The Unlocker API fetches the page through our own proxy network and returns Markdown. The proxy_country field, described in the Tasks reference, sets the exit country, and js_rendering loads the prices. The script below simplifies the one we used for the test. It reads your API key from an environment variable.

import os, time, re, requests

API = "https://scraping-api.datafuel.ai/api/v1/task"
KEY = {"X-API-Key": os.environ["DATAFUEL_API_KEY"]}
URL = ("https://www.booking.com/hotel/it/EXAMPLE.html?checkin=2026-11-18"
       "&checkout=2026-11-19&group_adults=2&group_children=0&no_rooms=1")

def fetch(country, tries=3):
    body = {"type": "unlocker", "proxy_type": "Basic", "proxy_country": country,
            "attributes": {"url": URL, "js_rendering": True, "result_format": "markdown"}}
    for n in range(tries):
        task = requests.post(API, headers=KEY, json=body, timeout=180).json()
        code = task.get("status_code")
        if task.get("status") == "completed" and code == 200:
            return task["result"]["data"]
        if code in (404, 410):
            return None  # page does not exist
        time.sleep(2 ** n + 1)

for c in ["US", "DE"]:
    print(c, re.findall(r"(?:€|\$)\s?\d[\d.,]*", fetch(c) or "")[:4])
Flowchart: send the task, parse prices when it completes with status 200, stop on 404 or 410, otherwise wait and retry up to three times
Request and retry flow

What we got

We ran the test on 21 October 2026 against a mid-range hotel in central Rome, for one night in November:

  • United States exit: first room for 1 guest at $169 per night, with VAT (10%) and city tax excluded.
  • Germany exit: single room at €190, with taxes and charges included.

Both pages returned status 200 and cost 5 credits each.

The page displayed dollars to the US visitor even though our URL requested euros. In addition, the US price excluded taxes, whereas the German price was tax-inclusive.

Adding 10% VAT to $169 gives about $186, so currency and tax display explain most of the gap in this sample. Reliable normalization converts each price with the exchange rate of the snapshot date. It also stores the exit country, time, room and included taxes.

Two routes: residential proxies or Unlocker API

Comparison: residential proxies with your own scraper, billed per GB, next to Unlocker API plus Search API, billed per successful request
Two routes to public hotel prices

Route 1: residential proxies with your own scraper

Residential proxies suit teams that already run a scraper or headless browser. Our own network targets country, region, city and ASN, and sticky sessions last up to 24 hours. Pricing starts from $3.15/GB, traffic never expires, and the free trial needs no credit card. You maintain the browser, parsing and retries.

Route 2: Unlocker API plus Search API

The Unlocker API handles anti-bot checks and JavaScript rendering inside the request. A basic page costs 1 credit and a rendered page 5, and Datafuel does not bill failed tasks.

The Search API returns Google results for a chosen country at 50 credits per search, and Datafuel refunds blocked queries. A common setup finds properties with the Search API and fetches each property URL with the Unlocker API. The pricing page lists current plans and volume prices.

FAQ

The answer depends on your jurisdiction, the site's terms and the data you collect. Public pages, no login, no personal data and a moderate request rate form a common baseline. This is not legal advice, so check your case with a lawyer.

How often should I refresh hotel rates?

A weekly market report needs daily snapshots, while revenue management near the stay date often needs several runs a day.

Do hotel prices fluctuate during the day?

Yes. To answer "do hotel prices fluctuate" within one day, note that rates and availability can change hourly. Compare snapshots from the same hour.

Do hotel prices go down closer to the date?

People often ask "do hotel prices go down closer to the date", and the answer varies by hotel and demand. Daily tracking of one hotel listing reveals the pattern for that property.

Start tracking public hotel rates

Get an API key with 1,000 free credits, no card required, and scrape hotel data from two countries with the script above.

Unlocker APIPass the CAPTCHA without a human in the loopAny page past any protection, as Markdown or structured JSON, in one request.
Start freeSee the Unlocker API pagefrom $0.029 per 1k requests · failed requests free
Carmine CellaFounder & CEO

About the author

Founder & CEO at Datafuel · 6+ years building proxy infrastructure. Owned networks, ethically sourced IPs, and scraping APIs for AI companies, e-commerce, and enterprises

Get started

Ready to build?

Start with the free tier and scale as your project grows. No credit card, no sales call.

Talk to an engineer, not a chatbot.