search_flights: Query flight prices.

View source: R/search_flights.R

search_flightsR Documentation

Query flight prices.

Description

Query flight prices using the Kiwi API.

Usage

search_flights(
  fly_from,
  fly_to = "anywhere",
  departure_from = NULL,
  departure_to = NULL,
  sort_by = "POPULARITY",
  price_range = NULL,
  passengers = NULL,
  cabin_class = NULL
)

Arguments

fly_from

a vector of IDs of the departure locations. E.g., 'c("City:cordoba_cd_ar", "City:mendoza_md_ar")'.

fly_to

a vector of IDs of the arrival destinations.

departure_from

search flights from this datetime. If 'NULL', anytime.

departure_to

search flights up to this datetime. If 'NULL', anytime.

sort_by

one of "POPULARITY", "PRICE", or "QUALITY".

price_range

a list with values 'min' and/or 'max', setting the price ranges.

passengers

If 'NULL', it will use the default: 'list(adults = 1, children = 0,' 'infants = 0, adultsHoldBags = 0, adultsHandBags = 0, childrenHoldBags = list(),' 'childrenHandBags = list())'.

cabin_class

If 'NULL', it will use the default: 'list(cabinClass = "ECONOMY",' 'applyMixedClasses = FALSE)'.


jcrodriguez1989/rflights documentation built on Nov. 21, 2024, 2:23 a.m.