Find Air Canada multi-city flight options and report available itineraries, connections, layover durations, and requested fare families for a sequence of airport/date segments, including open-jaw itineraries.
Use Cases
Use when a request contains two or more flight legs and requires comparing fare families or identifying a particular connection, airport, or layover duration. Inputs should provide segment origins, destinations, dates, and any optional fare, routing, or connection preferences.
Automation Flow
Navigate directly to
https://www.aircanada.com/home/{country}/{language}/aco/flights, defaulting toca/en. Other market editions price the same itinerary in their own currency and fare rules, so report which edition produced the fares.Select the multi-city trip type using
button#bkmgFlights-trip-selector_tripTypeBtn, then choose the visible option#bkmgFlights-trip-selector_tripTypeSelector_M.Set the passenger count before searching. The form defaults to one adult (
button#bkmg-desktop_selectTravelersreads1 Adult, accessible namePassengers - currently selected - 1 Adult), so a group left untouched is priced as a single adult and the fare comparison is wrong for that party. Open that button, then click the observed steppers until each count input holds the requested value:- adults
#bkmg-desktop_selectTravelers_addTraveler_ADT/_removeTraveler_ADT, count in#bkmg-desktop_selectTravelers_travelerCount_ADT - youths
_YTH, children_CHD, infant on lap_INF, infant in seat_INS, following the sameaddTraveler/removeTraveler/travelerCountpattern
Confirm with
#bkmg-desktop_selectTravelers_confirmTravelersand re-read the button text to verify the party before submitting. One adult is the default when the caller says nothing. At narrow viewports the same control renders as#bkmg-mobile-tablet_selectTravelers.- adults
If the OneTrust preference dialog appears, open it with
button#onetrust-pc-btn-handlerand save/confirm withbutton.save-preference-btn-handlerbefore filling the form.For each segment
i, fill and commit the first visible airport suggestion for:#bkmgMultiDesktop_origin_trip_{i}with{origin-i}#bkmgMultiDesktop_destination_trip_{i}with{destination-i}After typing an airport code, wait for suggestions and select#bkmgMultiDesktop_{field}_trip_{i}SearchResult0where rendered. Verify the selected input value before continuing.
Fill each date input
#bkmgMultiDesktop_travelDates_{i}inDD/MMformat. If typing does not commit the date, open#bkmgMultiDesktop_travelDates_{i}-showCalendarand select the visible calendar cell whosearia-labelmatches the full date, such astd[aria-label='November 8, 2026']. Verify the date value afterward.Submit the multi-city search with the visible booking/search control after all segments and dates are populated. In one automation transaction, wait for the results page and run the evaluator below; do not revisit the homepage or repeat airport searches.
From the results, retain itineraries matching optional constraints such as
{required-connection-airport}and{minimum-layover-duration}, and report only requested fare families such as Flex, Comfort, or Latitude. Treat requested fares on each segment independently when the site presents mixed-fare options.
Optional input shape
{
"segments": [
{"origin": "{origin-1}", "destination": "{destination-1}", "date": "{date-1}"},
{"origin": "{origin-2}", "destination": "{destination-2}", "date": "{date-2}"}
],
"requiredConnectionAirport": "{airport-code}",
"minimumLayoverMinutes": "{minutes}",
"fareFamilies": ["{fare-family-1}", "{fare-family-2}"]
}Result-page evaluator
Run this evaluate() on the loaded results page. It returns visible flight and fare-card text without leaving the target origin or making network calls.
(()=>{
const visible=e=>{const r=e.getBoundingClientRect();return r.width>0&&r.height>0};
const selectors=[
'[data-testid*="flight"]','[data-testid*="itinerary"]','[data-testid*="fare"]',
'[class*="flight-card"]','[class*="flightCard"]','[class*="itinerary"]',
'[class*="fare-card"]','[class*="fareCard"]','article'
];
const nodes=[...new Set(selectors.flatMap(s=>[...document.querySelectorAll(s)]))]
.filter(visible)
.map(e=>({text:(e.innerText||'').replace(/\s+/g,' ').trim()}))
.filter(x=>x.text&&(/\b(?:Basic|Standard|Flex|Comfort|Latitude|Premium|Business|Economy|Signature)\b|flight|layover|stop|connection/i.test(x.text)||/(?:CAD|USD|\$)\s?[\d,]+/.test(x.text)));
const results=[],seen=new Set();
for(const x of nodes){
const key=x.text.slice(0,1200);
if(!seen.has(key)){seen.add(key);results.push({text:x.text})}
}
return {pageTitle:document.title,results};
})()Possible Friction Points
- The booking widget renders two variants by viewport: the
bkmg-desktop_*/bkmgMultiDesktop_*ids this recipe uses exist only at desktop width, while a narrow viewport swaps inbkmg-mobile-tablet_*and the trip-type selector is absent entirely. Set a desktop viewport before querying these ids. - The passenger panel counts five traveller types (
ADT,YTH,CHD,INFon lap,INSin seat) as separate steppers, each starting at zero except one adult. Children and infants are not adults, so mapping a whole party onto the adult stepper misprices it. - Air Canada's multi-city form uses distinct fields suffixed by segment number:
origin_trip_1,destination_trip_1,origin_trip_2, and so on. - Airport autocomplete must be committed by selecting a suggestion; merely typing an airport code is insufficient.
- Date fields accept
DD/MM, but typed dates may fail to commit. The calendar fallback uses full localizedaria-labelvalues, for exampletd[aria-label='November 8, 2026']. - OneTrust consent can block the booking form. The preference-panel flow is
#onetrust-pc-btn-handlerfollowed by.save-preference-btn-handler. - The observed run did not expose a stable results URL or documented query-parameter shortcut; use the booking form rather than guessing a search URL.
- The evaluator's text filter names fare families only as examples. Air Canada renames and varies them by market, so a card for a family outside that list is kept only by its generic keyword or its price. When the caller asks for a specific family, match the requested name against the returned card text rather than assuming the filter preserved it.
- Connection and fare-card CSS classes may change. Prefer
data-testidselectors when present and use the evaluator's visible-text fallback; do not interpret duplicate nested cards as separate flights without deduplicating their text. - The
{country}/{language}segment of the entry URL selects the Air Canada site edition, which sets the currency and the fares shown. Keep the caller's market, and name it alongside any price. - A long layover and a required connection airport are result constraints, not form fields; verify them from each segment's displayed airport and duration.