swagger: '2.0'
info:
version: 2.9.1
title: Flight Offers Search
x-tags:
- '#online-retail'
- '#mobile-services'
- '#ama-for-dev'
x-status: validated
x-release-note:
2.9.0:
- Add lastTicketingDateTime attribute in the Flight-Offer
2.8.0:
- Add Non-stop preferred option
2.7.0:
- Add new source "NDC" - **only available in Enterprise**
2.6.0:
- Add Margins and Discounts content from Margin Manager product - **only available in Enterprise**
2.5.0:
- Add Expanded parameters criterias in flight-offers search
2.4.0:
- Add new sources "LTC" and "EAC" - **only available in Enterprise**
2.3.0:
- Add Farerules into POST Search flight-offer reply
2.2.0:
- Add maxPrice filtering
2.1.0:
- Add currencies, aircraft and carriers dictionary
2.0.0:
- Initial Version
- Includes search and price flight offer
description: |2-
Before using this API, we recommend you read our **[Authorization Guide](https://developers.amadeus.com/self-service/apis-docs/guides/authorization-262)** 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).
host: test.api.amadeus.com
basePath: /v2
schemes:
- https
consumes:
- application/vnd.amadeus+json
produces:
- application/vnd.amadeus+json
paths:
/shopping/flight-offers:
post:
tags:
- Shopping
operationId: searchFlightOffers
summary: Amadeus Return List of Flight Offers Based on Posted Searching Criteria.
parameters:
- $ref: '#/parameters/getOverride'
- name: getFlightOffersBody
description: list of criteria to retrieve a list of flight offers
in: body
required: true
schema:
$ref: '#/definitions/GetFlightOffersQuery'
responses:
'200':
$ref: '#/responses/returnAirOffers'
'400':
$ref: '#/responses/400_Search'
default:
$ref: '#/responses/500'
description: ''
get:
tags:
- Shopping
operationId: getFlightOffers
summary: Amadeus Return List of Flight Offers Based on Searching Criteria.
parameters:
- name: originLocationCode
in: query
description: city/airport [IATA code](http://www.iata.org/publications/Pages/code-search.aspx) from which the traveler will depart, e.g. BOS for Boston
required: true
type: string
pattern: '[A-Z]{3}'
x-example: SYD
- name: destinationLocationCode
in: query
description: city/airport [IATA code](http://www.iata.org/publications/Pages/code-search.aspx) to which the traveler is going, e.g. PAR for Paris
required: true
type: string
pattern: '[A-Z]{3}'
x-example: BKK
- name: departureDate
in: query
description: the date on which the traveler will depart from the origin to go to the destination. Dates are specified in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD
format, e.g. 2017-12-25
required: true
type: string
format: date
x-example: '2023-05-02'
- name: returnDate
in: query
description: 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](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2018-02-28
required: false
type: string
format: date
- name: adults
in: query
description: |-
the number of adult travelers (age 12 or older on date of departure).
The total number of seated travelers (adult and children) can not exceed 9.
required: true
type: integer
minimum: 1
maximum: 9
default: 1
- name: children
in: query
description: |-
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 0
The total number of seated travelers (adult and children) can not exceed 9.
required: false
type: integer
minimum: 0
maximum: 9
- name: infants
in: query
description: 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 0
required: false
type: integer
minimum: 0
maximum: 9
- name: travelClass
in: query
description: 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 class
required: false
type: string
enum:
- ECONOMY
- PREMIUM_ECONOMY
- BUSINESS
- FIRST
- name: includedAirlineCodes
in: query
description: |
This option ensures that the system will only consider these airlines. This can not be cumulated with parameter excludedAirlineCodes.
Airlines are specified as [IATA airline codes](http://www.iata.org/publications/Pages/code-search.aspx) and are comma-separated, e.g. 6X,7X,8X
required: false
type: string
collectionFormat: csv
pattern: '[0-9A-Z]{2}'
- name: excludedAirlineCodes
in: query
description: |
This option ensures that the system will ignore these airlines. This can not be cumulated with parameter includedAirlineCodes.
Airlines are specified as [IATA airline codes](http://www.iata.org/publications/Pages/code-search.aspx) and are comma-separated, e.g. 6X,7X,8X
required: false
type: string
collectionFormat: csv
pattern: '[0-9A-Z]{2}'
- name: nonStop
in: query
description: if set to true, the search will find only flights going from the origin to the destination with no stop in between
required: false
type: boolean
default: false
- name: currencyCode
in: query
description: the preferred currency for the flight offers. Currency is specified in the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format, e.g. EUR for Euro
required: false
type: string
pattern: '[A-Z]{3}'
- name: maxPrice
in: query
description: maximum price per traveler. By default, no limit is applied. If specified, the value should be a positive number with no decimals
required: false
type: integer
minimum: 1
- name: max
in: query
description: maximum number of flight offers to return. If specified, the value should be greater than or equal to 1
required: false
type: integer
minimum: 1
default: 250
responses:
'200':
$ref: '#/responses/GETAirOffersReply'
'400':
$ref: '#/responses/400_Search'
default:
$ref: '#/responses/500'
description: ''
definitions:
Error_400:
type: object
properties:
errors:
type: array
items:
$ref: '#/definitions/Issue'
required:
- errors
example:
errors:
- status: 400
code: 477
title: INVALID FORMAT
detail: invalid query parameter format
source:
parameter: airport
example: CDG
Error_500:
type: object
properties:
errors:
type: array
items:
$ref: '#/definitions/Issue'
required:
- errors
example:
errors:
- status: 500
code: 141
title: SYSTEM ERROR HAS OCCURRED
Issue:
type: object
properties:
status:
description: the HTTP status code applicable to this error
type: integer
code:
description: an application-specific error code
type: integer
format: int64
title:
description: a short summary of the error
type: string
detail:
description: explanation of the error
type: string
source:
type: object
title: Issue_Source
description: an object containing references to the source of the error
maxProperties: 1
properties:
pointer:
description: a JSON Pointer [RFC6901] to the associated entity in the request document
type: string
parameter:
description: a string indicating which URI query parameter caused the issue
type: string
example:
description: a string indicating an example of the right value
type: string
Collection_Meta:
title: Collection_Meta
properties:
count:
type: integer
example: 1
oneWayCombinations:
type: array
items:
title: oneWayCombinations
properties:
originDestinationId:
type: string
flightOfferIds:
type: array
items:
type: string
Collection_Meta_Link:
type: object
title: Collection_Meta
properties:
count:
type: integer
example: 1
links:
type: object
title: CollectionLinks
properties:
self:
type: string
format: uri
example: https://test.api.amadeus.com/v1/area/resources?...
next:
type: string
format: uri
example: https://test.api.amadeus.com/v1/area/resources?...
previous:
type: string
format: uri
example: https://test.api.amadeus.com/v1/area/resources?...
last:
type: string
format: uri
example: https://test.api.amadeus.com/v1/area/resources?...
first:
type: string
format: uri
example: https://test.api.amadeus.com/v1/area/resources?...
up:
type: string
format: uri
example: https://test.api.amadeus.com/v1/area/resources?...
example:
self: https://test.api.amadeus.com/v1/area/resources?param=value
LocationEntry:
additionalProperties:
$ref: '#/definitions/LocationValue'
AircraftEntry:
additionalProperties:
description: the manufacturer/model of aircraft
type: string
CurrencyEntry:
additionalProperties:
type: string
example: EUR
CarrierEntry:
additionalProperties:
description: the carrier name
type: string
FlightSegment:
type: object
description: defining a flight segment; including both operating and marketing details when applicable
properties:
departure:
$ref: '#/definitions/FlightEndPoint'
arrival:
$ref: '#/definitions/FlightEndPoint'
carrierCode:
type: string
description: providing the airline / carrier code
minLength: 1
maxLength: 2
example: DL
number:
type: string
description: the flight number as assigned by the carrier
minLength: 1
maxLength: 4
example: '212'
aircraft:
$ref: '#/definitions/AircraftEquipment'
operating:
$ref: '#/definitions/OperatingFlight'
duration:
type: string
description: stop duration in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) PnYnMnDTnHnMnS format, e.g. PT2H10M
example: PT2H10M
stops:
type: array
description: information regarding the different stops composing the flight segment. E.g. technical stop, change of gauge...
items:
$ref: '#/definitions/FlightStop'
OriginalFlightEndPoint:
type: object
description: departure or arrival information
properties:
iataCode:
description: '[IATA airline codes](http://www.iata.org/publications/Pages/code-search.aspx)'
type: string
example: JFK
terminal:
description: terminal name / number
type: string
example: T2
FlightEndPoint:
title: FlightEndPoint
description: departure or arrival information
allOf:
- $ref: '#/definitions/OriginalFlightEndPoint'
- type: object
properties:
at:
description: local date and time in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00
type: string
format: date-time
example: '2017-10-23T20:00:00'
OriginalFlightStop:
description: details of stops for direct or change of gauge flights
type: object
properties:
iataCode:
description: '[IATA airline codes](http://www.iata.org/publications/Pages/code-search.aspx)'
type: string
example: JFK
duration:
type: string
description: stop duration in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) PnYnMnDTnHnMnS format, e.g. PT2H10M
example: PT2H10M
FlightStop:
title: FlightStop
description: details of stops for direct or change of gauge flights
allOf:
- $ref: '#/definitions/OriginalFlightStop'
- type: object
properties:
arrivalAt:
description: arrival at the stop in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00
type: string
format: date-time
example: '2017-10-23T20:00:00'
departureAt:
description: departure from the stop in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00
type: string
format: date-time
example: '2017-10-23T20:00:00'
AircraftEquipment:
description: information related to the aircraft
properties:
code:
type: string
description: |
IATA aircraft code (http://www.flugzeuginfo.net/table_accodes_iata_en.php)
pattern: '[a-zA-Z0-9]{3}'
example: '318'
OperatingFlight:
type: object
description: information about the operating flight
properties:
carrierCode:
type: string
description: providing the airline / carrier code
minLength: 1
maxLength: 2
example: DL
Price:
properties:
currency:
type: string
example: USD
total:
description: Total amount paid by the user
type: string
example: '932.70'
base:
description: Amount without taxes
type: string
example: '632.70'
fees:
description: List of applicable fees
type: array
items:
$ref: '#/definitions/Fee'
taxes:
type: array
items:
$ref: '#/definitions/Tax'
refundableTaxes:
description: The amount of taxes which are refundable
type: string
example: '200.00'
Extended_Price:
type: object
title: Price
description: price information
allOf:
- type: object
properties:
margin:
description: 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.
type: string
example: '1.00'
grandTotal:
description: Total amount paid by the user (including fees and selected additional services).
type: string
example: '987.00'
billingCurrency:
description: Currency of the payment. It may be different than the requested currency
type: string
example: EUR
additionalServices:
type: array
title: AdditionalServices
items:
title: AdditionalService
type: object
properties:
amount:
type: string
example: '332.70'
type:
$ref: '#/definitions/AdditionalServiceType'
- $ref: '#/definitions/Price'
Fee:
description: a fee
properties:
amount:
type: string
example: '332.70'
type:
$ref: '#/definitions/FeeType'
FeeType:
type: string
description: type of fee
enum:
- TICKETING
- FORM_OF_PAYMENT
- SUPPLIER
example: TICKETING
Tax:
description: a tax
type: object
properties:
amount:
type: string
example: '332.70'
code:
type: string
example: MX
TravelClass:
description: quality of service offered in the cabin where the seat is located in this flight. Economy, premium economy, business or first class
type: string
enum:
- ECONOMY
- PREMIUM_ECONOMY
- BUSINESS
- FIRST
example: PREMIUM_ECONOMY
Co2Emission:
type: object
properties:
weight:
description: Weight of Co2 emitted for the concerned segment
type: integer
example: 90
weightUnit:
description: Code to qualify unit as pounds or kilos
type: string
example: KG
cabin:
$ref: '#/definitions/TravelClass'
OriginDestination:
allOf:
- $ref: '#/definitions/OriginDestinationLight'
- type: object
properties:
originRadius:
description: |
Include other possible locations around the point, located less than this distance in kilometers away. Max:300
Can not be combined with "dateWindow" or "timeWindow".
type: number
example: 200
alternativeOriginsCodes:
type: array
description: Set of alternative origin location, such as a city or an airport. Currently, only the locations defined in [IATA](http://www.iata.org/publications/Pages/code-search.aspx) are
supported.
minItems: 1
maxItems: 2
items:
title: code
type: string
example:
- LON
- MUC
destinationRadius:
description: |
Include other possible locations around the point, located less than this distance in kilometers away. Max:300
Can not be combined with "dateWindow" or "timeWindow".
type: number
example: 200
alternativeDestinationsCodes:
type: array
description: Set of alternative destination location, such as a city or an airport. Currently, only the locations defined in [IATA](http://www.iata.org/publications/Pages/code-search.aspx)
are supported.
minItems: 1
maxItems: 2
items:
title: code
type: string
departureDateTimeRange:
description: Approximate date and time of departure, specified as a local date and time range.
$ref: '#/definitions/DateTimeRange'
arrivalDateTimeRange:
description: Approximate date and time of arrival, specified as a local date and time range.
$ref: '#/definitions/DateTimeRange'
OriginDestinationLight:
type: object
properties:
id:
type: string
example: 1
originLocationCode:
description: Origin location, such as a city or an airport. Currently, only the locations defined in [IATA](http://www.iata.org/publications/Pages/code-search.aspx) are supported.
type: string
example: PAR
destinationLocationCode:
description: Destination location, such as a city or an airport. Currently, only the locations defined in [IATA](http://www.iata.org/publications/Pages/code-search.aspx) are supported.
type: string
example: NYC
includedConnectionPoints:
type: array
description: 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
minItems: 1
maxItems: 2
items:
title: code
type: string
example:
- MRS
excludedConnectionPoints:
type: array
description: 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
minItems: 1
maxItems: 3
items:
title: code
type: string
example:
- MRS
DateTimeRange:
title: dateTimeRange
allOf:
- $ref: '#/definitions/DateTimeType'
- type: object
properties:
dateWindow:
description: |
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)
Can not be combined with "originRadius" or "destinationRadius".
type: string
example: I3D
pattern: ^[MPI][1-3]D
timeWindow:
description: |
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. 6H
Can not be combined with "originRadius" or "destinationRadius".
type: string
example: 2H
pattern: ^([1-9]|10|11|12)H
required:
- date
DateTimeType:
type: object
properties:
date:
description: Dates are specified in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) YYYY-MM-DD format, e.g. 2018-12-25
type: string
format: date
example: '2018-09-22'
time:
description: Local time. hh:mm:ss format, e.g 10:30:00
type: string
example: '10:30:00'
required:
- date
Extended_TravelerInfo:
allOf:
- $ref: '#/definitions/TravelerInfo'
required:
- id
- travelerType
TravelerInfo:
type: object
properties:
id:
type: string
example: 1
travelerType:
$ref: '#/definitions/TravelerType'
associatedAdultId:
type: string
description: if type="HELD_INFANT", corresponds to the adult travelers's id who will share the seat
required:
- id
- travelerType
SearchCriteria:
type: object
properties:
excludeAllotments:
description: This option allows to exclude the isAllotment flag associated to a booking class in the search response when it exist.
type: boolean
example: false
addOneWayOffers:
description: This option allows activate the one-way combinable feature
type: boolean
example: true
maxFlightOffers:
description: Maximum number of flight offers returned (Max 250)
type: number
default: 250
example: 250
maxPrice:
description: maximum price per traveler. By default, no limit is applied. If specified, the value should be a positive number with no decimals
type: integer
example: 100
allowAlternativeFareOptions:
description: This option allows to default to a standard fareOption if no offers are found for the selected fareOption.
type: boolean
example: true
oneFlightOfferPerDay:
description: Requests the system to find at least one flight-offer per day, if possible, when a range of dates is specified. Default is false.
type: boolean
example: true
additionalInformation:
title: AdditionalInformation
type: object
properties:
chargeableCheckedBags:
description: If true, returns the price of the first additional bag when the airline is an "Amadeus Ancillary Services" member.
type: boolean
example: true
brandedFares:
description: If true, returns the fare family name for each flight-offer which supports fare family
type: boolean
example: true
pricingOptions:
$ref: '#/definitions/Extended_PricingOptions'
flightFilters:
title: FlightFilters
$ref: '#/definitions/FlightFilters'
CabinRestriction:
title: CabinRestriction
type: object
properties:
cabin:
$ref: '#/definitions/TravelClass'
originDestinationIds:
title: originDestinationIds
description: The list of originDestination identifiers for which the cabinRestriction applies
type: array
items:
type: string
example:
- 1
- 2
Extended_CabinRestriction:
allOf:
- $ref: '#/definitions/CabinRestriction'
- type: object
properties:
coverage:
$ref: '#/definitions/Coverage'
FlightFilters:
type: object
properties:
crossBorderAllowed:
description: Allows to search a location outside the borders when a radius around a location is specified. Default is false.
type: boolean
example: false
moreOvernightsAllowed:
description: This flag enables/disables the possibility to have more overnight flights in Low Fare Search
type: boolean
example: false
returnToDepartureAirport:
description: This option force to retrieve flight-offer with a departure and a return in the same airport
type: boolean
example: false
railSegmentAllowed:
description: This flag enable/disable filtering of rail segment (TGV AIR, RAIL ...)
type: boolean
example: true
busSegmentAllowed:
description: This flag enable/disable filtering of bus segment
type: boolean
example: true
maxFlightTime:
description: Maximum flight time as a percentage relative to the shortest flight time available for the itinerary
type: number
example: 200
carrierRestrictions:
title: CarrierRestrictions
description: Restriction towards carriers.
$ref: '#/definitions/CarrierRestrictions'
cabinRestrictions:
title: CabinRestrictions
description: Restriction towards cabins.
type: array
minItems: 1
maxItems: 6
items:
$ref: '#/definitions/Extended_CabinRestriction'
connectionRestriction:
title: ConnectionRestriction
description: Restriction towards number of connections.
$ref: '#/definitions/ConnectionRestriction'
CarrierRestrictions:
description: Restriction towards carriers.
type: object
properties:
blacklistedInEUAllowed:
description: 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 airline
type: boolean
default: false
excludedCarrierCodes:
description: This option ensures that the system will only consider these airlines.
type: array
minItems: 1
maxItems: 99
items:
type: string
includedCarrierCodes:
description: This option ensures that the system will only consider these airlines.
type: array
minItems: 1
maxItems: 99
items:
type: string
ConnectionRestriction:
description: Restriction towards number of connections.
type: object
properties:
maxNumberOfConnections:
description: The maximal number of connections for each itinerary. Value can be 0, 1 or 2.
type: number
example: 2
nonStopPreferred:
description: When this option is requested, recommendations made of Non-Stop flights only are favoured by the search, on the whole itinerary, with a weight of 75%.
type: boolean
example: false
airportChangeAllowed:
description: Allow to change airport during connection
type: boolean
example: false
technicalStopsAllowed:
description: This option allows the single segment to have one or more intermediate stops (technical stops).
type: boolean
example: true
FlightOffer:
title: Flight-offer
type: object
required:
- type
- id
properties:
type:
type: string
description: the resource name
example: flight-offer
id:
description: Id of the flight offer
type: string
example: '1'
source:
$ref: '#/definitions/FlightOfferSource'
instantTicketingRequired:
description: If true, inform that a ticketing will be required at booking step.
type: boolean
example: false
disablePricing:
description: BOOK step ONLY - If true, allows to book a PNR without pricing. Only for the source "GDS"
type: boolean
example: false
nonHomogeneous:
description: 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)
type: boolean
example: false
oneWay:
description: If true, the flight offer can be combined with other oneWays flight-offers to complete the whole journey (one-Way combinable feature).
type: boolean
example: false
paymentCardRequired:
description: If true, a payment card is mandatory to book this flight offer
type: boolean
example: false
lastTicketingDate:
description: 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-07
type: string
example: '2018-06-19'
lastTicketingDateTime:
description: 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/time (included).
Unspecified when it does not make sense for this flight offer (e.g. no control over ticketing once booked). Information only this attribute is not used in input of pricing request. Local
date and time in YYYY-MM-ddThh:mm:ss format, e.g. 2017-02-10T20:40:00
type: string
format: date-time
example: '2018-06-19T15:00:00'
numberOfBookableSeats:
description: Number of seats bookable in a single request. Can not be higher than 9.
type: number
example: 9
minimum: 1
maximum: 9
itineraries:
type: array
minItems: 1
maxItems: 250
items:
title: Itineraries
type: object
properties:
duration:
description: duration in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) PnYnMnDTnHnMnS format, e.g. PT2H10M for a duration of 2h10m
type: string
example: PT2H10M
segments:
title: Segments
type: array
minItems: 1
maxItems: 9
items:
$ref: '#/definitions/Segment'
required:
- segments
price:
$ref: '#/definitions/Extended_Price'
pricingOptions:
title: PricingOptions
type: object
properties:
fareType:
description: type of fare of the flight-offer
$ref: '#/definitions/PricingOptionsFareType'
includedCheckedBagsOnly:
type: boolean
description: If true, returns the flight-offer
# --- truncated at 32 KB (58 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/amadeus-solutions/refs/heads/main/openapi/amadeus-solutions-flight-offers-search-openapi.yaml