Skip to content


Java SDK

Amadeus Java SDK for the Self-Service APIs is available as a Maven dependency, which the Amadeus for Developers team is continuously updating as the new APIs and features get released.

You can refer to the Amadeus Java SDK or Amadeus Maven dependency for the detailed changelog.


The SDK can be easily installed using your preferred build automation tool, such as Maven or Gradle:




compile "com.amadeus:amadeus-java:7.0.0"

Further information:

You can check the library in the Maven repository for futher information.

Step-by-step example

This tutorial will guide you through the process of creating a simple Java application which calls the Flight Inspiration Search API using the Amadeus for Developers Java SDK.

Using the Amadeus Java SDK

For this tutorial we will use Unix-based commands. Windows has similar commands for each task.

The requirements to follow this tutorial include:

  • Your favorite editor
  • Java installed
  • A build automation tool, such as Maven
  • Amadeus for Developers API key

Let's do something cool by calling one of our Flight Search APIs from your Java code.

To help you get started, we have created a small Maven skeleton that is ready to use.

Let's create a class in the package edu.amadeus.sdk with the following content:

package edu.amadeus.sdk;

import com.amadeus.Amadeus;
import com.amadeus.Params;

import com.amadeus.exceptions.ResponseException;

import com.amadeus.resources.FlightDestination;

public class FlightSearch {
    public static void main(String[] args) throws ResponseException {
        Amadeus amadeus = Amadeus.builder(System.getenv()).build();

        Params params = Params.with("origin", "MAD");

        FlightDestination[] flightDestinations =;

        if (flightDestinations[0].getResponse().getStatusCode() != 200) {
            System.out.println("Wrong status code for Flight Inspiration Search: " + flightDestinations[0].getResponse().getStatusCode());


Before testing the example, export your credentials in your terminal:


Let's build and run the code to make sure that everything is working properly:

./mvnw compile exec:java -Dexec.mainClass="edu.amadeus.sdk.FlightSearch"

[INFO] Scanning for projects...
[INFO] ------------< edu.amadeus.sdk:amadeus-java-getting-started >------------
[INFO] Building amadeus-java-getting-started 0.1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ amadeus-java-getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ amadeus-java-getting-started ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /amadeus-java-getting-started/target/classes
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ amadeus-java-getting-started ---
FlightDestination(type=flight-destination, origin=MAD, destination=OPO, departureDate=Mon Oct 03 00:00:00 CEST 2022, returnDate=Tue Oct 18 00:00:00 CEST 2022, price=FlightDestination.Price(total=41.81))
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.407 s
[INFO] Finished at: 2022-09-19T12:36:39+02:00
[INFO] ------------------------------------------------------------------------

As you see in the example, the main method instantiates an Amadeus object, taking the credentials from the following environment:

Amadeus amadeus = Amadeus.builder(System.getenv()).build();

In order to use the method, you need to pass a Params object as in the below example:

Params params = Params.with("origin", "MAD");
FlightDestination[] flightDestinations =;

The method will return an Array with the results:


Now that you've tried out this example and know how to use the objects, you can review the Javadocs in this SDK and discover new ways to use it.

Video Tutorial

You can also check the video tutorial on how to get started with the Java SDK.

Managing API rate limits

Amadeus Self-Service APIs have rate limits in place to protect against abuse by third parties. You can find Rate limit example in Java using the Amadeus Java SDK here.

Last update: April 15, 2024