"Airport & City Search API skill. Use when working with Airport & City Search for reference-data. Covers 2 endpoints."
Resources
1Install
npx skillscat add lap-platform/claude-marketplace/airport-city-search Install via the SkillsCat registry.
SKILL.md
Airport & City Search
API version: 1.2.3
Auth
No authentication required.
Base URL
https://test.api.amadeus.com/v1
Setup
- No auth setup needed
- GET /reference-data/locations -- verify access
Endpoints
2 endpoints across 1 groups. See references/api-spec.lap for full details.
reference-data
| Method | Path | Description |
|---|---|---|
| GET | /reference-data/locations | Returns a list of airports and cities matching a given keyword. |
| GET | /reference-data/locations/{locationId} | Returns a specific airports or cities based on its id. |
Enhanced Skill Content
Question Mapping
- "Find airports near Paris?" -> GET /reference-data/locations
- "What is the IATA code for Los Angeles airport?" -> GET /reference-data/locations
- "Search for cities matching 'New York'?" -> GET /reference-data/locations
- "List airports in Germany?" -> GET /reference-data/locations
- "Get details for location ID ALHR?" -> GET /reference-data/locations/{locationId}
- "What airports match the keyword 'LON'?" -> GET /reference-data/locations
- "Find all airports in a specific country?" -> GET /reference-data/locations
- "Look up a specific airport by its ID?" -> GET /reference-data/locations/{locationId}
- "Search for cities and airports together?" -> GET /reference-data/locations
- "Sort airport search results by analytics?" -> GET /reference-data/locations
- "Get the full detail view of a location?" -> GET /reference-data/locations/{locationId}
- "Which airports match a partial name like 'frank'?" -> GET /reference-data/locations
- "Verify an airport code exists?" -> GET /reference-data/locations/{locationId}
Response Tips
- Search results (
GET /locations): Results are in adataarray. Each item includestype,subType(AIRPORT or CITY),name,iataCode, and nestedaddress/geoCodeobjects. Use theviewparam (LIGHTorFULL) to control response detail level. - Single location (
GET /locations/{id}): Returns a single object indata. A 404 means the location ID does not exist -- check for typos in the IATA/location code.
Anomaly Flags
- 400 errors: Surface the
detailfield from error responses -- usually indicates missingsubTypeorkeywordparams, which are both required for search. - 404 on location lookup: Proactively suggest verifying the location ID format and checking for common IATA code confusion (city code vs airport code, e.g.,
NYCvsJFK). - Empty results: If a search returns an empty
dataarray, suggest broadening the keyword or checkingcountryCodefilter. - Rate limits: Amadeus test environment has strict rate limits. Surface
X-RateLimit-Remainingheaders when available and warn when approaching zero. - Auth expiry: Amadeus OAuth tokens expire (typically 1799s). Flag
401responses and prompt re-authentication.
Playbook
1. Search for Airports in a Country
- Call
GET /reference-data/locationswithsubType=AIRPORT,keywordmatching your search term, andcountryCodeset to the ISO country code (e.g.,DEfor Germany). - Review the
dataarray for matching airports. - Use
sort=analytics.travelers.scoreto rank by popularity if needed. - For full address and geo coordinates, add
view=FULL.
2. Look Up a Specific Location by Code
- Identify the location ID (typically the IATA code, e.g.,
ALHR). - Call
GET /reference-data/locations/{locationId}with the ID. - Parse the
dataobject for name, coordinates, city, and country info. - If you get a 404, fall back to a keyword search via
GET /reference-data/locations.
3. Find the Nearest Airport to a City
- Call
GET /reference-data/locationswithsubType=CITY,AIRPORTandkeywordset to the city name. - Filter results where
subTypeisAIRPORT. - Use the
distanceorgeoCodefields fromFULLview to determine proximity. - Pick the result with the highest
analytics.travelers.scorefor the busiest option.
4. Autocomplete an Airport Search Field
- As the user types, call
GET /reference-data/locationswithsubType=AIRPORT,CITYandkeywordset to the current input (minimum 1 character). - Display
nameandiataCodefrom each result. - On selection, call
GET /reference-data/locations/{locationId}to fetch full details. - Cache frequent lookups to reduce API calls against rate limits.
Response Tips
- Check response schemas in references/api-spec.lap for field details
References
- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas
Generated from the official API spec by LAP