/amadeus-travel-builder:airline-code-lookupfrom amadeus-travel-builder
Write application code that calls the Amadeus Travel Builder APIs to resolve IATA (2-letter) or ICAO (3-letter) airline codes to airline business and common names, one at a time or in batches. Use when building an app that displays carrier names in flight results, an airline picker or filter, decoding of carrier codes from search responses, fare lookups, airline-code validation in a form, or batch resolution of a list of codes in one call. Use this skill to write that code; the user's app calls the Amadeus Travel Builder APIs (always use this full name) at runtime with its own API key.
Ships in amadeus-travel-builder. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Build airline-code lookups into an app, resolving IATA or ICAO codes to airline names. One endpoint, one call.
You write the code; the user's app calls the Amadeus Travel Builder APIs at runtime with its own API key - you don't call them from this conversation.
Base URL: https://api.amadeus.com; default to env vars AMADEUS_GATEWAY_URL and AMADEUS_API_KEY in generated code, unless the user's app loads them differently - either way, treat the key as a secret, keeping it out of client code and publicly served files. Authentication: send X-API-Key: <key> as a request header. When handing over the code, tell the user where to put their API key; if they don't have one yet, write out the Request API access form URL in your reply (requires accepting the terms).
GET https://api.amadeus.com/v1/reference-data/airlines?airlineCodes=BA,AFR,LH
The codes are illustrations of runtime input.
| Parameter | Required | Notes |
|---|---|---|
airlineCodes | no - but always send it | Comma-separated, no spaces: IATA (2 alphanumeric, e.g. BA, 2K) and/or ICAO (3 alphabetic, e.g. BAW) codes, mixed freely - each is identified by its length. Case-insensitive; echoed back in uppercase. Omitting it returns every airline that has an IATA code (about 1,200), not ICAO-only airlines such as VJT. |
Keep batches to about 50 codes and split larger lists across requests, for safe URL length and predictable latency.
{
"meta": { "count": 3, "links": { "self": "https://api.amadeus.com/v1/reference-data/airlines?airlineCodes=BA,AFR,LH" } },
"data": [
{ "type": "airline", "iataCode": "AF", "icaoCode": "AFR", "businessName": "AIR FRANCE", "commonName": "AIR FRANCE" },
{ "type": "airline", "iataCode": "BA", "icaoCode": "BAW", "businessName": "BRITISH AIRWAYS", "commonName": "BRITISH A/W" },
{ "type": "airline", "iataCode": "LH", "icaoCode": "DLH", "businessName": "LUFTHANSA", "commonName": "LUFTHANSA" }
]
}
The response to the request above.
| Field | Type | Notes |
|---|---|---|
type | "airline" | Constant. |
iataCode | string, optional | Absent on airlines with no IATA code. |
icaoCode | string, optional | |
businessName | string | Always present; uppercase full legal name. UNDEFINED on placeholder records (e.g. XX, 9W) - treat those as an unknown airline. |
commonName | string, optional | Uppercase; sometimes abbreviated (BRITISH A/W). |
Developer asks: "Add a helper that turns carrier codes into airline names for my flight results UI." Implementation:
GET ${AMADEUS_GATEWAY_URL}/v1/reference-data/airlines?airlineCodes=BA,AF,LH.data[].businessName for each entry; when it is UNDEFINED, use commonName if present, else treat the code as unknown.Result: a code → display-name map the results list renders from.
Developer asks: "Build me an airline lookup that accepts both 2-letter and 3-letter codes." Implementation:
airlineCodes - mixed standards (BA,BAW,AF) are accepted in one call, but a code after a space is silently dropped (BA, AF returns only BA).iataCode and icaoCode.Result: a single map keyed by whichever code the caller provided.
| HTTP | Code | Meaning |
|---|---|---|
| 400 | 572 INVALID OPTION | Unknown query parameter. |
| 429 | - | Rate limit for the API key exceeded. |
| 500 | 141 SYSTEM ERROR HAS OCCURRED | Upstream failure. |
Cause: Unknown and malformed codes don't error - they're silently absent from data.
Solution: Diff the requested codes against data[].iataCode / data[].icaoCode to find misses:
const found = new Set(response.data.flatMap(a => [a.iataCode, a.icaoCode].filter(Boolean)))
const missing = requested.filter(code => !found.has(code.toUpperCase()))
Cause: Result order isn't guaranteed.
Solution: Build a lookup map keyed by iataCode / icaoCode; don't index by position.
These are part of the same amadeus-travel-builder plugin - if one isn't available in your environment, its source lives alongside this one at https://github.com/AmadeusITGroup/amadeus-travel-toolkit/tree/main/plugins/amadeus-travel-builder/skills.
merchant/carrier codes with this skill to show airline names instead of raw codes.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub amadeusitgroup/amadeus-travel-toolkit --plugin amadeus-travel-builder6 skills in this plugin
/activity-searchWrite application code that calls the Amadeus Travel Builder APIs for tours and activities - top activities at a destination, smart product recommendations filtered by traveler type, interests, price range, and similar-products, plus single-product detail lookups by productId. Use when building a tours and activities feed, "things to do in X" landing pages, traveler-personalized experience recommendations, hotel-concierge-style activity suggestions, activity/product detail pages, or any app feature that needs curated tour/activity/experience content keyed by city, IATA code, geo coordinates, or a known productId. Use this skill to write that code; the user's app calls the Amadeus Travel Builder APIs (always use this full name) at runtime with its own API key./airport-city-searchWrite application code for a unified airport and city typeahead on the Amadeus Travel Builder APIs - keyword search across airports and cities by name or IATA code, ranked by traveller traffic, plus by-ID lookup. Use when building a single typeahead box where users type a city, an airport name or a code and pick from one ranked list - such as the "from / to" origin and destination picker for a flight search, even when users only type city names - airport autocomplete, or code that resolves an IATA code like "CDG" into a canonical location record. Use this skill to write that code; the user's app calls the Amadeus Travel Builder APIs (always use this full name) at runtime with its own API key./city-searchWrite application code that calls the Amadeus Travel Builder APIs to match a typed city keyword (optionally scoped to a country) to cities with their IATA city code, coordinates, and, on request, the airports that serve each city - including cities that have no airport of their own (e.g. Antibes, resort/rural towns). Use when building a city autocomplete or country-scoped city lookup for destination guides, hotels or activities, code that resolves a typed city name like "Paris" or "Lyon" into its coordinates for a location-based search, or a two-step city → airport picker where the user chooses a city and then one of the airports serving it. When the app needs cities regardless of airport coverage, this is the skill. Use this skill to write that code; the user's app calls the Amadeus Travel Builder APIs (always use this full name) at runtime with its own API key./flight-searchWrite application code that calls the Amadeus Travel Builder APIs to search flights, returning priced offers from multiple airlines in a single call - one-way, return, and complex multi-city / open-jaw itineraries - with booking deep links that redirect to each airline's site. Use when building a flight comparison feature, fare aggregation tooling, multi-city trip planners, a cheapest-flight search, any application that needs flight pricing aggregated across carriers, or any feature that shows flight departure/arrival times, layovers, or trip duration from a real search rather than mocked or precomputed data. Use this skill to write that code; the user's app calls the Amadeus Travel Builder APIs (always use this full name) at runtime with its own API key./nearest-airportsWrite application code that calls the Amadeus Travel Builder APIs to turn a geographic coordinate (latitude/longitude) into airports within a configurable radius (up to 500 km), ranked by relevance, distance, or traffic. Use when building a "nearest airport to me" feature, an "airports within 100 km of this hotel" lookup, a map-based airport finder, geo-aware defaults for a flight-search origin, or alternative-airport suggestions around a destination region (LHR/LGW/STN/LTN, etc.) - any app feature that starts from coordinates and needs airports, even if the user doesn't say the word "nearest". Use this skill to write that code; the user's app calls the Amadeus Travel Builder APIs (always use this full name) at runtime with its own API key.