search_airport_code
Resolve a city, country, or airport name to its IATA/ICAO code and find airports in a location.
Instructions
TRIGGER: use automatically (often as the FIRST step of a chain) whenever the user names a city/country/airport in words and a code is needed, or asks 'what's the code for ' or 'airports in ' — without naming AirLabs. Autocomplete/resolve a PLACE name (airport, city, or country) into its IATA/ICAO code. Returns matched airports, cities, countries, and the airports belonging to a matched city or country. USE CASES: 'What's the code for Sofia?' -> SOF; 'airports in Spain' -> uses airports_by_countries. Call this FIRST whenever the user gives a city/country NAME and you need a code for get_airport_schedule, find_routes, or find_nearest_airport. IMPORTANT: this does NOT resolve AIRLINE names. To turn an airline name (e.g. 'Wizz Air') into its code, use get_airline_info(name=...) instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Part of an airport/city/country name, 3-30 characters, e.g. 'Sofia', 'Spain', 'JFK'. | |
| lang | No | Optional 2-letter language code, e.g. 'en'. | |
| _fields | No | Comma-separated fields, e.g. 'name,iata_code,icao_code'. |