SkyScanner RapidAPI 不提供回程航班
Posted
技术标签:
【中文标题】SkyScanner RapidAPI 不提供回程航班【英文标题】:SkyScanner RapidAPI not providing return flight 【发布时间】:2019-11-29 15:43:00 【问题描述】:对于个人项目,我正在尝试通过 RapidAPI 在 GO 中使用 Sky Scanner API。这是我用来执行 API 请求的 URL:
https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/browsequotes/v1.0/UK/GBP/en-US/SFO-sky/JFK-sky/2019-12-01?inboundpartialdate=2019-12-10
问题是,我只收到以下回复:
"Quotes":["QuoteId":1,"MinPrice":403.0,"Direct":true,"OutboundLeg":"CarrierIds":[851],"OriginId":81727,"DestinationId":60987,"DepartureDate":"2019-12-01T00:00:00","QuoteDateTime":"2019-11-29T14:24:00"],"Places":["PlaceId":60987,"IataCode":"JFK","Name":"New York John F. Kennedy","Type":"Station","SkyscannerCode":"JFK","CityName":"New York","CityId":"NYCA","CountryName":"United States","PlaceId":81727,"IataCode":"SFO","Name":"San Francisco International","Type":"Station","SkyscannerCode":"SFO","CityName":"San Francisco","CityId":"SFOA","CountryName":"United States"],"Carriers":["CarrierId":851,"Name":"Alaska Airlines","CarrierId":870,"Name":"jetBlue","CarrierId":1065,"Name":"Frontier Airlines","CarrierId":1721,"Name":"Sun Country Airlines"],"Currencies":["Code":"GBP","Symbol":"£","ThousandsSeparator":",","DecimalSeparator":".","SymbolOnLeft":true,"SpaceBetweenAmountAndSymbol":false,"RoundingCoefficient":0,"DecimalDigits":2]
据我所知,这不包含回程航班。
我想知道是否有人有使用此的经验/知道我哪里出错了。
谢谢!
【问题讨论】:
【参考方案1】:您需要使用 RapidApi 的 Browse Quotes Inbound 端点。
【讨论】:
感谢您的回复。我在这里仍然有问题。与 Skyscanner 网站相比,API 似乎没有返回最便宜的航班,例如:skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/… 上面说最便宜的航班是 357 英镑,而网站上说的是 125 英镑【参考方案2】:我稍微测试了这个 API。您必须使用GET Browse Quotes Inbound 来检索最便宜的航班。响应中的 Quotes
键包含两个数组,这些数组中的值已经根据我相信的价格排序。这意味着数组中的第一个值是最便宜的航班。
尝试使用更多端点。你肯定会得到想要的结果。此外,此 API 完全免费,对调用没有硬性限制,因此不会成为问题。
【讨论】:
以上是关于SkyScanner RapidAPI 不提供回程航班的主要内容,如果未能解决你的问题,请参考以下文章