Search Emirates flight availability for a specified origin, destination, travel dates, passenger counts, and cabin class without navigating through the homepage booking form.
Use Cases
Use when the caller wants to check Emirates flight options or begin a same-booking search. Convert airport names to their IATA codes before constructing the URL.
Automation Flow
- Build the direct Emirates booking URL, substituting the requested values:
https://www.emirates.com/{locale}/{language}/SessionHandler.aspx?pageurl=/IBE.aspx&pub=/{locale}/{language}§ion=IBE&j=t&bsp=home&TID=SB&resultby=0&seldcity1={origin-iata}&selacity1={destination-iata}&selddate1={departure-date-DD-MMM-YY}&seladate1={return-date-DD-MMM-YY}&selcabinclass={cabin-code}&seladults={adult-count}&selchildren={child-count}&selinfants={infant-count}&showpage=trueUse a locale such asin, and URL-encode any parameter values as needed.selcabinclass={cabin-code}: only0(the default cabin) was observed. For Business or First, read the cabin code from the cabin selector on the Emirates booking form; never guess it.{language}is the site language path segment (for exampleenglish).resultby=0andshowpage=truerequest the full booking search state. - For a one-way search, use the same endpoint with
j=f&TID=OW, omitseladate1, or leave it empty, and addchkReturn=false:https://www.emirates.com/{locale}/{language}/SessionHandler.aspx?pageurl=/IBE.aspx&pub=/{locale}/{language}§ion=IBE&j=f&bsp=home&TID=OW&chkReturn=false&resultby=0&seldcity1={origin-iata}&selacity1={destination-iata}&selddate1={departure-date-DD-MMM-YY}&selcabinclass={cabin-code}&seladults={adult-count}&selchildren={child-count}&selinfants={infant-count}&showpage=true - In one browser operation, navigate to the constructed URL, wait for the booking results to settle, then run this page-local extractor:
(() => { const text = el => (el?.innerText || '').replace(/\s+/g, ' ').trim(); const visible = el => { if (!el) return false; const s = getComputedStyle(el), r = el.getBoundingClientRect(); return s.display !== 'none' && s.visibility !== 'hidden' && r.width > 0 && r.height > 0; }; const restricted = /accessrestricted/i.test(location.pathname) || /access restricted|temporarily unavailable/i.test(document.body.innerText); const selectors = [ '[data-testid*="flight"]', '[data-testid*="Flight"]', '[data-test*="flight"]', '[data-test*="Flight"]', '[class*="flight"]', '[class*="Flight"]', '[role="listitem"]', '[role="article"]' ]; const seen = new Set(), options = []; for (const el of document.querySelectorAll(selectors.join(','))) { if (!visible(el)) continue; const value = text(el); if (value.length < 20 || value.length > 1800) continue; const key = value.slice(0, 500); if (seen.has(key)) continue; seen.add(key); const times = value.match(/\b(?:[01]?\d|2[0-3]):[0-5]\d\b/g) || []; const prices = value.match(/(?:[A-Z]{3}|[\p{Sc}])\s*[\d,.]+|[\d,.]+\s*(?:[A-Z]{3}|[\p{Sc}])/gu) || []; options.push({text: value, times: times.slice(0, 4), priceCandidates: prices.slice(-4)}); } return { status: restricted ? 'access-restricted' : (options.length ? 'results-found' : 'no-options-detected'), url: location.href, title: document.title, options }; })() - Return the extractor result. If
statusisaccess-restricted, report that Emirates blocked the booking search rather than treating the error page as flight availability.
Possible Friction Points
- The direct search uses
/SessionHandler.aspxwithpageurl=/IBE.aspxand the route/date/passenger fields embedded as query parameters; this avoids homepage form interaction. - Round-trip searches use
j=t,TID=SB, andseladate1; one-way searches usej=f,TID=OW, and may requirechkReturn=false. - Dates use Emirates'
DD-MMM-YYformat, such as12-Nov-26, rather than ISO dates. - Emirates may display the OneTrust consent button
#onetrust-accept-btn-handler. If the consent panel is shown instead, visible controls under#onetrust-pc-sdkor#onetrust-banner-sdkcan be used to reject or save consent choices before reading results. Only perform this if the overlay prevents the result page from rendering. - The direct endpoint may redirect to
/error/accessrestricted.html; this is an anti-bot or access restriction, not an indication that no flights exist. Do not fabricate options from the error page or repeatedly retry it. - Result-card selectors are intentionally layered because Emirates may render flight cards with changing
data-testidor class names. Treat the returnedoptionsas page-visible candidates and preserve their text for downstream parsing.