Airport Code Extraction

Anthropic prompt library

Submit a prompt

Overview

Extract IATA airport codes from itinerary text in the order they appear as JSON.

Use cases

Prompt
Copied 0
Your task is to analyze the provided text and identify any airport codes mentioned within it. Present these airport codes as a list in the order they appear in the text. If no airport codes are found, return an empty list.

Prefer returning JSON: {"airport_codes": ["SEA", "AMS", ...]}

TEXT:
<<<paste itinerary prose>>>

Can AI?

Alternatives

  • Find the cheapest route between two citiesThis prompt suggests low-cost ways to get between two cities on your dates, including connections, long layovers, and mixes of trains, buses, and car-sharing. Prices come from the model's general knowledge, so check them before booking.Travel
  • Hotel Invoice PDF to JSONExtract hotel invoice fields from PDF or image input into grouped JSON, using null for blanks.Travel
  • Plan a trip through a travel-agent interviewThis prompt plans a trip the way a travel agent would. It first asks about your goals, budget, and limits, points out plans that won't work, then creates an itinerary with rough prices and next steps for booking.Travel
  • Trip Itinerary JSONPlan a constrained trip as day-by-day JSON with activities, costs, meals, transit, and packing priorities.Travel
  • Trip Itinerary PlannerCreate a day-by-day travel itinerary with transit notes, rain backups, and packing suggestions.Travel