
HasData Google Flights Deals
com.hasdata由 hasdata.com 發布官方發布者v1.0.0更新於 Oct 24, 2026
All HasData scraping tools in one MCP server: Google, TikTok, Instagram, maps, e-commerce and more.
發布方自己的服務:HasData Airbnb
概覽
HasData 託管的 MCP 伺服器,唯一工具能把一句旅行想法變成帶日期的 Google Flights 機票優惠,含票價、航空公司、轉機次數和訂票連結。
- 可以做什麼
- 用自由文字行程描述加上出發機場搜尋機票優惠,以結構化 JSON 回傳帶日期的票價、典型價格、時長、轉機次數、航空公司和訂票連結。
- 指定目的地後可啟用篩選:艙等、單程或來回、日期區間、行程天數、轉機次數、最長時長、最高價格以及航空公司包含或排除。
- 以資源形式讀取艙等、轉機、行程類型、國家、語言和貨幣等參數的固定值清單,不消耗額度。
- 檢視 Google 從查詢推斷出的出發機場、搜尋日期範圍和價格區間。
- 適用情境
- 適合還在猶豫去哪裡、什麼時候去,想先看到附價格的靈感方案,而不是為已定行程比價。也適合逐一比較出發機場或日期區間,每次呼叫一個出發地。
- 執行需求
- 需要 HasData API 金鑰:遠端端點透過 x-api-key 標頭提供,npm 或 PyPI 的 stdio 啟動器透過 HASDATA_API_KEY 環境變數提供。不需要 Google 帳號。需要能連線到託管端點的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 HasData Google Flights Deals,將其新增到工作區。
- 連接 x-api-key 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/com.hasdata%2Fgoogle-flights-deals/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"hasdata-google-flights-deals": {
"type": "http",
"url": "https://mcp.hasdata.com/mcp?apis=google_travel_flights_deals",
"headers": {
"x-api-key": "<YOUR_API_KEY>"
}
}
}
}README
Google Flights Deals MCP Server
A hosted Google Flights Deals MCP server that gives Claude, Cursor, Windsurf and any other MCP client one Google Flights Deals tool. Describe a trip in plain language, such as "cherry blossom in Japan" or "beach escape", and get dated fares from one origin airport with the typical price beside them, the airline, the stops and a booking link, as structured JSON.
1,000 free credits every month, no card required, which is about 66 searches.
https://mcp.hasdata.com/mcp?apis=google_travel_flights_deals
[Glama score] [tool contract] [MCP] [Tools]
Contents
- What you need
- Quick start
- Example prompts
- Tools
- Errors and failure paths
- Pricing, free tier and limits
- How it compares
- FAQ
- HasData links
- Development
- Contributing
- License
What you need
An MCP client and a HasData API key from the dashboard, free to create with no card, and the free tier covers about 66 calls a month at the 15-credit rate. This is a remote server, so the simplest path is a URL and an x-api-key header, with no container to run and no Google account anywhere in the flow. A client that only speaks stdio reaches it through a thin launcher, published as @hasdata/google-flights-deals-mcp on npm and hasdata-google-flights-deals-mcp on PyPI, shown below.
Quick start
The server URL is the same for every client. We run it hands-on in Claude Code and Claude Desktop. The other blocks follow each client's own documented format for a remote server.
| Field | Value |
|---|---|
| URL | https://mcp.hasdata.com/mcp?apis=google_travel_flights_deals |
| Transport | HTTP, streamable |
| Auth header | x-api-key: HASDATA_API_KEY |
Clients with OAuth support can add the same URL as a connector and sign in without putting a key in a config file.
Claude Code
claude mcp add --transport http google-flights-deals "https://mcp.hasdata.com/mcp?apis=google_travel_flights_deals" \
--header "x-api-key: HASDATA_API_KEY"
Claude Desktop
{
"mcpServers": {
"google-flights-deals": {
"type": "http",
"url": "https://mcp.hasdata.com/mcp?apis=google_travel_flights_deals",
"headers": { "x-api-key": "HASDATA_API_KEY" }
}
}
}
Cursor
{
"mcpServers": {
"google-flights-deals": {
"type": "streamable-http",
"url": "https://mcp.hasdata.com/mcp?apis=google_travel_flights_deals",
"headers": { "x-api-key": "HASDATA_API_KEY" }
}
}
}
VS Code
{
"servers": {
"google-flights-deals": {
"type": "http",
"url": "https://mcp.hasdata.com/mcp?apis=google_travel_flights_deals",
"headers": { "x-api-key": "HASDATA_API_KEY" }
}
}
}
Example prompts
Prompts, not code. Paste one in and the agent picks the tool itself. Each is annotated with the calls it takes, because every successful call costs 15 credits.
I want to see cherry blossom in Japan, flying from LAX. What are the cheapest dates?
One call, 15 credits. Google picks the destinations and the date range from the description.
Beach escape from London in February, nothing over 600 pounds, direct only.
One call, 15 credits. The price ceiling and the stops filter both need a destination pinned with arrivalId, so the agent has to name one or drop the filters.
Same trip but to Tokyo specifically, ten days, business class.
One call, 15 credits. With arrivalId set, the trip length and the cabin become available.
Compare the cherry blossom idea from LAX and from JFK.
Two calls, 30 credits. One origin per call.
Tools
| Tool | What it returns |
|---|---|
hasdata_google_travel_flights_deals_getGoogleFlightsDeals | Dated deals with the fare, the typical price for the route, flight duration, trip length, stops, the operating airline, the airports and a Google Flights booking link, plus the destinations and date range Google derived from the query. 15 credits a call |
One tool, 15 credits per successful call.
Find flight deals
hasdata_google_travel_flights_deals_getGoogleFlightsDeals
| Parameter | Type | Required | Notes |
|---|---|---|---|
q | string | yes | Free-text trip description, from a bare place name to a full sentence |
departureId | string | yes | Origin as a three-letter uppercase IATA code, for example LAX |
arrivalId | string | Pins the destination instead of letting Google choose. Every filter below needs it | |
type | string | roundTrip (default) or oneWay | |
travelClass | string | economy, premiumEconomy, business or first | |
outboundDate | string | An exact date, or a window as 2026-12-01,2026-12-10 | |
returnDate | string | Same spelling as outboundDate, and required alongside it | |
travelDuration | string | Preset length, week, weekend or twoWeeks | |
tripLength | string | Length in days, instead of returnDate or travelDuration | |
stops | string | nonStop, oneStopOrFewer or twoStopsOrFewer | |
maxDuration | number | Ceiling per flight in minutes | |
maxPrice | number | Ceiling in the currency of the request | |
includeAirlines / excludeAirlines | string | One or the other, never both |
The filters are the thing to get right. All of them require arrivalId. A prompt that asks for direct flights under a price cap while letting Google pick the destination is asking for two things that cannot be combined, and the API says so with a 422 naming the offending pair. Pin a destination or drop the filters.
searchInformation reports what Google made of the query: the departure airport in full with its city and coordinates, the dateRange it settled on, the priceRange it found and the airlines involved.
{
"searchInformation": {
"query": "cherry blossom in Japan",
"departure": { "airport": "LAX", "city": "Los Angeles", "country": "United States" },
"dateRange": { "from": "2027-03-01", "to": "2027-04-30" }
},
"flightDeals": [
{
"outboundDate": "2027-03-01",
"returnDate": "2027-03-08",
"price": { "value": 960, "currency": "USD" },
"typicalPrice": { "value": 1335, "currency": "USD" },
"discountPercent": 28,
"durationMinutes": 1320,
"tripLengthDays": 7,
"stops": 1,
"airlineCode": "CX",
"airline": "Cathay Pacific",
"multipleAirlines": false,
"departureAirport": "LAX",
"arrivalAirport": "HIJ",
"destination": { "city": "Hiroshima", "country": "Japan", "highlight": "Peace Park Memorial & Shukkei-en garden" },
"bookingLink": "https://www.google.com/travel/flights?tfs=…"
}
]
}
Prompts and resources
The server exposes 7 resources, one per parameter whose accepted values are a fixed list. Reading one is cheaper than learning the vocabulary from a rejected call, and it costs no credits. Each URI is hasdata://google_travel_flights_deals/<parameter>.
| Parameter | Values | What it selects |
|---|---|---|
type | 4 | Flight type. Requires arrivalId. - 1 / roundTrip — round trip (default) - 2 / oneWay — one way A one-way deal carries no returnDate and no tripLengthDays. |
travelClass | 8 | Travel class. Requires arrivalId. - 1 / economy — economy (default) - 2 / premiumEconomy — premium economy - 3 / business — business - 4 / first — first Fares climb steeply: on LAX-NRT the same search ran $730 in economy against $2882 in business. |
travelDuration | 6 | Preset trip length. Requires arrivalId. Cannot be combined with returnDate or tripLength. - 1 / week — about a week (6-8 days) - 2 / weekend — a weekend (2-3 days) - 3 / twoWeeks — about two weeks (13-15 days) Pairs with outboundDate to limit the departure period. Ignored when type is oneWay. |
stops | 6 | Maximum number of stops. Requires arrivalId. Omitted, any number is allowed. - 1 / nonStop — direct flights only - 2 / oneStopOrFewer — at most one connection - 3 / twoStopsOrFewer — at most two connections A route with nothing at that depth returns an empty flightDeals array, not an error — nonStop on a route without a direct flight is a valid, empty answer. |
gl | 245 | The two-letter country code for the country you want to limit the search to. |
hl | 159 | The two-letter language code for the language you want to use for the search. |
currency | 71 | Parameter defines the currency of the returned prices |
The list is served without an API key, so a client can read it before a user has signed up.
Errors and failure paths
Your client almost never sees an HTTP error code from a tool call. The MCP layer answers 200 and puts the failure inside the result, with isError set to true and the reason as text.
discountPercent is the exception, not the rule. Across 351 deals measured on 2026-10-05 it was present on 109 of them. Where it appears it matches the gap between price and typicalPrice to within a rounding step, and where it is absent that gap ran from 4% to 15%, so Google appears to publish the field only past a threshold of its own. typicalPrice was on every deal, so compute the comparison yourself rather than reporting "no discount" because the key is missing.
airline and airlineCode go missing together. In that same sample 269 deals named a carrier and 82 did not, and the split is exactly the multipleAirlines flag: every deal that set it to true omitted both fields, every deal that did not carried both. Read the flag before reporting a carrier, and say "several airlines" rather than leaving the field blank.
A filter without arrivalId is rejected before it runs. The API answers 422 with rule: "requiredIfExists" naming both arrivalId and the filter that triggered it, and nothing is billed. All eleven filters behave this way, so the failure is loud and cheap rather than silent.
Dates are what Google chose unless you pinned them. searchInformation.dateRange is the range it searched, which can be months away from today. Quote it when presenting prices, because a fare for next March is not a fare for next month.
Each successful call spends credits from the connected account. Neither a 422 from validation nor a 400 from upstream is billed, measured by reading the balance either side of a call.
Pricing, free tier and limits
The Google Flights Deals tool costs 15 credits per successful call, the same as the Google Flights API. The number of deals returned does not change the price.
The free tier is 1,000 credits every month with no card, which is about 66 searches.
Paid plans start at $59 a month for 200,000 credits, which is about 13,000 searches. The unit price falls on larger plans. Current numbers are on the plans page.
How it compares
| Google Flights API | This server | |
|---|---|---|
| Input | An origin, a destination and dates | A sentence, with the destination optional |
| Who picks the destination | You | Google, from the description |
| Who picks the dates | You | Google, unless you pin them |
| Best for | A trip someone has already decided on | A trip someone is still imagining |
The two sit next to each other rather than competing. Use this one to find where and when, then the Google Flights API to price the itinerary once the trip is decided.
FAQ
Do I need a Google account?
No. The only credential involved is your HasData key.
Why were my filters ignored?
They almost certainly went out without arrivalId. Every filter on this tool needs a pinned destination, and a request that omits it still succeeds.
Can I search from several origins at once?
No. departureId takes one airport, so comparing origins means one call each.
How far ahead does it search?
As far as Google decides from the query. Read searchInformation.dateRange rather than assuming the next few weeks.
Is HasData affiliated with Google?
No. HasData is an independent web data provider and is not affiliated with, endorsed by or sponsored by Google. All trademarks belong to their owners.
Compliance and personal data
The server reads the public Google Flights deals interface. It carries no passenger data and books nothing.
HasData links
| Product page and request builder | Google Flights API |
| Endpoint documentation | Google Flights Deals API docs |
| Server documentation | MCP server docs |
| Every tool in one server | HasData/hasdata-mcp |
| Client walkthroughs | MCP clients and integrations |
| Plans and credit costs | Plans and credit costs |
Development
npm install
npm test
The tests in test/ assert the tool contract, the part that can break without a commit here. They check that ?apis=google_travel_flights_deals returns the one expected tool, that its name and required parameters have not changed, that it carries a description, and that a real search still returns flightDeals with the documented fields.
Contributing
The parameter table and the sample above were read from the live schema and from a real call rather than from documentation. A correction is welcome when a field or a failure mode has changed. Open an issue with the response you saw.
License
MIT
來源:README.md,提交 e30c73e
工具
0版本歷史
1- v1.0.0最新Oct 5, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具必需15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Hasdata 整合

HasData Airbnb
com.hasdata官方發布者
HasData 的 Airbnb 託管伺服器,讓助理依地點或地圖區域搜尋房源,並以結構化 JSON 讀取完整房源詳情。

HasData ChatGPT
com.hasdata官方發布者
由 HasData 託管的 MCP 伺服器,提供一個 ChatGPT 工具,回傳匿名的 ChatGPT 回答(Markdown)及其參考網頁來源。

HasData Google Hotels
com.hasdata官方發布者
HasData 託管的 MCP 伺服器,只提供一個 Google Hotels 工具:依目的地和日期搜尋飯店與度假短租,或查看單一住宿的各通路價格。

HasData Zillow
com.hasdata官方發布者
由 HasData 託管的伺服器,讓助理以結構化 JSON 搜尋 Zillow 待售、出租與已售物件,並讀取完整房產詳情。

HasData YouTube
com.hasdata官方發布者
託管式 MCP 伺服器,讓助理搜尋 YouTube 並以 JSON 讀取公開的影片、頻道與字幕資料,無需 Google Cloud 專案。