
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@datafire/amadeus
Advanced tools
Client library for Flight Offers Search
npm install --save @datafire/amadeus
let amadeus = require('@datafire/amadeus').create();
.then(data => {
console.log(data);
});
Before using this API, we recommend you read our Authorization Guide for more information on how to generate an access token.
Please also be aware that our test environment is based on a subset of the production, if you are not returning any results try with big cities/airports like LON (London) or NYC (New-York).
Return list of Flight Offers based on searching criteria.
amadeus.getFlightOffers({
"originLocationCode": "",
"destinationLocationCode": "",
"departureDate": "",
"adults": 0
}, context)
object
string: city/airport IATA code from which the traveler will depart, e.g. BOS for Bostonstring: city/airport IATA code to which the traveler is going, e.g. PAR for Parisstring: the date on which the traveler will depart from the origin to go to the destination. Dates are specified in the ISO 8601 YYYY-MM-DD format, e.g. 2017-12-25string: the date on which the traveler will depart from the destination to return to the origin. If this parameter is not specified, only one-way itineraries are found. If this parameter is specified, only round-trip itineraries are found. Dates are specified in the ISO 8601 YYYY-MM-DD format, e.g. 2018-02-28integer: the number of adult travelers (age 12 or older on date of departure).integer: the number of child travelers (older than age 2 and younger than age 12 on date of departure) who will each have their own separate seat. If specified, this number should be greater than or equal to 0integer: the number of infant travelers (whose age is less or equal to 2 on date of departure). Infants travel on the lap of an adult traveler, and thus the number of infants must not exceed the number of adults. If specified, this number should be greater than or equal to 0string (values: ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST): most of the flight time should be spent in a cabin of this quality or higher. The accepted travel class is economy, premium economy, business or first class. If no travel class is specified, the search considers any travel classstring: This option ensures that the system will only consider these airlines. This can not be cumulated with parameter excludedAirlineCodes.string: This option ensures that the system will ignore these airlines. This can not be cumulated with parameter includedAirlineCodes.boolean: if set to true, the search will find only flights going from the origin to the destination with no stop in betweenstring: the preferred currency for the flight offers. Currency is specified in the ISO 4217 format, e.g. EUR for Eurointeger: maximum price per traveler. By default, no limit is applied. If specified, the value should be a positive number with no decimalsinteger: maximum number of flight offers to return. If specified, the value should be greater than or equal to 1object
array
array
Return list of Flight Offers based on posted searching criteria.
amadeus.searchFlightOffers({
"X-HTTP-Method-Override": "",
"body": null
}, context)
object
string: the HTTP method to applyobject
array
array
string (values: CHECKED_BAGS, MEALS, SEATS, OTHER_SERVICES): additional service typeobject
stringobject: information related to the aircraft
string: IATA aircraft code (http://www.flugzeuginfo.net/table_accodes_iata_en.php)object: baggageAllowance
integer: Total number of unitsinteger: Weight of the baggage allowancestring: Code to qualify unit as pounds or kilosobject
stringobject
integer: Weight of Co2 emitted for the concerned segmentstring: Code to qualify unit as pounds or kilosobject
integerarray
object
array
stringstringobject
integerobject
stringstringstringstringstringstringstring (values: MOST_SEGMENTS, AT_LEAST_ONE_SEGMENT, ALL_SEGMENTS): part of the trip covered by the travel class restriction (ALL_SEGMENTS if ommited)object
stringobject
string: Dates are specified in the ISO 8601 YYYY-MM-DD format, e.g. 2018-12-25string: Either 1, 2 or 3 extra days around the local date (IxD for +/- x days - Ex: I3D), Either 1 to 3 days after the local date (PxD for +x days - Ex: P3D), or 1 to 3 days before the local date (MxD for -x days - Ex: M3D)string: Local time. hh:mm:ss format, e.g 10:30:00string: 1 to 12 hours around (both +and -) the local time. Possibly limited by the number of extra days when specified, i.e. in some situations, it may not be used to exceed the maximum date range. [1-12]H format, e.g. 6Hobject
object
array
object
array
object: fare filter options
boolean: If true, returns the flight-offers with included checked bags onlyobject: price information
array
object
stringstring: Currency of the payment. It may be different than the requested currencystring: Total amount paid by the user (including fees and selected additional services).string: BOOK step ONLY - The price margin percentage (plus or minus) that the booking can tolerate. When set to 0, then no price magin is tolerated.string: Amount without taxesstringarray: List of applicable fees
string: The amount of taxes which are refundablearray
string: Total amount paid by the userobject: a fee
stringstring (values: TICKETING, FORM_OF_PAYMENT, SUPPLIER): type of feestring: IATA airline codesstring: terminal name / numberstring: local date and time in ISO8601 YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00object
boolean: BOOK step ONLY - If true, allows to book a PNR without pricing. Only for the source "GDS"string: Id of the flight offerboolean: If true, inform that a ticketing will be required at booking step.array
string: If booked on the same day as the search (with respect to timezone), this flight offer is guaranteed to be thereafter valid for ticketing until this date (included). Unspecified when it does not make sense for this flight offer (e.g. no control over ticketing once booked). YYYY-MM-DD format, e.g. 2019-06-07boolean: If true, upon completion of the booking, this pricing solution is expected to yield multiple records (a record contains booking information confirmed and stored, typically a Passenger Name Record (PNR), in the provider GDS or system)number: Number of seats bookable in a single request. Can not be higher than 9.boolean: If true, the flight offer fulfills only one originDestination and has to be combined with other oneWays to complete the whole journey.boolean: If true, a payment card is mandatory to book this flight offerobject
boolean: If true, returns the flight-offers with included checked bags onlyboolean: If true, returns the flight-offers with no penalty fares onlyboolean: If true, returns the flight-offers with no restriction fares onlyboolean: If true, returns the flight-offers with refundable fares onlyarray: Fare information for each traveler/segment
object
string: if type="HELD_INFANT", corresponds to the adult traveler's id who will share the seatarray
object: Fare details of the segment
objectobjectstring: The name of the Fare Family corresponding to the fares. Only for the GDS provider and if the airline has fare families filledstring: The code of the booking class, a.k.a. class of service or Reservations/Booking Designator (RBD)string: Fare basis specifying the rules of a fare. Usually, though not always, is composed of the booking class code followed by a set of letters and digits representing other characteristics of the ticket, such as refundability, minimum stay requirements, discounts or special promotional elements.boolean: True if the corresponding booking class is in an allotmentstring: Id of the segmentstring: Id of the travelerstring: the resource namearray: This option ensures that the system will only consider these airlines.
stringstring (values: GDS): source of the flight offerobject: defining a flight segment; including both operating and marketing details when applicable
string: providing the airline / carrier codestring: stop duration in ISO8601 PnYnMnDTnHnMnS format, e.g. PT2H10Mstring: the flight number as assigned by the carrierarray: information regarding the different stops composing the flight segment. E.g. technical stop, change of gauge...
string: stop duration in ISO8601 PnYnMnDTnHnMnS format, e.g. PT2H10Mstring: IATA airline codesstring: arrival at the stop in ISO8601 YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00string: departure from the stop in ISO8601 YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00object
string: The currency code, as defined in ISO 4217, to reflect the currency in which this amount is expressed.array: Origins and Destinations must be properly ordered in time (chronological order in accordance with the timezone of each location) to describe the journey consistently. Dates and times must not be past nor more than 365 days in the future, according to provider settings.Number of Origins and Destinations must not exceed the limit defined in provider settings.
array: Allows enable one or more sources. If present in the list, these sources will be called by the system.
array
object
integer: an application-specific error codestring: explanation of the errorobject: an object containing references to the source of the error
string: a string indicating an example of the right valuestring: a string indicating which URI query parameter caused the issuestring: a JSON Pointer [RFC6901] to the associated entity in the request documentinteger: the HTTP status code applicable to this errorstring: a short summary of the errorobject
stringobject
string: City code associated to the airportstring: Country code of the airportobject: information about the operating flight
string: providing the airline / carrier codeobject
array: Set of alternative destination location, such as a city or an airport. Currently, only the locations defined in IATA are supported.
stringarray: Set of alternative origin location, such as a city or an airport. Currently, only the locations defined in IATA are supported.
stringstring: Destination location, such as a city or an airport. Currently, only the locations defined in IATA are supported.number: Include other possible locations around the point, located less than this distance in kilometers away. Max:300array: List of excluded connections points. Any FlightOffer with these connections points will be present in response. Currently, only the locations defined in IATA are supported. Used only by the AMADEUS provider
stringstringarray: List of included connections points. When an includedViaPoints option is specified, all FlightOffer returned must at least go via this Connecting Point. Currently, only the locations defined in IATA are supported. Used only by the AMADEUS provider
stringstring: Origin location, such as a city or an airport. Currently, only the locations defined in IATA are supported.number: Include other possible locations around the point, located less than this distance in kilometers away. Max:300object: departure or arrival information
string: IATA airline codesstring: terminal name / numberobject: details of stops for direct or change of gauge flights
string: stop duration in ISO8601 PnYnMnDTnHnMnS format, e.g. PT2H10Mstring: IATA airline codesobject
array: type of fare of the flight-offer
string (values: PUBLISHED, NEGOTIATED, CORPORATE)object
boolean: This option allows activate the one-way combinable featureobject
boolean: If true, returns the fare family name for each flight-offer which supports fare familyboolean: If true, returns the price of the first additional bag when the airline is an "Amadeus Ancillary Services" member.boolean: This option allows to default to a standard fareOption if no offers are found for the selected fareOption.boolean: This option allows to exclude the isAllotment flag associated to a booking class in the search response when it exist.object
boolean: This flag enable/disable filtering of bus segmentarray: Restriction towards cabins.
object
array: The list of originDestination identifiers for which the cabinRestriction applies
stringobject: Restriction towards carriers.
boolean: This flag enable/disable filtering of blacklisted airline by EU. The list of the banned airlines is published in the Official Journal of the European Union, where they are included as annexes A and B to the Commission Regulation. The blacklist of an airline can concern all its flights or some specific aircraft types pertaining to the airlinearray: This option ensures that the system will only consider these airlines.
stringarray: This option ensures that the system will only consider these airlines.
stringobject: Restriction towards number of connections.
boolean: Allow to change airport during connectionnumber: The maximal number of connections for each itinerary. Value can be 0, 1 or 2.boolean: This option allows the single segment to have one or more intermediate stops (technical stops).boolean: Allows to search a location outside the borders when a radius around a location is specified. Default is false.number: This option allows to modify the value for the Elapsed Flying Time (EFT) masterPricer optionboolean: This flag enables/disables the possibility to have more overnight flights in Low Fare Searchboolean: This flag enable/disable filtering of rail segment (TGV AIR, RAIL ...)boolean: This option force to retrieve flight-offer with a departure and a return in the same airportnumber: Maximum number of flight offers returned (Max 250)integer: maximum price per traveler. By default, no limit is applied. If specified, the value should be a positive number with no decimalsboolean: Requests the system to find at least one flight-offer per day, if possible, when a range of dates is specified. Default is false.boolean: When the flight has a marketing or/and operating airline that is identified as blacklisted by the European Commission.array: Co2 informations
string: Id of the segmentinteger: Number of stopsstring: providing the airline / carrier codestring: stop duration in ISO8601 PnYnMnDTnHnMnS format, e.g. PT2H10Mstring: the flight number as assigned by the carrierarray: information regarding the different stops composing the flight segment. E.g. technical stop, change of gauge...
string (values: PRIORITY_BOARDING, AIRPORT_CHECKIN): type of servicestring (values: LOCAL_AVAILABILITY, SUB_OD_AVAILABILITY_1, SUB_OD_AVAILABILITY_2): slice and Dice indicator, such as Local Availability, Sub OnD(Origin and Destination) 1 Availability and Sub OnD 2 Availabilityobject: a tax
stringstringstring (values: ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST): quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first classobject
string: if type="HELD_INFANT", corresponds to the adult travelers's id who will share the seatstringstring (values: STANDARD, INCLUSIVE_TOUR, SPANISH_MELILLA_RESIDENT, SPANISH_CEUTA_RESIDENT, SPANISH_CANARY_RESIDENT, SPANISH_BALEARIC_RESIDENT, AIR_FRANCE_METROPOLITAN_DISCOUNT_PASS, AIR_FRANCE_DOM_DISCOUNT_PASS, AIR_FRANCE_COMBINED_DISCOUNT_PASS, AIR_FRANCE_FAMILY, ADULT_WITH_COMPANION, COMPANION): option specifying a group of fares, which may be valid under certain conditonsstring (values: ADULT, CHILD, SENIOR, YOUNG, HELD_INFANT, SEATED_INFANT, STUDENT): traveler typeFAQs
DataFire integration for Flight Offers Search
We found that @datafire/amadeus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.