Skip to content

最后更新

更新日志

FlightList API

正常只读

在任意日期范围内搜索低价单程航班:票价、航班时刻、航空公司和每个航段的航班号,另有机场和 IATA 代码查询。与 flightlist.io 的搜索功能相对应。 来源: www.flightlist.io.

基础 URL
https://api.maviapi.com/v1/sites/flightlist
4
端点
29 min ago
最近验证
99.0%
可用率 / 7 天
1050ms
p50 延迟
2
自动修复 / 累计
GET/search5 credits per call

搜索

在一段出发日期范围内搜索两个机场或城市之间的单程航班,返回总价、出发和到达时间(当地时间,带 UTC 偏移)、飞行时长、经停次数、航空公司、剩余座位数、预订链接以及每个航段及其航班号。城市代码涵盖该城市的所有机场。列表按所选排序方式返回该航线和日期的前 100 条行程(例如最便宜的 100 条)。

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
stringOptionalin query

origin IATA airport or city code, e.g. "LON" (a code shared by a city and its airport means the city)

stringOptionalin query

destination IATA airport or city code, e.g. "IST"

stringOptionalin query

earliest departure date, yyyy-mm-dd or dd/mm/yyyy (default: 7 days from today)

stringOptionalin query

latest departure date, yyyy-mm-dd or dd/mm/yyyy (default: date_from + 30 days)

stringOptionalin query

currency code for prices, e.g. "USD", "EUR"

integerOptionalin query

number of adult passengers (1-9); price is for all of them

stringOptionalin query

order of the list: price (cheapest first), duration (shortest first), quality (best balance of price and time), date (earliest departure first)

integerOptionalin query

most stopovers per itinerary (0 = direct only)

search_idstringe.g."91da5e9f64ae49068a4245c8b76c2eb4"
currencystringe.g."USD"
countintegere.g.100
flightsobject[]18 fields
idstringe.g."91da5e9f64ae49068a4245c8b76c2eb4_0"
pricenumbere.g.71
currencystringe.g."USD"
city_fromstringe.g."London"
city_tostringe.g."Istanbul"
airport_fromstringe.g."SEN"
airport_tostringe.g."SAW"
country_fromstringe.g."United Kingdom"
country_tostringe.g."Turkey"
departurestringe.g."2026-12-31T13:05:00+00:00"
arrivalstringe.g."2027-01-01T01:00:00+03:00"
duration_secondsintegere.g.32100
durationstringe.g."8h 55m"
stopsintegere.g.1
airlinesstring[]
seats_availablenull
booking_linkstringe.g."https://www.kiwi.com/en/booking/?direct=true&locale=en&currency=usd&passengers=1-0-0&token=HZTxdVuOcv9-C9KC_SKua_kikWYeyjjUIx7A5uRWjtq30X7EbJffc5X3VR5tNJp079z48gQww_uHKlR_RG7JOM20WUnZ5hw-yNtxEa4rRfIU8768-0Zrfg1MpA7bsotnZQ-5MJ_jrHzdf8OmPHPBsU4rI26kST5GjHq4Snm9UmIgkSD-8b0Hmy2DLmDANPtAlA4Fch57tE5XGK7iaCjTTd2wcuU5mvltV1n2YNQ2-Zue-4hwSPMVks___HnR9tEn2w8c1nunGpi-G2f1mKY_Bn4g1xM5DT5wnhR8RGU8ku7rlxVwLpFx4ylPen5w3m0YyuyyzCexes6r-lHjhRzMR9U1yAfCZ4wpq_oAHPCeT7aeem_P92Kj-S9A9r1angMjX2i21Ji_pqG-UKXniPYOp1Z3JnQxISi-4CjBcAw2FawbKKcVkhH4hPGw5HsyhZwn-DfQp_tZbEWWSnb-doBuJi0664tuJo4yfbvCWoEnMDxE3ZFV5ueMZc49vGNaUGYWeyRFQfJv_7B4qdapMwbyfNAdCZYHt5XE6s_tGlszaDJ0GkQVPShPBCkeSraTvdsOrgf3oASSbVK7OU2O88uXd6W7MDceOWQH5-ZJyDRWiHipeyhv_cR0XPht3SbRyGBiagyR_TKBpBXvhJLwD-35eZ_EINhAS_RcrRFVz2kFG4W5BrxP6xyZTX0hm6RqFTgtm4YHgonaXYtruhhAY5iX21TDe7gleSM0N8WEcu_M3vrg4cksBDS2o9pOWeeUz72kyZa_aGklHhn5w_4REVT42JYfr05ii8d9n5EREfb7qUEjBH9drhEwBMUtJrH9tl9gyIPQWQQyxGjakuWlHoF9ipfV2iwx0j8vXbOYCAeJ-Ut4ePh3lYYBROBS54D-htyymm4PCXUwkqInq3SwO2r4sEuairwyoPs4ixrbzUw4mStX5gDVofhIhe6DBAKd7RElTsEw0xN9fPKi4iLfX47CRv8UV_OFiUtkVLO7-kay6MhkqWS7PAn10l8dqBeOCiRooCAcf_Lk7iWkaTQWXybPlqkbTX399wMsZxaGniqzfzE33JSTlfF_GKdl-0uqrstNyaeBPNSUT-aFFcIjK4TTUZDqlPnnQ_sQlHyHSv-OXcUvytIt-wn4k5kVRKRajmaRbD_lzzEDdbQGQvfTx1iZrjPQATu55qujI5iUzF6N_Repu5V8nW531mpZ5oAla1ZhUHbHnQeqZKdMDRzJcTghg01l1Rt2uMI9Z54wKBUZ96m2vErL1rTtSiflzA4kLI9Kw&searchType=oneWay&searchBags=0.0"
segmentsobject[]10 fields
airlinestringe.g."U2"
flight_numberstringe.g."U25709"
operating_carrierstringe.g."U2"
airport_fromstringe.g."SEN"
airport_tostringe.g."AYT"
city_fromstringe.g."London"
city_tostringe.g."Antalya"
departurestringe.g."2026-12-31T13:05:00+00:00"
arrivalstringe.g."2026-12-31T20:10:00+03:00"
aircraftnull
paginationobject3 fields
countintegere.g.100
has_morebooleane.g.false
next_cursornull
fetched_atstringe.g."2026-11-27T21:09:08.239Z"
ageintegere.g.0
Try itLive
GET
https://api.maviapi.com/v1/sites/flightlist/search?fly_from=LON&fly_to=IST&curr=USD&adults=1&sort=price&max_stopovers=2
Request
curl "https://api.maviapi.com/v1/sites/flightlist/search?fly_from=LON&fly_to=IST&curr=USD&adults=1&sort=price&max_stopovers=2" \
-H "Authorization: Bearer $MAVI_KEY"
Example2.6 KB
{
  "search_id": "91da5e9f64ae49068a4245c8b76c2eb4",
  "currency": "USD",
  "count": 100,
  "flights": [
    {
      "id": "91da5e9f64ae49068a4245c8b76c2eb4_0",
      "price": 71,
      "currency": "USD",
      "city_from": "London",
      "city_to": "Istanbul",
      "airport_from": "SEN",
      "airport_to": "SAW",
      "country_from": "United Kingdom",
      "country_to": "Turkey",
      "departure": "2026-12-31T13:05:00+00:00",
      "arrival": "2027-01-01T01:00:00+03:00",
      "duration_seconds": 32100,
      "duration": "8h 55m",
      "stops": 1,
      "airlines": [
        "U2"
      ],
      "seats_available": null,
      "booking_link": "https://www.kiwi.com/en/booking/?direct=true&locale=en&currency=usd&passengers=1-0-0&token=HZTxdVuOcv9-C9KC_SKua_kikWYeyjjUIx7A5uRWjtq30X7EbJffc5X3VR5tNJp079z48gQww_uHKlR_RG7JOM20WUnZ5hw-yNtxEa4rRfIU8768-0Zrfg1MpA7bsotnZQ-5MJ_jrHzdf8OmPHPBsU4rI26kST5GjHq4Snm9UmIgkSD-8b0Hmy2DLmDANPtAlA4Fch57tE5XGK7iaCjTTd2wcuU5mvltV1n2YNQ2-Zue-4hwSPMVks___HnR9tEn2w8c1nunGpi-G2f1mKY_Bn4g1xM5DT5wnhR8RGU8ku7rlxVwLpFx4ylPen5w3m0YyuyyzCexes6r-lHjhRzMR9U1yAfCZ4wpq_oAHPCeT7aeem_P92Kj-S9A9r1angMjX2i21Ji_pqG-UKXniPYOp1Z3JnQxISi-4CjBcAw2FawbKKcVkhH4hPGw5HsyhZwn-DfQp_tZbEWWSnb-doBuJi0664tuJo4yfbvCWoEnMDxE3ZFV5ueMZc49vGNaUGYWeyRFQfJv_7B4qdapMwbyfNAdCZYHt5XE6s_tGlszaDJ0GkQVPShPBCkeSraTvdsOrgf3oASSbVK7OU2O88uXd6W7MDceOWQH5-ZJyDRWiHipeyhv_cR0XPht3SbRyGBiagyR_TKBpBXvhJLwD-35eZ_EINhAS_RcrRFVz2kFG4W5BrxP6xyZTX0hm6RqFTgtm4YHgonaXYtruhhAY5iX21TDe7gleSM0N8WEcu_M3vrg4cksBDS2o9pOWeeUz72kyZa_aGklHhn5w_4REVT42JYfr05ii8d9n5EREfb7qUEjBH9drhEwBMUtJrH9tl9gyIPQWQQyxGjakuWlHoF9ipfV2iwx0j8vXbOYCAeJ-Ut4ePh3lYYBROBS54D-htyymm4PCXUwkqInq3SwO2r4sEuairwyoPs4ixrbzUw4mStX5gDVofhIhe6DBAKd7RElTsEw0xN9fPKi4iLfX47CRv8UV_OFiUtkVLO7-kay6MhkqWS7PAn10l8dqBeOCiRooCAcf_Lk7iWkaTQWXybPlqkbTX399wMsZxaGniqzfzE33JSTlfF_GKdl-0uqrstNyaeBPNSUT-aFFcIjK4TTUZDqlPnnQ_sQlHyHSv-OXcUvytIt-wn4k5kVRKRajmaRbD_lzzEDdbQGQvfTx1iZrjPQATu55qujI5iUzF6N_Repu5V8nW531mpZ5oAla1ZhUHbHnQeqZKdMDRzJcTghg01l1Rt2uMI9Z54wKBUZ96m2vErL1rTtSiflzA4kLI9Kw&searchType=oneWay&searchBags=0.0",
      "segments": [
        {
          "airline": "U2",
          "flight_number": "U25709",
          "operating_carrier": "U2",
          "airport_from": "SEN",
          "airport_to": "AYT",
          "city_from": "London",
          "city_to": "Antalya",
          "departure": "2026-12-31T13:05:00+00:00",
          "arrival": "2026-12-31T20:10:00+03:00",
          "aircraft": null
        }
      ]
    }
  ],
  "pagination": {
    "count": 100,
    "has_more": false,
    "next_cursor": null
  },
  "fetched_at": "2026-11-27T21:09:08.239Z",
  "age": 0
}

Get all the data, no code

Collect every page of GET /search into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.

Use FlightList API from Claude, ChatGPT and your coding tools

Add this URL as a custom connector and sign in to maviapi. Nothing to install.

How to connect
https://mcp.maviapi.com/mcp

Or run it locally, with each endpoint of FlightList API as its own tool:

claude mcp add maviapi -e MAVIAPI_TOOLS=flightlist -- npx -y '@maviapi/mcp'

Import FlightList API into Postman and other tools

How to import

Paste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.

  • OpenAPI 3.1
    https://api.maviapi.com/v1/apis/flightlist/openapi.json
  • Postman
    https://api.maviapi.com/v1/apis/flightlist/postman.json

The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.

使用 FlightList API 进行开发

FlightList 专门回答一个问题:这条航线在这段时间内最便宜的单程航班是哪一班?/search 接收两个机场或城市以及一个日期范围,把这些天的行程放在一个列表中返回,默认从最便宜的开始排序,包含价格、经停次数、总时长、每个航段的航班号和实际承运的航空公司,以及预订链接。/airports 把名称转换成搜索用的代码。

可以用它做什么

哪天飞最便宜
用 date_from 和 date_to 逐天搜索,保留每天的第一个价格,做成价格日历。
票价提醒
每隔几小时查询同一条航线,当按价格排序的第一条结果低于设定值时发出通知。
给助手用的低价航线
让智能体用 /airports 解析“Berlin”,再搜索,并给出航班号和预订链接。

调用前须知

  • 航班均为单程。往返行程请分别搜索两个方向。
  • 不传日期时,搜索从 7 天后开始,覆盖 30 天。
  • 一次搜索最多包含 100 个行程:缩小日期范围可以看到更多。
  • departure 和 arrival 是各机场的当地时间:实际飞行时间见 duration。
  • 数据源未提供时,seats_available 和 aircraft 为 null。

选择一个端点开始

  • 搜索 GET /search

    在一段出发日期范围内搜索两个机场或城市之间的单程航班,返回总价、出发和到达时间(当地时间,带 UTC 偏移)、飞行时长、经停次数、航空公司、剩余座位数、预订链接以及每个航段及其航班号。城市代码涵盖该城市的所有机场。列表按所选排序方式返回该航线和日期的前 100 条行程(例如最便宜的 100 条)。

    GET /search 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    fly_fromstring / query否origin IATA airport or city code, e.g. "LON" (a code shared by a city and its airport means the city)
    fly_tostring / query否destination IATA airport or city code, e.g. "IST"
    date_fromstring / query否earliest departure date, yyyy-mm-dd or dd/mm/yyyy (default: 7 days from today)
    date_tostring / query否latest departure date, yyyy-mm-dd or dd/mm/yyyy (default: date_from + 30 days)
    currstring / query否currency code for prices, e.g. "USD", "EUR"
    adultsinteger / query否number of adult passengers (1-9); price is for all of them
    sortstring / query否order of the list: price (cheapest first), duration (shortest first), quality (best balance of price and time), date (earliest departure first) 可选值: price, duration, quality, date.
    max_stopoversinteger / query否most stopovers per itinerary (0 = direct only)
    响应字段
    字段类型说明
    search_idstring
    currencystring
    countinteger
    flightsobject[]
    flights[].idstring
    flights[].pricenumber
    flights[].currencystring
    flights[].city_fromstring
    flights[].city_tostring
    flights[].airport_fromstring
    flights[].airport_tostring
    flights[].country_fromstring
    flights[].country_tostring
    flights[].departurestring
    flights[].arrivalstring
    flights[].duration_secondsinteger
    flights[].durationstring
    flights[].stopsinteger
    flights[].airlinesstring[]
    flights[].seats_availablenull
    flights[].booking_linkstring
    flights[].segmentsobject[]
    flights[].segments[].airlinestring
    flights[].segments[].flight_numberstring
    flights[].segments[].operating_carrierstring
    flights[].segments[].airport_fromstring
    flights[].segments[].airport_tostring
    flights[].segments[].city_fromstring
    flights[].segments[].city_tostring
    flights[].segments[].departurestring
    flights[].segments[].arrivalstring
    flights[].segments[].aircraftnull
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursornull
    fetched_atstring
    ageinteger
  • 机场 GET /airports

    按搜索词匹配机场名称或所在城市,返回机场的 IATA 和 ICAO 代码、城市及城市代码、国家、地区、大洲、时区和坐标。

    GET /airports 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    qstring / query否airport or city name to search, e.g. "istanbul"
    响应字段
    字段类型说明
    countinteger
    locationsobject[]
    locations[].codestring
    locations[].icaostring
    locations[].namestring
    locations[].typestring
    locations[].citystring
    locations[].city_codestring
    locations[].countrystring
    locations[].country_codestring
    locations[].regionstring
    locations[].continentstring
    locations[].timezonestring
    locations[].latnumber
    locations[].lonnumber
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursornull
    fetched_atstring
    ageinteger
  • 搜索 V2 GET /search-v2

    在一段日期范围内搜索航班行程,支持单程或往返,可指定目的地或不限目的地,并按给定乘客数和行李计价。每条行程包含总价(及每位乘客的分摊价格)、出发地和目的地的机场/城市/国家、出发和到达时间(当地时间,带 UTC 偏移)、返程时间、在目的地停留的晚数、飞行时长、经停次数、航空公司、剩余座位数、一件托运行李的价格(`bags_price` 中键为 "1" 的值)、预订链接以及每个航段(方向、航班号、承运航司、机场、时间)。列表包含找到的全部行程,每个出发日最多 50 条;可通过日期、经停、价格、舱位、航空公司或 one_per_city 缩小范围。

    GET /search-v2 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    fly_fromstring / query否origin: IATA airport or city code, ISO country code, or an id from /airports-v2; comma list allowed; "city:LON" / "airport:IST" force the type (a bare 3-letter code means the airport when one has it, else the city)
    fly_tostring / query否destination in the same forms; leave out or send "anywhere" to search every destination
    date_fromstring / query否earliest departure date, yyyy-mm-dd or dd/mm/yyyy (default: 7 days from today; a past date rolls forward to today)
    date_tostring / query否latest departure date (default: date_from + 30 days)
    return_fromstring / query否earliest return date; any return input (return_from, return_to, nights_from, nights_to) makes it a return trip
    return_tostring / query否latest return date (default: return_from)
    nights_frominteger / query否return trip: fewest nights at the destination (0-60)
    nights_tointeger / query否return trip: most nights at the destination (up to 60)
    adultsinteger / query否adult passengers (1-9)
    childreninteger / query否child passengers (0-8)
    infantsinteger / query否infants on lap (at most one per adult)
    hold_bagsinteger / query否checked bags for the whole group (at most 2 per adult or child)
    hand_bagsinteger / query否cabin bags for the whole group (at most 1 per adult or child)
    cabinstring / query否cabin class: M economy (default), W premium economy, C business, F first 可选值: M, W, C, F.
    max_stopoversinteger / query否most stops per direction (0 = direct only) 可选值: 0, 1, 2, 3, 4.
    sortstring / query否order of the list: price (cheapest first), quality (the source's ranking), duration (shortest first), date (earliest departure first) 可选值: price, quality, duration, date.
    currstring / query否currency code for prices, e.g. "USD", "EUR"
    price_tointeger / query否maximum total price
    max_fly_durationinteger / query否maximum flight time per direction, in hours (1-60)
    select_airlinesstring / query否only itineraries flown entirely by these airlines, comma-separated 2-character codes, e.g. "TK,PC"
    one_per_cityboolean / query否keep only the cheapest itinerary per destination city
    响应字段
    字段类型说明
    search_idstring
    currencystring
    queryobject
    query.fly_fromstring
    query.fly_tonull
    query.anywhereboolean
    query.tripstring
    query.date_fromstring
    query.date_tostring
    query.return_fromnull
    query.return_tonull
    query.nights_fromnull
    query.nights_tonull
    query.passengersobject
    query.passengers.adultsinteger
    query.passengers.childreninteger
    query.passengers.infantsinteger
    totalinteger
    destinationsinteger
    countinteger
    flightsobject[]
    flights[].idstring
    flights[].pricenumber
    flights[].currencystring
    flights[].fareobject
    flights[].fare.adultsnumber
    flights[].fare.childreninteger
    flights[].fare.infantsinteger
    flights[].city_fromstring
    flights[].city_code_fromstring
    flights[].city_tostring
    flights[].city_code_tostring
    flights[].airport_fromstring
    flights[].airport_tostring
    flights[].country_fromstring
    flights[].country_code_fromstring
    flights[].country_tostring
    flights[].country_code_tostring
    flights[].departurestring
    flights[].arrivalstring
    flights[].return_departurenull
    flights[].return_arrivalnull
    flights[].nights_in_destnull
    flights[].duration_secondsinteger
    flights[].durationstring
    flights[].return_duration_secondsnull
    flights[].stopsinteger
    flights[].return_stopsnull
    flights[].airlinesstring[]
    flights[].seats_availablenull
    flights[].bags_priceobject
    flights[].bags_price.1number
    flights[].booking_linkstring
    flights[].segmentsobject[]
    flights[].segments[].directionstring
    flights[].segments[].airlinestring
    flights[].segments[].flight_numberstring
    flights[].segments[].operating_carrierstring
    flights[].segments[].airport_fromstring
    flights[].segments[].airport_tostring
    flights[].segments[].city_fromstring
    flights[].segments[].city_tostring
    flights[].segments[].departurestring
    flights[].segments[].arrivalstring
    flights[].segments[].aircraftnull
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursornull
    fetched_atstring
    ageinteger
  • 机场 V2 GET /airports-v2

    按名称或代码匹配航班搜索支持的所有地点(机场、城市、州、国家、地区、大洲、旅游区、车站等),按来源的相关度排序返回。每个地点都有 `id` 和 `code`,可在 /search-v2 中用作 fly_from/fly_to,另含城市、国家、地区、大洲、时区、坐标、热门度排名,以及名称是否确实包含搜索词(`matches_term`;来源推荐的相关地点为 false)。

    GET /airports-v2 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    qstring / query否place name or code to look up, e.g. "london"
    typesstring / query否only these place types, comma list of airport, city, subdivision, country, region, continent, autonomous_territory, tourist_region, special, station, bus_station (default: every type)
    localestring / query否language for place names 可选值: en-US, de-DE, fr-FR, es-ES, it-IT, tr-TR, pt-PT, nl-NL, pl-PL, ru-RU.
    响应字段
    字段类型说明
    queryobject
    query.qstring
    query.typesstring[]
    totalinteger
    countinteger
    locationsobject[]
    locations[].idstring
    locations[].codestring
    locations[].icaonull
    locations[].namestring
    locations[].typestring
    locations[].citynull
    locations[].city_codenull
    locations[].countrystring
    locations[].country_codestring
    locations[].regionstring
    locations[].continentstring
    locations[].timezonestring
    locations[].latnumber
    locations[].lonnumber
    locations[].rankinteger
    locations[].matches_termboolean
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursornull
    fetched_atstring
    ageinteger

将 FlightList 数据导出为 CSV

下面的每个列表都可以下载为 CSV 文件,每条记录一行。用上方控制台下面的 "Get all the data, no code" 卡片把列表收集到数据集中。数据集会逐页读取列表,之后可下载为 CSV、JSON 或 JSONL。

列表CSV 列
搜索GET /searchid, price, currency, city_from, city_to, airport_from, airport_to, country_from, country_to, departure, arrival, duration_seconds, duration, stops, airlines, seats_available, booking_link, segments
机场GET /airportscode, icao, name, type, city, city_code, country, country_code, region, continent, timezone, lat, lon
搜索 V2GET /search-v2id, price, currency, fare, city_from, city_code_from, city_to, city_code_to, airport_from, airport_to, country_from, country_code_from, country_to, country_code_to, departure, arrival, return_departure, return_arrival, nights_in_dest, duration_seconds, duration, return_duration_seconds, stops, return_stops, airlines, seats_available, bags_price, booking_link, segments
机场 V2GET /airports-v2id, code, icao, name, type, city, city_code, country, country_code, region, continent, timezone, lat, lon, rank, matches_term

嵌套的值(列表或对象)以 JSON 写入同一个单元格。 数据集和导出如何工作

FlightList API 常见问题

能获取什么数据、费用多少、如何调用。

FlightList 有官方 API 吗?

这个 FlightList API 不是官方 API。它是 maviapi 针对 flightlist.io 上的公开数据提供的独立托管 API,并非由 FlightList 开发、认可或支持。FlightList 是否提供自己的开发者 API,请向 FlightList 咨询。这个 API 用一个 maviapi 密钥即可调用,它的每个端点和返回的每个字段都在本页有文档说明。

FlightList API 可以获取哪些数据?

FlightList API 有 4 个端点。每个端点都返回 JSON,参数和字段见上方的文档:

  • GET /search: 在一段出发日期范围内搜索两个机场或城市之间的单程航班,返回总价、出发和到达时间(当地时间,带 UTC 偏移)、飞行时长、经停次数、航空公司、剩余座位数、预订链接以及每个航段及其航班号。
  • GET /airports: 按搜索词匹配机场名称或所在城市,返回机场的 IATA 和 ICAO 代码、城市及城市代码、国家、地区、大洲、时区和坐标。
  • GET /search-v2: 在一段日期范围内搜索航班行程,支持单程或往返,可指定目的地或不限目的地,并按给定乘客数和行李计价。
  • GET /airports-v2: 按名称或代码匹配航班搜索支持的所有地点(机场、城市、州、国家、地区、大洲、旅游区、车站等),按来源的相关度排序返回。

FlightList API 的价格是多少?

调用用您 maviapi 套餐中的积分支付,只有成功的调用才会计费。此 API 的每个端点每次调用消耗 5 个积分。在 Hobby 套餐下(每月 $49,含 250,000 个积分),1,000 次调用约 $0.98。失败的调用不收费。Free 套餐每月提供 1,000 个积分,无需信用卡。超出部分请查看套餐和积分价格。

如何调用 FlightList API?

向端点发送 HTTPS 请求,并在 Authorization 请求头中带上您的 API 密钥。例如 GET /search:

cURL
curl 'https://api.maviapi.com/v1/sites/flightlist/search' \
  -H "Authorization: Bearer $MAVI_KEY"

在您的 API 密钥页面创建密钥,或者先在上方的控制台中用免费测试密钥试用任意端点。

以 JSON 获取 FlightList 数据有哪些方式?

以 JSON 获取 FlightList 数据的每种方式适合不同的需求:

  • 自己写爬虫: 完全由自己掌控,不依赖任何服务商,但解析、被拦截的请求以及 flightlist.io 每次改版后的修复都要自己负责。更适合从很少变化的页面一次性获取数据。
  • Apify: 一个 Actor 市场,Actor 由您自己运行,输入、输出和价格由各个 Actor 决定。当已有 Actor 能返回您需要的数据,或者您想托管自己的代码时更合适。参见maviapi 与 Apify 的对比。
  • RapidAPI: 一个汇集了众多提供方 API 的平台,用一个 RapidAPI 密钥调用,每个 API 单独定价。当您已经在使用该平台,并且其中某个 API 能满足需求时更合适。来源:RapidAPI docs。
  • maviapi: 本页的 FlightList API:4 个带文档的端点、公开的响应结构,以及一个可用于整个目录的密钥。当这些数据是您产品的一部分,而您不想维护爬虫时更合适。

flightlist.io 改版后会怎样?

您的代码不需要改动。flightlist.io 修改页面时,maviapi 会让 FlightList API 保持可用,您继续调用同样的端点,并得到本页文档所述结构的 JSON。它当前的运行状况见状态页,变更记录见它的更新日志。

更新会破坏我的 FlightList API 集成吗?

不会。您正在使用的端点,其结构永远不会改变:新的字段、可选参数和端点只会加在旁边,会破坏调用的变更则作为新端点发布。请忽略您不认识的响应字段,新内容请关注更新日志。

  • Tripadvisor API

    来自 Tripadvisor 的行程规划数据:支持地点搜索,并可按地点(geo_id)获取景点、餐厅和酒店,包含评分、评论、价格和坐标。先用 /search 解析地名,再通过…

  • Kiwi.com API

    搜索并比较 Kiwi.com 上的航班:返回带实时价格、航空公司、航线和起降时间的行程,还可查询地点和航线。

  • GetYourGuide API

    GetYourGuide 的游览和活动列表:价格、评分、可订日期和目的地,另有单个活动的详情,并可通过站点地图批量发现活动。

  • Booking.com API

    按地点和入住日期搜索 Booking.com 的住宿,查看住宿详情、价格和住客评分。

  • Airbnb API

    按地点和日期搜索 Airbnb 短租房源,并获取房源详情:数据取自 Airbnb 服务端渲染的搜索页和房源页,以结构清晰的 JSON 返回。

  • Trainline API

    Trainline(thetrainline.com)上任意两个车站之间的火车票价和发车时间。