{"id":37026210,"url":"https://github.com/amadeus4dev/amadeus-java","last_synced_at":"2026-01-14T03:02:39.594Z","repository":{"id":38431776,"uuid":"128417389","full_name":"amadeus4dev/amadeus-java","owner":"amadeus4dev","description":"Java library for the Amadeus Self-Service travel APIs","archived":false,"fork":false,"pushed_at":"2024-04-09T14:09:38.000Z","size":1420,"stargazers_count":80,"open_issues_count":9,"forks_count":68,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-04-09T18:03:53.183Z","etag":null,"topics":["ai","amadeus","api","flights","hotels","java-library","library","sdk","self-service","travel","travel-content","travel-insight"],"latest_commit_sha":null,"homepage":"https://developers.amadeus.com/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amadeus4dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-04-06T16:11:43.000Z","updated_at":"2024-04-15T03:52:02.824Z","dependencies_parsed_at":"2024-04-15T03:52:00.475Z","dependency_job_id":"a2985ef7-a2a0-420f-9dff-5a2afefead67","html_url":"https://github.com/amadeus4dev/amadeus-java","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/amadeus4dev/amadeus-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev%2Famadeus-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev%2Famadeus-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev%2Famadeus-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev%2Famadeus-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amadeus4dev","download_url":"https://codeload.github.com/amadeus4dev/amadeus-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev%2Famadeus-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","amadeus","api","flights","hotels","java-library","library","sdk","self-service","travel","travel-content","travel-insight"],"created_at":"2026-01-14T03:02:38.400Z","updated_at":"2026-01-14T03:02:39.580Z","avatar_url":"https://github.com/amadeus4dev.png","language":"Java","readme":"# Amadeus Java SDK\n\n[![Build](https://github.com/amadeus4dev/amadeus-java/actions/workflows/build_gradle.yml/badge.svg?branch=master)](https://github.com/amadeus4dev/amadeus-java/actions/workflows/build_gradle.yml)\n[![Discord](https://img.shields.io/discord/696822960023011329?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)](https://discord.gg/cVrFBqx)\n\nAmadeus provides a rich set of APIs for the travel industry. For more details, check out the [Amadeus for Developers Portal](https://developers.amadeus.com) or the [SDK class reference](https://amadeus4dev.github.io/amadeus-java/).\n\n## Installation\n\nThis library requires Java 1.7+ and the [Gson library](https://github.com/google/gson). You can install the SDK via Maven or Gradle:\n\n#### Maven\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.amadeus\u003c/groupId\u003e\n  \u003cartifactId\u003eamadeus-java\u003c/artifactId\u003e\n  \u003cversion\u003e10.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n#### Gradle\n```js\ncompile \"com.amadeus:amadeus-java:10.0.0\"\n```\n\n## Getting Started\n\nTo make your first API call, you will need to [register](https://developers.amadeus.com/register) for an Amadeus Developer Account and [set up your first application](https://developers.amadeus.com/my-apps).\n\n```java\nimport com.amadeus.Amadeus;\nimport com.amadeus.Params;\n\nimport com.amadeus.exceptions.ResponseException;\nimport com.amadeus.referenceData.Locations;\nimport com.amadeus.resources.Location;\n\npublic class AmadeusExample {\n  public static void main(String[] args) throws ResponseException {\n    Amadeus amadeus = Amadeus\n            .builder(\"REPLACE_BY_YOUR_API_KEY\", \"REPLACE_BY_YOUR_API_SECRET\")\n            .build();\n\n    Location[] locations = amadeus.referenceData.locations.get(Params\n      .with(\"keyword\", \"LON\")\n      .and(\"subType\", Locations.ANY));\n\n    System.out.println(locations);\n  }\n}\n```\n\nExamples\n--------------------------\nYou can find all the endpoints in self-contained [code examples](https://github.com/amadeus4dev/amadeus-code-examples).\n## Initialization\n\nThe client can be initialized directly:\n\n```java\n//Initialize using parameters\nAmadeus amadeus = Amadeus\n        .builder(\"REPLACE_BY_YOUR_API_KEY\", \"REPLACE_BY_YOUR_API_SECRET\")\n        .build();\n```\n\nAlternatively, it can be initialized without any parameters if the environment variables `AMADEUS_CLIENT_ID` and `AMADEUS_CLIENT_SECRET` are present.\n\n```java\nAmadeus amadeus = Amadeus\n        .builder(System.getenv())\n        .build();\n```\n\nYour credentials can be found on the [Amadeus dashboard](https://developers.amadeus.com/my-apps).\n\nBy default the SDK is set to `test` environment. To switch to a `production` (pay-as-you-go) environment, please switch the hostname as follows:\n\n```java\nAmadeus amadeus = Amadeus\n        .builder(System.getenv())\n        .setHostname(\"production\")\n        .build();\n```\n\n## Documentation\n\nAmadeus has a large set of APIs, and our documentation is here to get you started. Head over to our [reference documentation](https://amadeus4dev.github.io/amadeus-java/) for in-depth information about every SDK method, its arguments and return types.\n\n## Making API calls\n\nThis library conveniently maps every API path to a similar path. For example, `GET /v2/reference-data/urls/checkin-links?airlineCode=BA` would be:\n\n```java\namadeus.referenceData.urls.checkinLinks.get(Params.with(\"airlineCode\", \"BA\"));\n```\n\nSimilarly, to select a resource by ID, you can pass in the ID to the **singular** path. For example,  `GET v1/reference-data/locations/pois` would be:\n\n```java\namadeus.referenceData.locations.pointOfInterest(\"9CB40CB5D0\").get();\n```\n\nYou can make any arbitrary API call as well directly with the `.get` method.\nKeep in mind, this returns a raw `Resource`.\n\n```java\nResponse response = amadeus.get(\"/v2/reference-data/urls/checkin-links\", Params.with(\"airlineCode\", \"BA\"));\n\nresponse.getResult();\n```\n\nOr, with POST method:\n\n```java\nResponse response = amadeus.post(\"/v1/shopping/availability/flight-availabilities\", body);\n```\n\n## Response\n\nEvery successful API call returns a `Resource` object. The `Resource` object has the raw response body (in string format) available:\n\n```java\nLocation[] locations = amadeus.referenceData.locations.get(Params\n  .with(\"keyword\", \"LON\")\n  .and(\"subType\", Locations.ANY));\n\n // The raw response, as a string\nlocations[0].getResponse().getBody();\n```\n\n## Pagination\n\nIf an API endpoint supports pagination, the other pages are available under the\n`.next`, `.previous`, `.last` and `.first` methods.\n\n```java\nLocation[] locations = amadeus.referenceData.locations.get(Params\n  .with(\"keyword\", \"LON\")\n  .and(\"subType\", Locations.ANY));\n\n// Fetches the next page\nLocation[] locations = (Location[]) amadeus.next(locations[0]);\n```\n\nIf a page is not available, the method will return `null`.\n\n## Logging \u0026 Debugging\n\nThe SDK makes it easy to add your own logger.\n\n```java\nimport java.util.logging.Logger;\n\n// Assumes the current class is called MyLogger\nprivate final static Logger LOGGER = Logger.getLogger(MyLogger.class.getName());\n\n...\n\nAmadeus amadeus = Amadeus\n        .builder(\"REPLACE_BY_YOUR_API_KEY\", \"REPLACE_BY_YOUR_API_SECRET\")\n        .setLogger(LOGGER)\n        .build();\n)\n```\n\nAdditionally, to enable more verbose logging, you can set the appropriate level on your own logger. The easiest way would be to enable debugging via a parameter during initialization, or using the `AMADEUS_LOG_LEVEL` environment variable.\n\n```java\nAmadeus amadeus = Amadeus\n        .builder(\"REPLACE_BY_YOUR_API_KEY\", \"REPLACE_BY_YOUR_API_SECRET\")\n        .setLogLevel(\"debug\") // or warn\n        .build();\n```\n\n## List of supported endpoints\n```java\n// Flight Inspiration Search\nFlightDestination[] flightDestinations = amadeus.shopping.flightDestinations.get(Params\n  .with(\"origin\", \"MAD\"));\n\n// Flight Cheapest Date Search\nFlightDate[] flightDates = amadeus.shopping.flightDates.get(Params\n  .with(\"origin\", \"MAD\")\n  .and(\"destination\", \"MUC\"));\n\n// Flight Offers Search v2 GET\nFlightOfferSearch[] flightOffersSearches = amadeus.shopping.flightOffersSearch.get(\n              Params.with(\"originLocationCode\", \"SYD\")\n                      .and(\"destinationLocationCode\", \"BKK\")\n                      .and(\"departureDate\", \"2023-11-01\")\n                      .and(\"returnDate\", \"2023-11-08\")\n                      .and(\"adults\", 2)\n                      .and(\"max\", 3));\n\n// Flight Offers Search v2 POST\n// body can be a String version of your JSON or a JsonObject\nFlightOfferSearch[] flightOffersSearches = amadeus.shopping.flightOffersSearch.post(body);\n\n// Flight Order Management\n// The flightOrderID comes from the Flight Create Orders (in test environment it's temporary)\n// Retrieve a flight order\nFlightOrder order = amadeus.booking.flightOrder(\"eJzTd9f3NjIJdzUGAAp%2fAiY=\").get();\n// Cancel a flight order\nResponse order = amadeus.booking.flightOrder(\"eJzTd9f3NjIJdzUGAAp%2fAiY=\").delete();\n\n// Flight Offers price\nFlightPrice[] flightPricing = amadeus.shopping.flightOffersSearch.pricing.post(\n                    body,\n                    Params.with(\"include\", \"other-services\")\n                          .and(\"forceClass\", \"false\"));\n\n// Flight Choice Prediction\n// Note that the example calls 2 APIs: Flight Offers Search \u0026 Flight Choice Prediction\nFlightOfferSearch[] flightOffers = amadeus.shopping.flightOffersSearch.get(\n              Params.with(\"originLocationCode\", \"NYC\")\n                      .and(\"destinationLocationCode\", \"MAD\")\n                      .and(\"departureDate\", \"2024-04-01\")\n                      .and(\"returnDate\", \"2024-04-08\")\n                      .and(\"adults\", 1));\n\n// Using a JSonObject\nJsonObject result = flightOffers[0].getResponse().getResult();\nFlightOfferSearch[] flightOffersPrediction = amadeus.shopping.flightOffers.prediction.post(result);\n\n// Using a String\nString body = flightOffers[0].getResponse().getBody();\nFlightOfferSearch[] flightOffersPrediction = amadeus.shopping.flightOffers.prediction.post(body);\n\n// Flight Check-in Links\nCheckinLink[] checkinLinks = amadeus.referenceData.urls.checkinLinks.get(Params\n  .with(\"airlineCode\", \"BA\"));\n\n// Airline Code LookUp\nAirline[] airlines = amadeus.referenceData.airlines.get(Params\n  .with(\"airlineCodes\", \"BA\"));\n\n// Airport \u0026 City Search (autocomplete)\n// Find all the cities and airports starting by the keyword 'LON'\nLocation[] locations = amadeus.referenceData.locations.get(Params\n  .with(\"keyword\", \"LON\")\n  .and(\"subType\", Locations.ANY));\n// Get a specific city or airport based on its id\nLocation location = amadeus.referenceData\n  .location(\"ALHR\").get();\n\n// Airport Nearest Relevant (for London)\nLocation[] locations = amadeus.referenceData.locations.airports.get(Params\n  .with(\"latitude\", 0.1278)\n  .and(\"longitude\", 51.5074));\n\n// City Search\nCity[] cities = amadeus.referenceData.locations.cities.get(Params\n  .with(\"keyword\",\"PARIS\"));\n\n// Flight Most Booked Destinations\nAirTraffic[] airTraffics = amadeus.travel.analytics.airTraffic.booked.get(Params\n  .with(\"originCityCode\", \"MAD\")\n  .and(\"period\", \"2017-08\"));\n\n// Flight Most Traveled Destinations\nAirTraffic[] airTraffics = amadeus.travel.analytics.airTraffic.traveled.get(Params\n  .with(\"originCityCode\", \"MAD\")\n  .and(\"period\", \"2017-01\"));\n\n// Flight Busiest Traveling Period\nPeriod[] busiestPeriods = amadeus.travel.analytics.airTraffic.busiestPeriod.get(Params\n  .with(\"cityCode\", \"MAD\")\n  .and(\"period\", \"2017\")\n  .and(\"direction\", BusiestPeriod.ARRIVING));\n\n// Points of Interest\n// What are the popular places in Barcelona (based a geo location and a radius)\nPointOfInterest[] pointsOfInterest = amadeus.referenceData.locations.pointsOfInterest.get(Params\n   .with(\"latitude\", \"41.39715\")\n   .and(\"longitude\", \"2.160873\"));\n\n// What are the popular places in Barcelona? (based on a square)\nPointOfInterest[] pointsOfInterest = amadeus.referenceData.locations.pointsOfInterest.bySquare.get(Params\n    .with(\"north\", \"41.397158\")\n    .and(\"west\", \"2.160873\")\n    .and(\"south\", \"41.394582\")\n    .and(\"east\", \"2.177181\"));\n\n// Returns a single Point of Interest from a given id\nPointOfInterest pointOfInterest = amadeus.referenceData.locations.pointOfInterest(\"9CB40CB5D0\").get();\n\n// Tours and Activities\n// What are the popular activities in Barcelona (based a geo location and a radius)\nActivity[] activities = amadeus.shopping.activities.get(Params\n   .with(\"latitude\", \"41.39715\")\n   .and(\"longitude\", \"2.160873\"));\n\n// What are the popular activities in Barcelona? (based on a square)\nActivity[] activities = amadeus.shopping.activities.bySquare.get(Params\n    .with(\"north\", \"41.397158\")\n    .and(\"west\", \"2.160873\")\n    .and(\"south\", \"41.394582\")\n    .and(\"east\", \"2.177181\"));\n\n// Returns a single activity from a given id\nActivity activity = amadeus.shopping.activity(\"4615\").get();\n\n// What's the likelihood flights from this airport will leave on time?\nPrediction AirportOnTime = amadeus.airport.predictions.onTime.get(Params\n    .with(\"airportCode\", \"NCE\")\n    .and(\"date\", \"2024-04-01\"));\n\n// What's the likelihood of a given flight to be delayed?\nPrediction[] flightDelay = amadeus.travel.predictions.flightDelay.get(Params\n    .with(\"originLocationCode\", \"NCE\")\n    .and(\"destinationLocationCode\", \"IST\")\n    .and(\"departureDate\", \"2020-08-01\")\n    .and(\"departureTime\", \"18:20:00\")\n    .and(\"arrivalDate\", \"2020-08-01\")\n    .and(\"arrivalTime\", \"22:15:00\")\n    .and(\"aircraftCode\", \"321\")\n    .and(\"carrierCode\", \"TK\")\n    .and(\"flightNumber\", \"1816\")\n    .and(\"duration\", \"PT31H10M\"));\n\n// Flight Create Orders to book a flight\n// Using a JSonObject or String\nFlightOrder createdOrder = amadeus.booking.flightOrders.post(body);\n\n// Using a JsonObject for flight offer and Traveler[] as traveler information\n// see example at src/main/java/examples/flight/createorders/FlightCreateOrders.java\nFlightOrder createdOrder = amadeus.booking.flightOrders.post(flightOffersSearches, travelerArray);\n\n// What is the the seat map of a given flight?\nSeatMap[] seatmap = amadeus.shopping.seatMaps.get(Params\n    .with(\"flight-orderId\", \"eJzTd9f3NjIJdzUGAAp%2fAiY=\"));\n\n// What is the the seat map of a given flight?\n// The body can be a String version of your JSON or a JsonObject\nSeatMap[] seatmap = amadeus.shopping.seatMaps.post(body);\n\n// Trip Purpose Prediction\nPrediction tripPurpose = amadeus.travel.predictions.tripPurpose.get(Params\n    .with(\"originLocationCode\", \"NYC\")\n    .and(\"destinationLocationCode\", \"MAD\")\n    .and(\"departureDate\", \"2024-04-01\")\n    .and(\"returnDate\", \"2024-04-08\"));\n\n// Travel Recommendations\nLocation destinations = amadeus.referenceData.recommendedLocations.get(Params\n    .with(\"cityCodes\", \"PAR\")\n    .and(\"travelerCountryCode\", \"FR\"));\n\n// On Demand Flight Status\nDatedFlight[] flightStatus = amadeus.schedule.flights.get(Params\n    .with(\"carrierCode\", \"AZ\")\n    .and(\"flightNumber\", \"319\")\n    .and(\"scheduledDepartureDate\", \"2024-03-13\"));\n\n// Flight Price Analysis\nItineraryPriceMetric[] metrics = amadeus.analytics.itineraryPriceMetrics.get(Params\n    .with(\"originIataCode\", \"MAD\")\n    .and(\"destinationIataCode\", \"CDG\")\n    .and(\"departureDate\", \"2024-03-21\"));\n\n// Airport Routes\nDestination[] directDestinations = amadeus.airport.directDestinations.get(Params\n    .with(\"departureAirportCode\",\"MAD\")\n    .and(\"max\",\"2\"));\n\n// Flight Availabilites Search POST\n// body can be a String version of your JSON or a JsonObject\nFlightAvailability[] flightAvailabilities\n  = amadeus.shopping.availability.flightAvailabilities.post(body);\n\n\n// Location Score GET\nScoredLocation[] scoredLocations\n  = amadeus.location.analytics.categoryRatedAreas.get(Params\n      .with(\"latitude\", \"41.397158\")\n      .and(\"longitude\", \"2.160873\"));\n\n// Branded Fares Upsell Post\n// body can be a String version of your JSON or a JsonObject\nFlightOfferSearch[] upsellFlightOffers\n  = amadeus.shopping.flightOffers.upselling.post(body);\n\n// Hotel List\n// Get list of hotels by hotel id\nHotel[] hotels = amadeus.referenceData.locations.hotels.byHotels.get(Params\n  .with(\"hotelIds\", \"ADPAR001\"));\n// Get list of hotels by city code\nHotel[] hotels = amadeus.referenceData.locations.hotels.byCity.get(Params\n  .with(\"cityCode\", \"PAR\"));\n// Get list of hotels by a geocode\nHotel[] hotels = amadeus.referenceData.locations.hotels.byGeocode.get(Params\n  .with(\"longitude\", 2.160873)\n  .and(\"latitude\", 41.397158));\n\n// Hotel autocomplete names\nHotel[] result = amadeus.referenceData.locations.hotel.get(Params\n  .with(\"keyword\", \"PARI\")\n  .and(\"subType\", \"HOTEL_GDS\")\n  .and(\"countryCode\", \"FR\")\n  .and(\"lang\", \"EN\")\n  .and(\"max\", \"20\"));\n\n// Hotel Offers Search API v3\n// Get multiple hotel offers\nHotelOfferSearch[] offers = amadeus.shopping.hotelOffersSearch.get(Params\n  .with(\"hotelIds\", \"MCLONGHM\")\n  .and(\"adults\", 1)\n  .and(\"checkInDate\", \"2023-11-22\")\n  .and(\"roomQuantity\", 1)\n  .and(\"paymentPolicy\", \"NONE\")\n  .and(\"bestRateOnly\", true));\n// Get hotel offer pricing by offer id\nHotelOfferSearch offer = amadeus.shopping.hotelOfferSearch(\"QF3MNOBDQ8\").get();\n\n// Hotel Booking\n// The body can be a String version of your JSON or a JsonObject\nHotelBooking[] hotel = amadeus.booking.hotelBookings.post(body);\n\n// Hotel Booking v2\nHotelOrder hotel = amadeus.booking.hotelOrders.post(body);\n\n// Hotel Ratings / Sentiments\nHotelSentiment[] hotelSentiments = amadeus.ereputation.hotelSentiments.get(Params.with(\"hotelIds\", \"ELONMFS,ADNYCCTB\"));\n\n// Airline Routes\n// Get airline destinations\nDestination[] destinations = amadeus.airline.destinations.get(Params\n  .with(\"airlineCode\", \"BA\")\n  .and(\"max\", 2));\n\n// Transfer Search\nTransferOffersPost[] transfers = amadeus.shopping.transferOffers.post(body);\n\n// Transfer Booking\nTransferOrder transfers = amadeus.ordering.transferOrders.post(body, params);\n\n// Transfer Management\nTransferCancellation transfers = amadeus.ordering.transferOrder(\"123456\").transfers.cancellation.post(params);\n```\n\n## Development \u0026 Contributing\n\nWant to contribute? Read our [Contributors Guide](.github/CONTRIBUTING.md) for\nguidance on installing and running this code in a development environment.\n\n\n## License\n\nThis library is released under the [MIT License](LICENSE).\n\n## Help\n\nYou can find us on [StackOverflow](https://stackoverflow.com/questions/tagged/amadeus) or join our developer community on\n[Discord](https://discord.gg/cVrFBqx).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famadeus4dev%2Famadeus-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famadeus4dev%2Famadeus-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famadeus4dev%2Famadeus-java/lists"}