Google Hotels Scraper

io.github.RalfIJ由 GitHub 帳號 RalfIJ 發布v1.0.0更新於 Oct 28, 2026

Google Hotels prices for any city and dates: nightly and total price with taxes, ratings, amenities.

已驗證Streamable HTTP可網頁執行位置與生活網頁搜尋與抓取

概覽

AI 產生的概覽

遠端 Apify MCP 伺服器,讓助理依城市與日期查詢 Google Hotels 的房價、評分與設施資訊。

可以做什麼
  • 依城市與日期搜尋飯店,回傳每晚價格及含稅費的住宿總價
  • 讀取每間飯店的詳細資料:優惠提示、旅客評分、評論數、星級、住宿類型、設施、入住與退房時間
  • 取得飯店位置與連結:經緯度、官網、Google Hotels 與 Google Maps 連結,以及 Google 的飯店 ID
  • 比較多個城市或多個週末在相同日期的價格,找出較便宜的選擇
  • 透過固定日期或相對日期輸入,在多次執行中追蹤價格變化
適用情境
適合讓助理為旅行調查房價、比較不同城市或週末,或持續關注某次住宿的價格變化,且沒有 Google Hotels 官方 API 的情況。
執行需求
遠端 MCP 端點 mcp.apify.com,並啟用 Google Hotels 擷取工具。需要 Apify 帳號,可透過 OAuth 登入或使用 Authorization 標頭中的 Apify API 權杖驗證。執行費用計入該 Apify 帳號。
安裝前請注意
每次執行都會消耗 Apify 額度並計入你的帳號,反覆或排程搜尋會產生費用。Authorization 標頭帶有 Apify API 權杖,需妥善保密。資料來自擷取 Google 搜尋頁面,每次搜尋大致只涵蓋第一頁飯店,且價格隨市場不同而異。作者自行開發此擷取工具,與 Google 無關。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Google Hotels Scraper,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.RalfIJ%2Fgoogle-hotels/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "google-hotels-scraper": {
      "type": "http",
      "url": "https://mcp.apify.com/?tools=ralfij/google-hotels-scraper"
    }
  }
}

README

Google Hotels API for Python

Get hotel prices from Google Hotels into Python for any city and dates: the nightly price, the total for your stay with taxes and fees, Google's deal note ("23% less than usual"), guest rating, review count, star class, amenities and coordinates. Google Hotels compares booking sites and the hotels' own websites, so one search gives you the going rate.

Google has no public API for reading hotel prices. Its hotel APIs are for travel partners that send their prices to Google. These examples use a hosted scraper instead, the Google Hotels Scraper on Apify, through the official Python client.

[Median hotel price per night in 8 European cities]

Example output: the median price per night of the first 20 hotels Google shows in 8 cities, for 2 adults on the weekend of 13 to 15 November 2026. Made with examples/compare_cities.py.

Quick start

  1. Create a free Apify account. The free plan includes $5 of credit every month, which covers more than 1,000 hotel prices. No credit card needed.
  2. Copy your API token from Settings > API & Integrations in Apify Console.
  3. Run an example:
bash
pip install -r requirements.txtexport APIFY_TOKEN=your-token        # Windows: set APIFY_TOKEN=your-tokenpython examples/search_hotels.py
hotel                                      stars rating  a night, all-inThe Central House Lisbon Baixa                 2    4.3           53 EURLisbon Wine House - Rooms & Suites             3    3.7           68 EURNext Level Premium Hotels Lisbon               3    4.7           76 EURNovotel Lisboa                                 4      4           83 EUR...Saved 20 hotels to hotels.csv

Examples

FileWhat it does
examples/search_hotels.pyHotels for one city and date range, cheapest first, saved as CSV
examples/compare_cities.pyThe same dates in several cities, with the chart above
examples/cheapest_weekend.pyPrices for the next 8 weekends, to find the cheapest one
examples/price_tracker.pyRun it daily: keeps a price history and lists hotels that got at least 10% cheaper

sample-output/hotels-lisbon-2026-11-13.csv shows the CSV from search_hotels.py.

Finding the cheapest weekend

cheapest_weekend.py for Amsterdam, run on 10 October 2026:

Fri 16 Oct to Sun 18 Oct: median EUR 191, cheapest EUR 97 a nightFri 23 Oct to Sun 25 Oct: median EUR 302, cheapest EUR 28 a nightFri 30 Oct to Sun 01 Nov: median EUR 140, cheapest EUR 88 a nightFri 06 Nov to Sun 08 Nov: median EUR 177, cheapest EUR 104 a nightFri 13 Nov to Sun 15 Nov: median EUR 135, cheapest EUR 96 a nightFri 20 Nov to Sun 22 Nov: median EUR 133, cheapest EUR 89 a nightFri 27 Nov to Sun 29 Nov: median EUR 141, cheapest EUR 86 a nightFri 04 Dec to Sun 06 Dec: median EUR 132, cheapest EUR 78 a night
Cheapest weekend: 04 December (median EUR 132 a night, taxes included)

The weekend of 23 October costs more than twice as much as the cheapest one. That's the Amsterdam Dance Event, which runs from 21 to 25 October.

What you get per hotel

  • pricePerNight as Google shows it, and totalPrice for the whole stay with taxes and fees, plus totalPriceBeforeTaxes and taxesAndFees when Google shows the split
  • dealText, such as "23% less than usual"
  • rating, reviewCount, hotelClass (stars) and propertyType (hotel, hostel, vacation rental and so on)
  • amenities, description, checkInTime and checkOutTime
  • latitude, longitude, website, googleHotelsUrl and googleMapsUrl
  • hotelId, Google's id for the property, to match hotels across runs

Good to know

  • Taxes: Google shows US visitors nightly prices before taxes, and most other markets prices with taxes. For prices you can compare, use totalPrice / nights, as the examples do.
  • About 20 hotels per search: that's Google's first page. For more hotels in a city, add searches such as hotels in Amsterdam Jordaan or hotels near Amsterdam Centraal.
  • Relative dates: 30 days and 32 days keep scheduled runs pointing at the future. To track one stay over time, use fixed dates instead.
  • Market: the country input (Google's gl setting) decides which booking sites Google compares, and prices can differ between markets.
  • How it works: the scraper loads the same Google Hotels search page you see in a browser, without a browser, reads the hotel list from the data in the page, and retries from fresh residential IPs when Google blocks a request.

Other options

  • SerpApi has a Google Hotels endpoint, with a monthly subscription.
  • Booking sites' own APIs are usually only for partners and affiliates, and only cover their own prices.

Use it from AI assistants (MCP)

To let Claude, Cursor, VS Code or another MCP client look up hotel prices for you, add this MCP server URL: https://mcp.apify.com/?tools=ralfij/google-hotels-scraper. Sign in to Apify when the client asks, or send your Apify API token as Authorization: Bearer <token>. Runs are billed to your own Apify account.

Notes

  • I built the Google Hotels Scraper used in these examples, so keep that in mind.
  • Pricing is per hotel with no subscription; see the actor page.
  • It returns business data only. Guest reviews and reviewer names are left out on purpose.
  • Not affiliated with, endorsed by or sponsored by Google. Google Hotels is a trademark of Google LLC.

License

MIT

來源:README.md,提交 216646d

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

1
  1. v1.0.0最新Oct 10, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分