Amadeus API
Amadeus API looks up travel information in Amadeus: the cheapest dates to fly between two cities, hotels in a city, places from a name and activities near a point on the map. You pass it one or more items with the search details and the component returns them with the results added.
Use it in flows for travel agencies, event planning or business travel, when an agent or a process needs real travel data to answer or prepare a proposal.
When to use it
- A travel agency assistant that suggests the cheapest dates to fly from Madrid to Rome.
- Prepare a list of hotels in a city for a sales team’s trip.
- Fill in a city or airport code from the name the customer typed.
- Suggest activities near the hotel where a customer is staying.
Configuration
You need an Amadeus Travel API credential with the ID and secret of your Amadeus developer account. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The Amadeus Travel API credential. |
| Input | The details of each search. You can connect one or more items: the component runs one search per item. The data each kind of search needs is listed below. |
| Api Selection (required) | What you want to look up: Flight Offers Search (flights), Hotel Search (hotels), Location Search (places) or Activity Search (activities). |
| Default Currency | The currency for prices. Default: EUR. |
| Default Language | The language of the results. Default: en-US. |
Data for each search
Each item that reaches Input must carry these values, with these names:
| Search | Data |
|---|---|
Flight Offers Search | origin and destination, the city codes (for example MAD and ROM), and depart_date, the departure date in YYYY-MM-DD format. |
Hotel Search | city_code, the city code. Optional: rating, the number of stars (default 2), and radius_km, the distance from the centre in kilometres (default 10). |
Location Search | keyword, the name you are looking for; subtype, the kind of place (for example CITY or AIRPORT), and countryCode, the country code (for example ES). |
Activity Search | latitude and longitude of the point, and radius, the distance in kilometres. |
Output
The Data output returns the same items it received, each with a new field holding the list of results:
flightsfor the flight search: departure dates with their price.hotelsfor the hotel search.locationsfor the place search.activitiesfor the activity search, with at most 10 per item.
If Amadeus finds nothing or the search is not valid, the list comes back empty. You can pass the result to an agent to explain it to the customer, or to a component that turns it into text.
Example
An agency wants to answer customers who ask in the chat when it is cheapest to fly.
- An agent extracts the origin, destination and date from the customer’s message, with the names
origin,destinationanddepart_date. - Connect that result to Input on Amadeus API.
- In Api Selection choose
Flight Offers Searchand leave Default Currency asEUR. - Connect the Data output to an agent that writes the answer with the three cheapest dates.
Good practices
- Use
Location Searchbefore searching flights or hotels if your customers type city names: it gives you the code the other searches need. - For
Location SearchandActivity Search, send all the values in the table: these searches have no defaults. - If a list comes back empty, check that the codes and the date use the format shown above.