ITA's routing codes are an advanced feature that lets you include specific notations in your search to quickly add restrictions. Using the routing codes, you can:
- Include only flights operated by specific airlines or alliances
- Specify the number of connections you are willing to make
- Search for flights with a layover in a specific airport, or avoiding a specific airport
- Limit the duration of an itinerary
- Exclude red-eye flights or flights with overnight stops
In Matrix, click the Advanced routing codes link to see the routing code fields, and then enter your codes in the fields stated Enter outbound/return routing codes. The rules defined by the routing codes only apply to one departure-destination pair at a time. For round-trip flights, this means you must enter the codes after the departure field (for your outbound trip) as well as after the destination (for your return trip), and for multi-city flights, you must repeat the codes for each departure-destination pair for which they should apply.
The routing codes uses the following general rules:
- Airlines are represented by their two letter codes.
- Airports are represented by their three letter codes.
- A direct flight is a flight with only one flight number, though it may have one or more take-off and landing. A non-stop flight is a flight with only one take-off and landing.
- Carrier Prefixes:
- C indicates marketing carrier.
- O indicates operating carrier (the carrier whose logo is on the plane).
Airline codes entered without a prefix are assumed to mean marketing carriers (i.e., the carrier whose flight number is displayed, including codeshares.)
- F can be used to identify a specific flight number or as a placeholder, indicating a flight segment. For example, if you want to make your trip in three segments, you would enter [F F F].
- The prefixes C, X, and F can be used in your query to make it visually clearer what you are trying to accomplish, but they are optional. If you use them as a prefix, be sure to follow them with a colon. If you omit the prefixes, the system interprets two-letter codes as marketing carriers, three-letter codes as airports for connection points, and airline codes followed immediately by numbers as flights.
- Countries are represented by their two-letter ISO codes. See Wikipedia's page on ISO codes for information on country ISO codes.)
- ~ indicates negation and can be applied to airport codes, airline codes, and attributes, such as red-eye flights or risky connections.
- + indicates one or more flights or airports meeting the specified criteria.
- * indicates zero or more flights or airports meeting the specified criteria.
- ? indicates zero or one flight or airport meeting the specified criteria.
Codes apply to flight segments in the order they are specified, and restrict your results to the number of segments specified. If you want the code to apply to more than one segment, add + or ? to the code.
If you want to specify something for a particular flight segment and allow any additional flight segments before or after the specified segment, you should add F? before and after the codes you have specified. For example, to ensure you fly at least one leg of the trip on American Airlines, enter [AA] to restrict your search to itineraries with exactly one direct flight by American Airlines. Use [F* AA F*] to restrict your search to itineraries with at least one American Airlines flight, and some itineraries that can include additional flights from any carrier.
Flight segments are separated by spaces. When multiple options are acceptable for a particular flight segment, separate them with a comma, and be careful to omit any spaces.
Again, the order of the codes is important. For example, if you want a stop over in Denver followed by a stopover in Atlanta, you would enter [DEN ATL] in the routing code field, and the system would interpret this as a stop in the first city code followed by the other. To include stop in Atlanta followed by Denver, you need to repeat your search with the cities in the opposite order, or you can do both searches at once by including both options for each stop [DEN,ATL DEN,ATL]
Each code applies only to one segment of the trip, so they must usually be entered in each box.
|Restricting to specific airlines|
|Direct flight marketed by American Airlines||[AA] or [C:AA]|
|Any number of flights marketed by American Airlines||[AA+] or [C:AA+]|
|Direct flight marked by American Airlines, United, or Delta||[AA,CO,DL] or [C:AA,C:UA,C:DL]|
|Direct flight operated by American Airlines (as opposed to a code-share or subsidiary carrier)||[O:AA]|
|Direct flight operated by American Airlines, United, or Delta (as opposed to a code-share)||[O:AA,O:UA,O:DL]|
|Up to 3 flights, including at least one marketed by US Airways||[F? US F?]|
|Any number of flights, including at least one marketed by American Airlines||[F+ AA F+]|
|Exclude United and only show direct flights||[~UA]|
|Exclude United and show options with zero or more connections.||[~UA+]|
|Search for results with exactly two flights, and excluding United from the 2nd flight||[F ~UA]|
|Search for results with a direct flight excluding flights marketed||[~AA,CO,DL]|
|Search for results with a direct flight excluding flights marketed by American Airlines, United, or Delta||[~AA,UA,DL]|
|A flight on US Airways followed by a flight on United||[US UA]|
|Restricting by alliance|
|Oneworld||[/ alliance oneworld]|
|SkyTeam||[/ alliance skyteam]|
|Star Alliance||[/ alliance star-alliance]|
|Restricting the number of stops|
|Non-stop flight on United Airlines||[N:UA]|
|Direct flight (may have a stop, but same flight number continues to destination)||[F]|
|Any number of connections, each with a minimum connection time of 45 min||[/ minconnect 45]|
|Any number of connections, each with a minimum connection time of 1 hour, maximum connection time of 2 hours||[/ minconnect 60; maxconnect 120]|
|Require at least 20 minutes more than airline recommended minimum connection time||[/ padconnect 20]|
|One or more connection points||[X+]|
|One connection point with at least 45 min||[X / minconnect 45]|
|Exactly 2 connections||[X X]|
|Two connections or less||[X? X?]|
|Two connections or more||[X X+]|
|Connect in Dallas-Fort-Worth with no other connection points||[DFW] or [X:DFW]|
|Connect in Dallas-Fort-Worth with any additional connections before or after||[F? DFW F?]|
|Connect in either Dallas-Fort-Worth or Denver with no other connection points||[DFW,DEN]|
|Connect only in Dallas-Fort-Worth or Denver||[N DFW,DEN N]|
|Connect in Dallas-Fort-Worth followed by Denver followed by 0 or more stops||[DFW DEN X?]|
|Find itineraries with exactly one connection and exclude connections in Dallas-Fort-Worth||[~DFW]|
|Exclude connections in the United States (Note: this does not exclude stops on direct flights.)||[~l:nUS+]|
|Specifying itinerary duration|
|Maximum itinerary duration of 4 hours (specify in minutes)||[/ maxdur 240]|
|Specifying flight attributes|
|Exclude overnight stops||[/ -overnight]|
|Exclude both red-eye flights and overnight stops||[/ -overnight;-redeye]|
|Exclude propeller planes||[/ -prop]|
|Specifying specific flight numbers|
|A particular flight - UA882||UA882|
|Any flights except UA882||~UA882+|
|A particular flight - UA882 - followed by any number of flights||UA882 F+|
|One or more flights on UA with flight numbers in the range 1000-2000||UA1000-2000+|