Signing up for credit cards through partner links earns us a commission. Here’s our full Advertising Policy.
To really become an expert at searching for cheap airfares using ITA Matrix, you’ll need to learn about advanced routing codes.
These are codes you input into the “Enter Routing Codes” box on the main search screen, between departure city and destination. Advanced routing codes allow you to do very specific searches!
I’ll show you some of the more common codes and how to use them. And where you can find more!
Search for Cheap Airfare Like a Pro Index
- Part 1 – ITA Matrix Basics
- Part 2 – More ITA Matrix Tricks
- Part 3 – ITA Matrix Multi-City Search
- Part 4 – ITA Matrix Advanced Routing Codes
How to Use ITA Matrix Advanced Routing Codes
Link: ITA Matrix Google Help
Clicking the little question mark next to the advanced routing codes box opens a window with some examples of codes and how you’d use them. Not all available codes are listed! You’ll find more of them on the ITA Matrix Google Help page.
Clicking the “Examples” tab gives some basic examples of how to use the codes.
And there’s a glossary with some useful definitions of terms used in ITA Matrix.
Explaining how to use all the advanced routing codes is beyond the scope of this post (and my ITA Matrix skill level!) and there are many codes that aren’t even published by ITA. This FlyerTalk thread has a good discussion on some of the unpublished codes available.
That said, let’s look some examples that would be useful to most folks.
1. Specifying Connection Cities
Suppose you wanted to fly from New York to Los Angeles, but instead of going non-stop, you need a connection in Philadelphia (maybe to have lunch with a friend or meet with a business colleague).
Enter the departure city and destination as you normally would, but in the “Enter Routing Codes” box, enter the 3-letter airport code of the airport you want to connect in (in this case, PHL for Philadelphia). If you don’t know the airport code, you can look it up on an airport code website.
After you hit search, you’ll only see flights that connect through Philadelphia.
If you want to specify 2 or more connection points, type the airport codes separated by a space in the “Enter Routing Codes” box.
So using our previous New York to Los Angeles example, if you wanted to meet a business colleague for breakfast in Atlanta, then meet your sister in Salt Lake City (SLC) for coffee, you’d enter “ATL SLC” in the “Enter Routing Codes” box.
You’ll only see a list of flights that connect through Atlanta 1st, then Salt Lake City. Note that some of the connections are LONG or overnight. But maybe you want to hang out with your family or friends for a night anyway!
Note: If you wanted to connect in either Atlanta or Salt Lake City, you’d enter “ATL,SLC” instead (separated by a comma).
If you DO NOT want to connect at a specific airport, you’d enter the airport code in the “Enter Routing Codes” box with a ~ (tilde) symbol in front of it.
For example, if you were flying from Rochester to West Palm Beach (knowing there are no direct flights between the 2 cities), but absolutely dislike connecting through Atlanta, you’d enter the following:
Your search results page will only include options that don’t connect in Atlanta.
That’s pretty neat!
2. Specifying Airlines and Alliances
I’ve already shown you how to filter results by airline on the ITA Matrix search results page but you can do so more powerfully by including advanced routing codes in your search.
You can get very specific about marketing carrier (the airline that sells the ticket, but it could be a code share flight), operating carrier (the airline that actually operates the flight), or alliance.
Here are some common examples of ways you can specify airline or alliance.
|AA||A direct flight marketed by a specific airline, in this case American Airlines. However, it could be a code share flight operated by another airline.|
|O:UA||A direct flight operated by a specific airline, in this case United Airlines.|
|US+||Any number of flights marketed by a specific airline, in this case US Airways.|
|O:DL+||Any number of flights operated by a specific airline, in this case Delta.|
|N||Any non-stop flight.|
|N:AC||Any non-stop flight operated by a specific airline, in this case Air Canada.|
|~BA||Any direct flight, but excluding a specific airline, in this case British Airways.|
|~CX+||Any number of flights, but not operated by a specific airline, in this case Cathay Pacific.|
|HA,AS||Direct flight on 1 of these airlines (add more if needed, separated by commas). In this case, Hawaiian Airlines or Alaska Airlines.|
|AF KL||A direct flight on 1 airline followed by a direct flight on another. In this case, Air France then KLM.|
|LH+ SQ+||Any number of flights on a specific airline, followed by any number of flights on another airline, in this case Lufthansa then Singapore Airlines.|
|/alliance star-alliance||Search for flights on Star Alliance airlines only.|
|/alliance oneworld||Search for flights on oneworld airlines only.|
|/alliance Skyteam||Search for flights on Skyteam airlines only.|
If you don’t know the 2-letter code for an airline, you can look it up (and airport codes, too!) on the IATA Airline and Airport Code Search website.
Let’s look at a few examples.
1. Toronto to Los Angeles, United Airlines
Suppose you wanted to fly from Toronto to Los Angeles on any number of flights marketed by United Airlines. Your search entry would look like this:
The search results only include flights with United Airlines flight numbers. But note that the 1st flight on the list is operated by Air Canada (a code share).
To list flights operated by United Airlines only, you need to enter “O:UA+” instead of “UA+“, like this:
The results are now different, with only flights operated by United Airlines shown.
2. New York to Honolulu, United Airlines and Hawaiian Airlines
If you wanted to fly from New York to Honolulu on a direct flight operated by either United Airlines or Hawaiian Airlines, your search would look like this:
The results look like this:
Let’s change the search to allow any number of flights on United Airlines, followed by any number of flights on Hawaiian Airlines. You’d enter “UA+ HA+” instead of “UA,HA“.
The results list gives quite a different set of options!
3. Philadelphia to Hong Kong, Star Alliance
Doing a basic search from Philadelphia to Hong Kong without adding any advanced routing codes lists a massive number of options.
However, if you know you want to fly a Star Alliance airline (say because you want to credit the miles flown to a specific program), your search would look like this:
The results are much more refined!
3. Avoiding Red-Eye Flights, Overnight Stops, Propeller Planes and More!
Some folks really don’t like certain types of flights, like red-eyes, overnight stops, or propeller planes. You can avoid these (and more) by using the following codes:
- / -redeye (avoids red-eye flights)
- / -overnight (avoids overnight connections)
- / -prop (avoids propeller planes)
- / -change (avoids airport changes)
- / -train (avoids train connections)
- / -helicopter (avoids helicopters)
If there’s more than 1 type of flight you’d like to avoid, just separate the codes with commas. So if you wanted to search for flights with no overnight connections and no propeller planes, you’d type “/ -overnight,-prop“.
For example, suppose you wanted to fly from New York to London, UK, but you don’t do well on red-eye flights (most US to Europe flights are red-eyes, but not ALL). Your search would look like this:
The search results include only daytime flights. But some of the results include overnight connections!
To exclude overnight connections, too, include “-overnight” in the advanced routing codes, like this:
Now the search results list only daytime flights, with no overnight connections.
Where Can You Learn More?
The examples I’ve given are just a small sample of what you can do with advanced routing codes. There are many other codes, combinations, and tricks you can use for even more complex searches.
Don’t be discouraged if it’s confusing at first. You don’t have to learn everything. Just a few codes that apply to the way you like to travel are enough!
I’ve found the best way to learn more about ITA Matrix is to just play with it. Try dummy searches with different codes, or make up crazy criteria and see if you can get the system to return a list of flights that fit. It’s kind of fun!
Here are some resources to learn more about ITA Matrix routing codes:
- Travel Codex has an excellent article detailing more advanced ITA Matrix techniques
- FlyerTalk has an extensive discussion about ITA Matrix, and a thread that talks about lesser-known codes and their uses
- The ITA Matrix Google Help pages have good examples of advanced routing codes
Using advanced routing codes in ITA Matrix is a very powerful way to make your airfare searches ultra-specific. You don’t have to use them, but for some folks they can be very helpful.
For example, you can specify airlines (operating or code share), alliances, and connection points. Or avoid certain types of flights, like red-eyes, altogether.
There are hundreds (if not thousands) of ways you can mix-and-match codes to fit your exact travel plans. And there are resources online to help if you get stuck.
Do you have any favorite ITA Matrix routing code tricks to share?