New search  |  Log out  |    |  ITA Software (careers)
Help with ITA Software's Fare Shopping Engine
Frequently Asked Questions
Specifying your search
  Round Trips
  One-Way and Multi-Segment Trips
Interpreting search results
  The Matrix Display
  Choosing whole trips
Trip Lists
Trip Details
Choosing Flight-by-Flight
Quick Tutorial
Graphical version
Money-Saving Tips
The ITA Route Language

Using the ITA Route Language to Customize Your Search

The ITA trip request forms allow you to enter basic information for finding solutions to your trip planning needs. However, the page also supports a very powerful query language, called the "Route Language", which permits you to specify exactly which airlines, flight numbers, and connection points are considered for each portion of your trip.

Route Language entries are made in the "From" and "To" fields on the trip request forms. Normally, you simply list one or more airports or cities in these fields; optionally, however, you may also specify a route expression after the airports/cities which contains specific instructions about what routes to consider. The airports/cities are separated from the route expression with two colons, like this:

<airports/cities> :: <route-expression>

If you are planning a round trip, specifying a route expression in the "From:" text field will affect the options produced for the outbound portion of the trip; route expressions typed in the "To:" text field affect options produced for the return portion of the trip. In one-way and multi-segment trips, you may enter one route expression in each "From" field only.

Some important definitions

When writing route expressions, it's important to be precise about terminology. As such, it's important to understand the following definitions:

TermMeaning
Trip Your entire travel plan. For a round trip, for example, a trip contains both the outbound and return portions.
Leg One takeoff and landing
Flight/Direct flight One or more legs, on the same airline, in which each leg has the same flight number
Non-stop flight A flight with only one leg.
Itinerary One or more flights from a passenger-requested origin to a passenger-requested destination

Using route expressions: Some simple examples

Without thinking about it too much, let's see what kinds of things the route language can do:

Route expressionsMeaning
From: BOS;PVD :: DFW Only search for options which depart either Boston or Providence, and which stop in Dallas/Fort Worth airport for the outbound, but which may use any itinerary for the return from Los Angeles to Boston or Providence
To: LAX
 
From: BOS :: AA+ Only search for options which are on any number of American Airlines flights for the outbound, and which uses a single flight on either American Airlines or United Airlines for the return
To: LAX :: AA,UA
 
From: BOS :: N Only search for non-stop options on any airline for the outbound, and options containing any number of stops on any airline, except for Continental, for the return
To: LAX :: ~CO

Route Expressions: The Gritty Details

The general form of the route-expression is a series of one or more flight or connection point specifications, each of which can be prefaced with a ~ (indicating the implied test should be negated) or suffixed with a * (zero or more), + (one or more), or ? (zero or one). Commas without spaces between flights or points signify to "or" the expression; spaces between flights or points signify "and." Flights or points are specified by two-letter airline codes, three-letter airport/city codes, or the special characters "N" for nonstop flight, "F" for direct flight (possible stop but no change of planes), and "X" for connection point.

The following table is a list of all legal route expression elements:

FormExampleInterpretation
**Zero or more flights
++One or more flights
??Zero or one flights
F:FAny single flight
<flight>AA151Specific flight (shorthand)
C:<carrier>C:AAFlight on specified carrier
C:<carrier>, ...C:AA,CO,DLFlight on one of carriers
<carrier>, ...AA,CO,DLFlight on one of carriers (shorthand)
O:<carrier>O:AAFlight actually operated by (as opposed to a codeshare or subsidiary carrier) the specified carrier
O:<carrier>, ...O:AA,CO,DLFlight actually operated by (as opposed to a codeshare or subsidiary carrier) one of the specified carriers
NNAny single nonstop flight
N:<carrier>N:AANonstop flight on specified carrier
N:<carrier>, ...N:AA,CO,DLNonstop flight on one of carriers
X:<city/airport>X:NYCConnection point
XXAny single connection point
<city/airport>DFWConnection point (shorthand)
<city/airport>, ...DFW,STLConnection in one of points (shorthand)

If two connection point specifications are listed consecutively, the implication is that any single flight-segment is permitted between them. If two flight specifications are listed consecutively, the implication is that any single connection is permitted between them. The origin and destination are implied, so for a BOS to LAX trip, "STL" implies two flight-segments, from BOS to STL and from STL to LAX. Flight specifications match against flight-segments (sequences of legs with the same carrier and flight-number), no matter how many legs they have.

Negations specified with ~ invert any tests, but not the implied number of events. Thus, "~STL" specifies a connection in a point other than St. Louis, but a connection is required. To make the connection optional but still prevent a stop in STL, use "~STL*" which implies zero or more stops, each in a point other than STL.

The special symbol > may be placed at the start of a route to indicate that the initial location restricts the origin airport, and < at the end indicates that the final location restricts the destination airport. For example, "BOS MSP" indicates an itinerary with connections in BOS and MSP, but "> BOS MSP <" indicates an itinerary with origin BOS and destination MSP (one flight).

More examples

The following sample route-expressions illustrate the power of the Route Language. Each expression is preceded by "BOS ::" indicating that, in each case, the first flight is to originate in Boston.

Origin :: Route Expression Interpretation
BOS :: N Non-stop flight only.
BOS :: NYC Single stop in New York.
BOS :: ~NYC Single stop, not in New York.
BOS :: DEN? Direct flight or one stop in Denver.
BOS :: X? Direct flight or one stop anywhere.
BOS :: EWR CVG SLC Stops in Newark, Cincinnati, and Salt Lake City.
BOS :: AA Direct flight on AA (American Airlines).
BOS :: AA+ Any number of flights on AA.
BOS :: AA,UA Direct flight on either AA (American) or UA (United Airlines).
BOS :: ~AA Direct flight, not on AA.
BOS :: ~AA,UA,CO Direct flight, not on AA, UA, or CO (Continental).
BOS :: ~AA,UA,CO+ Any number of flights not on AA, UA, or CO.
BOS :: AA+ DL+ One or more flights on AA, followed by one or more flights on DL (Delta).
BOS :: AA DL,AF Flight on AA followed by flight on either DL or AF.
BOS :: AA UA? One AA flight, optionally followed by another flight on UA.
BOS :: AA N? One AA flight, optionally followed by a nonstop flight on any airline.
BOS :: AA25 UA814 Flight AA25 followed by UA814.
BOS :: AA25 UA+ Flight AA25 followed by one or more flights on UA.
BOS :: AA25 F+ Flight AA25 followed by one or more flights on any airline.
BOS :: DL CHI DL Two DL flights with a connection in Chicago.
BOS :: O:UA Single flight, operated by UA (and not any other airline or UA subsidiary carriers)
BOS :: ~UA882 Single flight, but not UA882
BOS :: UA1000-2000+ One or more flights on UA with flight numbers in the range 1000-2000
BOS :: ~UA5000-9999,AA,DL+ One or more flights that are NOT on AA or on DL or on UA with flight numbers between 5000 and 9999.