SuperAPI AI 工具集

rapidapi

编程与开发

查看项目

更新于 10-15 17:29

技能介绍

用途:该技能通过 RapidAPI 上的两个抓取接口获取实时数据——Google Flights Live API 用于实时抓取 Google Flights 机票价格,Booking.com Live API 用于查询酒店与度假短租的实时价格和可订状态。定位为次要数据源:机票以 SerpAPI 与 Seats.aero 为主,酒店以 LiteAPI/SerpAPI 为主;当 SerpAPI 结果疑似过期、需要第二个价格参考,或需要 Booking.com 特有库存时使用。

认证:RAPIDAPI_KEY 在 .env 中设置,所有请求使用 x-rapidapi-key 请求头。

主要能力与用法:Google Flights Live 支持单程与往返搜索,接口为 POST https://google-flights-live-api.p.rapidapi.com/api/v1/searchFlights,必填参数 origin、destination(IATA 机场代码)与 date(YYYY-MM-DD),可选 returnDate、adults(默认 1)、children、infants、cabinClass(economy、premium_economy、business、first)、currency(默认 USD)。Booking.com Live 支持搜索酒店与获取酒店详情:搜索接口 GET https://booking-live-api.p.rapidapi.com/api/v1/searchHotels,必填 location、checkin、checkout,可选 adults(默认 2)、children、rooms(默认 1)、currency、sortBy(price、rating、popularity)、minPrice、maxPrice、starRating(3,4,5 逗号分隔);详情接口 GET https://booking-live-api.p.rapidapi.com/api/v1/getHotelDetails,需 hotelId、checkin、checkout、adults。

限制:免费额度为所有 RapidAPI 接口合计每月 100 次请求,需节约使用、精准查询,避免用宽泛搜索耗尽额度;不应作为主要搜索来源。