Skip to main content

Python module for the Amadeus travel APIs

Project description

Module Version Build Status Maintainability Dependencies Contact Support

Amadeus provides a set of APIs for the travel industry. Flights, Hotels, Locations and more.

For more details see the Amadeus for Developers Portal and the class reference here on GitHub.


This SDK requires Python 2.7+ or 3.4+. You can install it directly with pip.

pip install amadeus

You can also add it to your requirements.txt file and install using:

pip install -r requirements.txt

Getting Started

To make your first API call you will need to register for an Amadeus Developer Account and set up your first application.

from amadeus import Client, ResponseError

amadeus = Client(

    response = amadeus.reference_data.urls.checkin_links.get(airlineCode='BA')
except ResponseError as error:


The client can be initialized directly.

# Initialize using parameters
amadeus = Client(client_id='REPLACE_BY_YOUR_API_KEY', client_secret='REPLACE_BY_YOUR_API_SECRET')

Alternatively it can be initialized without any parameters if the environment variables AMADEUS_CLIENT_ID and AMADEUS_CLIENT_SECRET are present.

amadeus = Client()

Your credentials can be found on the Amadeus dashboard. Sign up for an account today.

By default the environment for the SDK is the test environment. To switch to a production (paid-for) environment please switch the hostname as follows:

amadeus = Client(hostname='production')


Amadeus has a large set of APIs, and our documentation is here to get you started today. Head over to our Reference documentation for in-depth information about every SDK method, its arguments and return types.

Making API calls

This library conveniently maps every API path to a similar path.

For example, GET /v2/reference-data/urls/checkin-links?airlineCode=BA would be:


Similarly, to select a resource by ID, you can pass in the ID to the singular path.

For example, GET /v2/shopping/hotel-offers/XZY would be:'4BA070CE929E135B3268A9F2D0C51E9D4A6CF318BA10485322FA2C7E78C7852E').get()

You can make any arbitrary API call as well directly with the .get method:

amadeus.get('/v2/reference-data/urls/checkin-links', airlineCode='BA')


Every API call returns a Response object. If the API call contained a JSON response it will parse the JSON into the .result attribute. If this data also contains a data key, it will make that available as the .data attribute. The raw body of the response is always available as the .body attribute.

from amadeus import Location

response = amadeus.reference_data.locations.get(

print(response.body) #=> The raw response, as a string
print(response.result) #=> The body parsed as JSON, if the result was parsable
print( #=> The list of locations, extracted from the JSON

Logging & Debugging

The SDK makes it easy to add your own logger.

import logging

logger = logging.getLogger('your_logger')

amadeus = Client(

Additionally, to enable more verbose logging, you can set the appropriate level on your own logger, though the easiest way would be to enable debugging via a parameter on initialization, or using the AMADEUS_LOG_LEVEL environment variable.

amadeus = Client(

List of supported endpoints

# Flight Inspiration Search'MAD')

# Flight Cheapest Date Search'MAD', destination='MUC')

# Flight Low-fare Search'MAD', destination='NYC', departureDate='2019-08-01')

# Flight Checkin Links

# Airline Code Lookup

# Airport and City Search (autocomplete)
# Find all the cities and airports starting by 'LON'
amadeus.reference_data.locations.get(keyword='LON', subType=Location.ANY)
# Get a specific city or airport based on its id

# Airport Nearest Relevant Airport (for London)
amadeus.reference_data.locations.airports.get(longitude=0.1278, latitude=51.5074)

# Flight Most Searched Destinations
# Which were the most searched flight destinations from Madrid in August 2017?'MAD', marketCountryCode='ES', searchPeriod='2017-08')
# How many people in Spain searched for a trip from Madrid to New-York in September 2017?'MAD', destinationCityCode='NYC', marketCountryCode='ES', searchPeriod='2017-08')

# Flight Most Booked Destinations'MAD', period='2017-08')

# Flight Most Traveled Destinations'MAD', period='2017-01')

# Flight Busiest Travel Period'MAD', period='2017', direction='ARRIVING')

# Hotel Search
# Get list of Hotels by city code = 'LON')
# Get list of offers for a specific hotel = 'IALONCHO')
# Confirm the availability of a specific offer'D5BEE9D0D08B6678C2F5FAD910DC110BCDA187D21D4FCE68ED423426D0A246BB').get()
# Point of Interest
# What are the popular places in Barcelona (based a geo location and a radius)
amadeus.reference_data.locations.points_of_interest.get(latitude=41.397158, longitude=2.160873)
# What are the popular places in Barcelona? (based on a square)
amadeus.reference_data.locations.points_of_interest.by_square.get(north=41.397158, west=2.160873, south=41.394582, east=2.177181)

Development & Contributing

Want to contribute? Read our Contributors Guide for guidance on installing and running this code in a development environment.


This library is released under the MIT License.


Our developer support team is here to help you. You can find us on StackOverflow, and email.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
amadeus-3.1.0-py2.py3-none-any.whl (38.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3
amadeus-3.1.0.tar.gz (23.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page