SDKs overview
Amadeus for Developers offers a suite of Software Development Kits (SDKs) and client libraries designed to streamline the integration of its travel APIs. These SDKs are available for various programming languages, providing abstractions over direct HTTP requests, simplifying tasks such as authentication, request construction, and parsing API responses. The primary goal of these SDKs is to reduce boilerplate code and accelerate the development cycle for applications interacting with Amadeus for Developers services.
Developers can utilize these SDKs to access a range of Amadeus for Developers's API catalog, including functionalities for flight search, hotel booking, car rental, and airport/city information. The official SDKs are maintained by Amadeus for Developers, while a vibrant community also contributes various client libraries and tools.
Using an SDK can enhance developer experience by providing language-specific constructs, error handling mechanisms, and often, improved performance due to optimized request handling. For instance, an SDK might automatically refresh OAuth 2.0 access tokens, a common pattern for securing API interactions, without requiring manual implementation in the application code.
Official SDKs by language
Amadeus for Developers provides official SDKs for several popular programming languages, ensuring robust and documented support for developers. These SDKs are designed to align with the latest API versions and best practices recommended by Amadeus for Developers.
The table below outlines the officially supported SDKs, their respective package identifiers, typical installation commands, and their general maturity level as inferred from the Amadeus for Developers documentation:
| Language | Package/Repository | Typical Install Command | Maturity |
|---|---|---|---|
| Python | amadeus (PyPI) |
pip install amadeus |
Stable |
| Node.js | amadeus (npm) |
npm install amadeus |
Stable |
| Java | com.amadeus/amadeus-java (Maven/Gradle) |
(Add to pom.xml/build.gradle) |
Stable |
| PHP | amadeus/amadeus-php (Composer) |
composer require amadeus/amadeus-php |
Stable |
| .NET | Amadeus (NuGet) |
dotnet add package Amadeus |
Stable |
| Ruby | amadeus-ruby (RubyGems) |
gem install amadeus-ruby |
Stable |
Installation
Installing an Amadeus for Developers SDK typically involves using the package manager specific to your chosen programming language. Before installation, developers need to obtain API keys and secrets from the Amadeus for Developers console to authenticate their requests. The exact steps may vary slightly by language, but the general process is outlined below.
Python SDK Installation
To install the Python SDK, use pip, the Python package installer:
pip install amadeus
After installation, you can verify it by importing the library in a Python interpreter.
Node.js SDK Installation
For Node.js projects, use npm, the Node.js package manager:
npm install amadeus
This command adds the amadeus package to your project's node_modules directory and updates your package.json file.
Java SDK Installation
Java developers typically manage dependencies using Maven or Gradle. For Maven, add the following to your pom.xml:
<dependency>
<groupId>com.amadeus</groupId>
<artifactId>amadeus-java</artifactId>
<version>X.Y.Z</version> <!-- Replace with the latest version -->
</dependency>
For Gradle, add it to your build.gradle file:
implementation 'com.amadeus:amadeus-java:X.Y.Z' // Replace with the latest version
Refer to the Amadeus for Developers Java SDK documentation for the latest version number and detailed setup instructions.
PHP SDK Installation
PHP projects use Composer for dependency management:
composer require amadeus/amadeus-php
This command installs the PHP SDK and its dependencies, generating an autoloader file.
.NET SDK Installation
For .NET applications, use the NuGet package manager:
dotnet add package Amadeus
Alternatively, you can install it via the NuGet Package Manager Console in Visual Studio.
Ruby SDK Installation
Ruby projects use RubyGems to install libraries:
gem install amadeus-ruby
After installation, you can require the gem in your Ruby scripts.
Quickstart example
This quickstart example demonstrates how to use the Amadeus for Developers Python SDK to search for flights. This typically involves initializing the Amadeus client with your API credentials and then calling a specific API endpoint method.
Before running this example, ensure you have: installed the Python SDK using pip install amadeus, and obtained your Amadeus for Developers API Key and API Secret from your developer account.
from amadeus import Client, ResponseError
amadeus = Client(
client_id='YOUR_AMADEUS_API_KEY',
client_secret='YOUR_AMADEUS_API_SECRET'
)
try:
# Flight Search API: Find cheapest flights from London to Paris
# See Amadeus for Developers flight search API documentation for more details:
# https://developers.amadeus.com/self-service/category/flights/api-doc/flight-offers-search
response = amadeus.shopping.flight_offers_search.get(
originLocationCode='LHR',
destinationLocationCode='PAR',
departureDate='2026-08-01',
adults=1
)
# The data is available in the 'data' attribute of the response
print(response.data[0]) # Print the first flight offer
except ResponseError as error:
print(error)
This example initializes the Amadeus client with placeholder API credentials. In a production environment, these credentials should be stored securely, such as in environment variables, rather than hardcoded. The code then attempts to perform a flight search from London Heathrow (LHR) to Paris (PAR) on a specific date for one adult. The results are printed to the console. Error handling is included to catch potential issues during the API call.
Similar quickstart examples are available for other languages within the official Amadeus for Developers documentation, covering various APIs like hotel search and airport and city search.
Community libraries
While Amadeus for Developers provides official SDKs, the broader developer community also contributes various libraries and tools that can interact with the Amadeus for Developers APIs. These community-driven projects can offer alternative implementations, specialized functionalities, or support for additional programming languages or frameworks not officially covered.
Community libraries often emerge to address specific use cases, integrate with particular web frameworks (e.g., Django, Ruby on Rails, Express.js), or provide a different architectural approach to API interaction. Developers should exercise due diligence when considering community libraries, including reviewing their documentation, active maintenance, and community support on platforms like GitHub or Stack Overflow.
Examples of community contributions might include:
- Client libraries for less common languages: While Amadeus for Developers covers major languages, community members might build clients for languages like Go, Rust, or Dart.
- Framework-specific integrations: Libraries designed to work seamlessly within a particular web framework, abstracting away framework-agnostic API calls.
- CLI tools: Command-line interfaces built on top of the Amadeus for Developers APIs for quick testing or administrative tasks.
- Sample applications: More extensive examples or starter kits that demonstrate building a complete application using Amadeus for Developers APIs and a specific technology stack.
Developers are encouraged to seek out these resources on platforms like GitHub by searching for amadeus api client or similar terms. Although not officially supported, these libraries can sometimes offer valuable insights or solutions for niche requirements. Always verify the security practices and reliability of any third-party library before incorporating it into a production environment, especially when handling sensitive travel data, which often includes personally identifiable information (PII) according to GDPR guidelines.
For official support and guaranteed compatibility, developers should prioritize using the official Amadeus for Developers SDKs and documentation.