Skip to content
Navigation

DiscoverFlights

GET
https://api.nicer.travel/booking/flights

JSON is the default; Accept: text/event-stream or format=stream requests SSE.

Authorization

  • companyHeader
    optional
    API key in header

    x-nicer-company: <token>

  • discoveryBearer
    optional
    HTTP Bearer (JWT)

    Authorization: Bearer <token>

Query parameters

  • from
    optional
    string
    pattern: ^[A-Z]{3}$
  • to
    optional
    string
    pattern: ^[A-Z]{3}$
  • departure
    optional
    string
    format: date · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
  • return
    optional
    string
    format: date · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
  • legs
    optional
    string
    maxLength: 137 · pattern: ^[A-Z]{3}-[A-Z]{3}-\d{4}-\d{2}-\d{2}(?:,[A-Z]{3}-[A-Z]{3}-\d{4}-\d{2}-\d{2}){1,5}$
  • adults
    optional
    integer
    maximum: 9 · minimum: 1 · default: 1
  • children
    optional
    integer
    maximum: 8 · minimum: 0 · default: 0
  • infants
    optional
    integer
    maximum: 8 · minimum: 0 · default: 0
  • cabin
    optional
    economy
    or
    premium-economy
    or
    business
    or
    first
    default: "economy"
  • cabins
    optional
    string
    maxLength: 100 · pattern: ^(?:economy|premium-economy|business|first)(?:,(?:economy|premium-economy|business|first)){0,5}$
  • currency
    optional
    string
    pattern: ^[A-Z]{3}$ · default: "USD"
  • airlines
    optional
    string
    maxLength: 89 · pattern: ^[A-Z0-9]{2,3}(?:,[A-Z0-9]{2,3}){0,29}$
  • stops
    optional
    string
    pattern: ^[0-2](?:,[0-2]){0,2}$
  • via
    optional
    string
    maxLength: 119 · pattern: ^[A-Z]{3}(?:,[A-Z]{3}){0,29}$
  • excludeAirportChanges
    optional
    true
    or
    false
  • maxConnections
    optional
    integer
    maximum: 5 · minimum: 0
  • minPrice
    optional
    integer
    maximum: 9007199254740991 · minimum: 0
  • maxPrice
    optional
    integer
    maximum: 9007199254740991 · minimum: 1
  • maxDuration
    optional
    integer
    maximum: 10080 · minimum: 1
  • bags
    optional
    true
    or
    false
  • refundable
    optional
    true
    or
    false
  • commissionable
    optional
    true
    or
    false
  • sameCabin
    optional
    true
    or
    false
  • changeable
    optional
    true
    or
    false
  • maxLayover
    optional
    integer
    maximum: 2880 · minimum: 1
  • departureTime
    optional
    string
    maxLength: 120
  • arrivalTime
    optional
    string
    maxLength: 120
  • sort
    optional
    string
    ·
    one of 9 values

    How results are listed: best match, price (or -price), shortest duration, earliest (or latest, with -) departure or arrival, or fewest stops. best weighs 10% over the lowest price like 20% over the shortest duration or one more stop.

    Allowed values: best, price, -price, duration, departure, -departure, arrival, -arrival, stops
    default: "price" · example: "best"
  • page
    optional
    integer
    maximum: 10000 · minimum: 1 · default: 1
  • size
    optional
    integer
    maximum: 100 · minimum: 1 · default: 20
  • group
    optional
    slice
  • slices
    optional
    string
    maxLength: 400 · pattern: ^slc_[A-Za-z0-9]+(?:,slc_[A-Za-z0-9]+){0,5}$
  • chosenFrom
    optional
    string
    maxLength: 96 · pattern: ^flt_[A-Za-z0-9_-]+_\d+$

Header parameters

  • x-nicer-company
    optional
    string

    Required when the optional Authorization token does not identify one company. Public context only; no company-registration lookup.

  • Accept
    optional
    application/json
    or
    text/event-stream

Returns

200

JSON snapshot or SSE frames (the schema describes each frame's JSON data).

JSON
  • items
    array of
    object
    required
    • expiresAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
    • offerReference
      string
      required
      minLength: 1
    • price
      object
      required
      • breakdown
        object
        required
        • baseMinor
          required

          Any of the following:

          • integer
          • null
        • discountMinor
          integer
          required
          maximum: 9007199254740991 · minimum: 0
        • nicerAdjustmentMinor
          integer
          required
          maximum: 9007199254740991 · minimum: 0
        • supplierFeesMinor
          required

          Any of the following:

          • integer
          • null
        • taxesMinor
          required

          Any of the following:

          • integer
          • null
      • currency
        string
        required
        pattern: ^[A-Z]{3}$
      • totalMinor
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • passengers
        array of
        object
        required
        • count
          integer
          required
          maximum: 9007199254740991
        • passengerType
          ADULT
          or
          CHILD
          or
          INFANT
          required
        • totalMinor
          required

          Any of the following:

          • integer
          • null
    • productKind
      string
      required
    • providerKey
      string
      required
    • cabin
      BUSINESS
      or
      ECONOMY
      or
      FIRST
      or
      PREMIUM_ECONOMY
      required
    • optionalDocumentTypes
      array of
      PASSPORT
      or
      NATIONAL_ID
      or
      ALIEN_RESIDENT
      or
      VISA
      or
      KNOWN_TRAVELER_NUMBER
      or
      REDRESS_NUMBER
      required
    • owner
      object
      required
      • code
        string
        required
        pattern: ^[A-Z0-9]{2,3}$
      • logoAssetReference
        required

        Any of the following:

        • string
        • null
      • name
        string
        required
        minLength: 1
    • passengers
      array of
      required

      One of the following:

      • object
        • count
          integer
          required
          maximum: 9 · minimum: 1
        • type
          string
          required
      • object
        • count
          integer
          required
          maximum: 8 · minimum: 1
        • type
          string
          required
      • object
        • count
          integer
          required
          maximum: 8 · minimum: 1
        • type
          string
          required
    • refundable
      boolean
      required
    • requiredDocumentTypes
      array of
      PASSPORT
      or
      NATIONAL_ID
      or
      ALIEN_RESIDENT
      or
      VISA
      or
      KNOWN_TRAVELER_NUMBER
      or
      REDRESS_NUMBER
      required
    • requiresInstantPayment
      boolean
      required
    • serviceCapabilities
      object
      required
      • ancillaries
        AVAILABLE
        or
        NOT_REQUESTED
        or
        NOT_SUPPORTED
        required
      • seats
        AVAILABLE
        or
        NOT_REQUESTED
        or
        NOT_SUPPORTED
        required
    • slices
      array of
      object
      required
      • connectionCount
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • durationMinutes
        integer
        required
        maximum: 9007199254740991
      • overnight
        boolean
        required
      • segments
        array of
        object
        required
        • aircraft
          required

          Any of the following:

          • object
            • code
              string
              required
              minLength: 1
            • manufacturer
              required

              Any of the following:

              • string
              • null
            • model
              required

              Any of the following:

              • string
              • null
            • name
              string
              required
              minLength: 1
          • null
        • arrival
          object
          required
          • airport
            object
            required
            • city
              string
              required
              minLength: 1
            • countryCode
              required

              Any of the following:

              • CountryCode
              • null
            • iataCode
              string
              required
              pattern: ^[A-Z]{3}$
            • name
              string
              required
              minLength: 1
            • timeZone
              required

              Any of the following:

              • string
              • null
          • at
            string
            required
            format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          • localDateTime
            string
            required
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
          • terminal
            required

            Any of the following:

            • string
            • null
          • utcOffset
            required

            Any of the following:

            • string
            • null
        • codeshare
          boolean
          required
        • departure
          object
          required
          • airport
            object
            required
            • city
              string
              required
              minLength: 1
            • countryCode
              required

              Any of the following:

              • CountryCode
              • null
            • iataCode
              string
              required
              pattern: ^[A-Z]{3}$
            • name
              string
              required
              minLength: 1
            • timeZone
              required

              Any of the following:

              • string
              • null
          • at
            string
            required
            format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          • localDateTime
            string
            required
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
          • terminal
            required

            Any of the following:

            • string
            • null
          • utcOffset
            required

            Any of the following:

            • string
            • null
        • distanceMiles
          required

          Any of the following:

          • integer
          • null
        • durationMinutes
          integer
          required
          maximum: 9007199254740991
        • fare
          object
          required
          • bookingCode
            required

            Any of the following:

            • string
            • null
          • brand
            required

            Any of the following:

            • object
              • code
                string
                required
                minLength: 1
              • name
                string
                required
                minLength: 1
            • null
          • cabin
            BUSINESS
            or
            ECONOMY
            or
            FIRST
            or
            PREMIUM_ECONOMY
            required
          • checkedBaggagePieces
            required

            Any of the following:

            • integer
            • null
          • fareBasisCode
            required

            Any of the following:

            • string
            • null
          • checkedBaggageIncluded
            optional

            Any of the following:

            • boolean
            • null
          • meals
            optional
            array of
            string
            ·
            one of 8 values
            Allowed values: BREAKFAST, DINNER, FOR_PURCHASE, LUNCH, MEAL, NONE, REFRESHMENTS, SNACK
          • seatsLeft
            optional

            Any of the following:

            • integer
            • null
        • flightNumber
          string
          required
          minLength: 1
        • hiddenStops
          array of
          object
          required
          • airport
            object
            required
            • city
              string
              required
              minLength: 1
            • countryCode
              required

              Any of the following:

              • CountryCode
              • null
            • iataCode
              string
              required
              pattern: ^[A-Z]{3}$
            • name
              string
              required
              minLength: 1
            • timeZone
              required

              Any of the following:

              • string
              • null
          • arrivesAt
            string
            required
            format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          • arrivalLocalDateTime
            string
            required
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
          • arrivalUtcOffset
            required

            Any of the following:

            • string
            • null
          • departsAt
            string
            required
            format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          • departureLocalDateTime
            string
            required
            pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
          • departureUtcOffset
            required

            Any of the following:

            • string
            • null
          • durationMinutes
            integer
            required
            maximum: 9007199254740991 · minimum: 0
        • marketingCarrier
          object
          required
          • code
            string
            required
            pattern: ^[A-Z0-9]{2,3}$
          • logoAssetReference
            required

            Any of the following:

            • string
            • null
          • name
            string
            required
            minLength: 1
        • operatingCarrier
          required

          Any of the following:

          • object
            • code
              string
              required
              pattern: ^[A-Z0-9]{2,3}$
            • logoAssetReference
              required

              Any of the following:

              • string
              • null
            • name
              string
              required
              minLength: 1
          • null
        • operatingFlightNumber
          required

          Any of the following:

          • string
          • null
        • segmentReference
          string
          required
          minLength: 1
      • sliceReference
        string
        required
        minLength: 1
    • ticketingDeadline
      required

      Any of the following:

      • string
      • null
    • estimatedCommission
      optional

      Any of the following:

      • EstimatedCommission
        • grossAmount
          required

          Any of the following:

          • Money
          • null
        • rateBasisPoints
          required

          Any of the following:

          • integer
          • null
        • source
          NICER_PRICE_ADJUSTMENT
          or
          PROVIDER_RATE
          required
      • null
    • validatingCarriers
      optional
      array of
      object

      Every airline that may issue this fare's ticket, the default (owner) first. Present only when there is more than one; checkout takes the chosen code as validatingCarrier.

      • code
        string
        required
        pattern: ^[A-Z0-9]{2,3}$
      • logoAssetReference
        required

        Any of the following:

        • string
        • null
      • name
        string
        required
        minLength: 1
    • changeable
      optional

      Any of the following:

      • boolean
      • null
  • filters
    object
    required
    • applied
      object
      required
      • airlineCodes
        optional
        array of
        string
        pattern: ^[A-Z0-9]{2,3}$
      • checkedBaggageIncludedOnly
        optional
        boolean
      • commissionableOnly
        optional
        boolean
      • maximumDurationMinutes
        optional
        integer
        maximum: 9007199254740991
      • maximumPriceMinor
        optional
        integer
        maximum: 9007199254740991
      • minimumPriceMinor
        optional
        integer
        maximum: 9007199254740991 · minimum: 0
      • refundableOnly
        optional
        boolean
      • sameCabinOnly
        optional
        boolean
      • changeableOnly
        optional
        boolean
      • maximumLayoverMinutes
        optional
        integer
        maximum: 9007199254740991
      • connectionAirportCodes
        optional
        array of
        string
        pattern: ^[A-Z]{3}$
      • excludeAirportChanges
        optional
        boolean
    • available
      object
      required
      • airlines
        array of
        object
        required
        • code
          string
          required
          pattern: ^[A-Z0-9]{2,3}$
        • logoAssetReference
          required

          Any of the following:

          • string
          • null
        • name
          string
          required
          minLength: 1
      • checkedBaggageIncludedCount
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • commission
        required

        Any of the following:

        • object
          • commissionableCount
            integer
            required
            maximum: 9007199254740991 · minimum: 0
          • grossAmountRanges
            array of
            object
            required
            • currency
              string
              required
              pattern: ^[A-Z]{3}$
            • maximumAmountMinor
              integer
              required
              maximum: 9007199254740991 · minimum: 0
            • minimumAmountMinor
              integer
              required
              maximum: 9007199254740991 · minimum: 0
        • null
      • connectionCounts
        array of
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • durationMinutes
        required

        Any of the following:

        • object
          • maximum
            integer
            required
            maximum: 9007199254740991
          • minimum
            integer
            required
            maximum: 9007199254740991
        • null
      • priceRanges
        array of
        object
        required
        • currency
          string
          required
          pattern: ^[A-Z]{3}$
        • maximumAmountMinor
          integer
          required
          maximum: 9007199254740991 · minimum: 0
        • minimumAmountMinor
          integer
          required
          maximum: 9007199254740991 · minimum: 0
      • refundableCount
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • matrix
        optional
        array of
        object
        • airline
          required

          Any of the following:

          • object
            • code
              string
              required
              pattern: ^[A-Z0-9]{2,3}$
            • logoAssetReference
              required

              Any of the following:

              • string
              • null
            • name
              string
              required
              minLength: 1
          • null
        • stops
          integer
          required
          maximum: 2 · minimum: 0
        • lowestPrice
          object
          required
          • amountMinor
            integer
            required
            maximum: 9007199254740991 · minimum: 0
          • currency
            string
            required
            pattern: ^[A-Z]{3}$
        • flightCount
          integer
          required
          maximum: 9007199254740991
      • changeableCount
        optional
        integer
        maximum: 9007199254740991 · minimum: 0
      • connectionAirports
        optional
        array of
        object
        • airport
          object
          required
          • city
            string
            required
            minLength: 1
          • countryCode
            required

            Any of the following:

            • CountryCode
            • null
          • iataCode
            string
            required
            pattern: ^[A-Z]{3}$
          • name
            string
            required
            minLength: 1
          • timeZone
            required

            Any of the following:

            • string
            • null
        • flightCount
          integer
          required
          maximum: 9007199254740991
      • layoverMinutes
        optional

        Any of the following:

        • object
          • maximum
            integer
            required
            maximum: 9007199254740991 · minimum: 0
          • minimum
            integer
            required
            maximum: 9007199254740991 · minimum: 0
        • null
  • page
    object
    required
    • number
      integer
      required
      maximum: 9007199254740991
    • size
      integer
      required
      maximum: 9007199254740991
    • total
      integer
      required
      maximum: 9007199254740991 · minimum: 0
    • hasMore
      boolean
      required
  • fetchedAt
    string
    required
    format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
  • expiresAt
    string
    required
    format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
  • groups
    optional
    array of
    object
    • sliceIndex
      integer
      required
      maximum: 5 · minimum: 0
    • sliceReference
      string
      required
      maxLength: 64 · pattern: ^slc_[A-Za-z0-9]+$
    • optionCount
      integer
      required
      maximum: 9007199254740991
    • priceDeltaMinor
      integer
      required
      maximum: 9007199254740991 · minimum: 0
text/event-stream

Type:string

string

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close