Categories: APIs

How to Use Amadeus Travel A.I. APIs

Amadeus is one of the leading IT providers for the global travel industry. Every year, the company’s data center in Erding, Germany processes over 55 petabytes from across the travel spectrum — flights, hotels to trains, cruises, rental cars — and hundreds of millions of bookings from travelers around the world.

Amadeus for Developers has launched these Travel A.I. APIs to help give developers and entrepreneurs who otherwise don’t have access to extensive datasets the ability to add A.I.-driven insights to their apps. The future of travel will be built on A.I., and these APIs are giving developers the tools.

Browse Amadeus APIs

Flight Delay Prediction API

The Amadeus Flight Delay Prediction API uses a machine learning model trained on datasets of over 12 million annual flights to predict if a given flight will be delayed, and by how long.

Use Cases for Flight Delay Prediction API

Flight delays can be a nightmare. By knowing in advance, the chances of delay for any given flight, you can help your users find the flight that’s most likely to give them a stress-free trip from A to B. You can use the insights from this API to add valuable context to overall flight search results, especially in the case of connecting flights or virtual interlining.

Required Parameters for Flight Delay Prediction API

The API uses a variety of variables to return the most precise predictions possible:

  • aircraftCode: the IATA aircraft code for the selected flight.
  • flightNumber: the flight number assigned by the airline.
  • carrierCode: the IATA airline code for the selected carrier.
  • departureTime: the local time of departure.
  • duration: the duration of the flight.
  • originLocationCode: the IATA code for the city or airport of departure.
  • arrivalDate: the local date of arrival.
  • destinationLocationCode: the IATA code for the city or airport of arrival.
  • arrivalTime: the local time of arrival.
  • departureDate: the local time of departure.

The call will look like this:

https://test.api.amadeus.com/v1/travel/predictions/flight-delay?originLocationCode=NCE&destinationLocationCode=IST&departureDate=2020-08-01&departureTime=18:20:00&arrivalDate=2020-08-01&arrivalTime=22:15:00&aircraftCode=321&carrierCode=TK&flightNumber=1816&duration=PT31H10M

Flight Delay Prediction API Response

The API returns the chances of delay for four possible delay lengths:

  1. Less than 30 minutes.
  2. Between 30 and 60 minutes.
  3. Between 60 and 120 minutes.
  4. Over 120 minutes or canceled.

Let’s look at an example of the response:

{
    "data": [
        {
            "id": "TK1816NCEIST20200801",
            "probability": "0.13336977",
            "result": "LESS_THAN_30_MINUTES",
            "subType": "flight-delay",
            "type": "prediction"
        },
        {
            "id": "TK1816NCEIST20200801",
            "probability": "0.42023364",
            "result": "BETWEEN_30_AND_60_MINUTES",
            "subType": "flight-delay",
            "type": "prediction"
        },
        {
            "id": "TK1816NCEIST20200801",
            "probability": "0.34671372",
            "result": "BETWEEN_60_AND_120_MINUTES",
            "subType": "flight-delay",
            "type": "prediction"
        },
        {
            "id": "TK1816NCEIST20200801",
            "probability": "0.09968289",
            "result": "OVER_120_MINUTES_OR_CANCELLED",
            "subType": "flight-delay",
            "type": "prediction"
        }
    ],
    "meta": {
        "count": 4,
        "links": {
            "self": "https://test.api.amadeus.com/v1/travel/predictions/flight-delay?originLocationCode=NCE&destinationLocationCode=IST&departureDate=2020-08-01&departureTime=18:20:00&arrivalDate=2020-08-01&arrivalTime=22:15:00&aircraftCode=321&carrierCode=TK&flightNumber=1816&duration=PT31H10M"
        }
    }
}

As you can see in the example, this specific flight has a small chance of either a brief delay or cancellation, but a higher chance of being delayed by either 30 to 60 minutes or delayed by 60 to 120 minutes (42% and 35% respectively).

Trip Purpose Prediction API

The Amadeus Trip Purpose Prediction API predicts whether a given travel itinerary is for business or leisure, helping you understand why your users are traveling. The predictions are based on machine-learning models trained on Amadeus’ historical trip booking data.

Use Cases for Trip Purpose Prediction API

Understanding why a user is traveling helps you offer more personalized and relevant content. You can use the insights from this API to curate flight, hotel, restaurant, or activity recommendations based on the traveler’s profile or — in the case of business travelers — suggest services like business class tickets, lounge access, or other services.

Required Parameters for Trip Purpose Prediction API

Trip Purpose Prediction requires a few parameters:

  • departureDate: the local date of departure.
  • originLocationCode: the IATA code for the city or airport of departure.
  • returnDate: the local date of the return flight.
  • destinationLocationCode: the IATA code for the city or airport of arrival.

The call will look like this:

https://test.api.amadeus.com/v1/travel/predictions/trip-purpose?originLocationCode=LON&destinationLocationCode=AMS&departureDate=2020-10-01&returnDate=2020-10-15

Trip Purpose Prediction API Response

The API will return a prediction of whether the trip is for business or leisure and a confidence factor. In this example, the API predicts with 99.6% confidence that this two-week trip from London to Amsterdam is for a vacation:

{
    "data": {
        "id": "LONAMS20201001",
        "probability": "0.99602944",
        "result": "LEISURE",
        "subType": "trip-purpose",
        "type": "prediction"
    },
    "meta": {
        "defaults": {
            "searchDate": "2020-06-08"
        },
        "links": {
            "self": "https://test.api.amadeus.com/v1/travel/predictions/trip-purpose?originLocationCode=LON&destinationLocationCode=AMS&departureDate=2020-10-01&returnDate=2020-10-15&searchDate=2020-06-08"
        }
    }
}

Airport On-time Performance API

The Amadeus Airport On-time Performance API provides the overall punctuality of flights for an airport on a given date. The predictions are based on machine-learning models trained on Amadeus historical flight delay data.

Airport On-time Performance API Use Cases

Many cities have multiple airports — some, like London, even have as many as five! Knowing which airports are least likely to suffer delays can give travelers useful context for picking their flight, especially when the options are plentiful.

Required Parameters for the Airport On-time Performance API

There are two required parameters for the Airport On-time Performance API:

  • airportCode: the IATA code for the desired airport.
  • date: the desired date.

The call will look like this:

https://test.api.amadeus.com/v1/airport/predictions/on-time?airportCode=JFK&date=2020-10-01

Airport On-time Performance API Response

The API predicts the overall percentage of on-time flights for a given airport, as well as a confidence probability. In this example, the API predicts that 81% of flights will be on time, with a 93% confidence factor.

{
    "data": {
        "id": "JFK20201001",
        "probability": "0.928",
        "result": "0.80997550",
        "subType": "on-time",
        "type": "prediction"
    },
    "meta": {
        "links": {
            "self": "https://test.api.amadeus.com/v1/airport/predictions/on-time?airportCode=JFK&date=2020-10-01"
        }
    }
}

Amadeus Travel A.I. APIs — Summary

Amadeus provides a powerful collection of travel A.I. APIs that developers can use to take their applications to the next level. You can start testing and connecting to the Amadeus APIs for free on RapidAPI — be sure to let us know how you end up using these APIs in your projects!

Browse Amadeus APIs

5/5 - (1 vote)
Share
Published by

Recent Posts

Power Up Your Enterprise Hub: New March Release Boosts Admin Capabilities and Streamlines Integrations

We're thrilled to announce the latest update to the Rapid Enterprise API Hub (version 2024.3)!…

2 weeks ago

Unveiling User Intent: How Search Term Insights Can Empower Your Enterprise API Hub

Are you curious about what your API consumers are searching for? Is your Hub effectively…

2 weeks ago

Rapid Enterprise API Hub Levels Up Custom Branding, Monetization, and Management in February Release

The RapidAPI team is excited to announce the February 2024 update (version 2024.2) for the…

4 weeks ago

Supercharge Your Enterprise Hub with January’s Release: Search Insights, Login Flexibility, and More!

This January's release brings exciting features and improvements designed to empower you and your developers.…

3 months ago

Enhanced Functionality and Improved User Experience with the Rapid API Enterprise Hub November 2023 Release

Rapid API is committed to providing its users with the best possible experience, and the…

5 months ago

The Power of Supporting Multiple API Gateways in an API Marketplace Platform

In today's fast-paced digital world, APIs (Application Programming Interfaces) have become the backbone of modern…

6 months ago