Purpose
Search Skyscanner India for exact-date multi-city business-class flight options and extract visible itinerary cards while distinguishing an anti-bot CAPTCHA page from a genuine empty result.
When to Use
Use when the caller needs a business-class itinerary with two or more ordered flight legs, each having its own origin, destination, and departure date. Use airport or city codes when available and preserve the leg order exactly as requested.
Workflow
- Construct a result URL directly, without visiting the homepage or using the search form. The canonical multi-city format for two legs is:
https://www.skyscanner.co.in/transport/flights-multi-city/{origin-1}/{destination-1}/{date-1}/{origin-2}/{destination-2}/{date-2}/?adultsv2={adults}&cabinclass=businessDates use two-digit year, month, and day (YYMMDD). Append/{origin}/{destination}/{date}before the query string for additional legs. - Skyscanner India also accepts this alternate multi-leg format, which omits the
flights-multi-citypath segment:https://www.skyscanner.co.in/transport/flights/{origin-1}/{destination-1}/{date-1}/{origin-2}/{destination-2}/{date-2}/?adultsv2={adults}&cabinclass=businessExtend it with additional ordered origin/destination/date triplets as needed. Use this alternate form when testing compatibility or when the canonical form is unavailable; do not add the return-search flagrtn=1. - Use the requested airport or city codes and preserve leg order. Add optional query parameters only when requested, such as
sortby=pricefor ascending price sorting orpreferdirects={true-or-false}for a direct-flight preference. - If operating on Skyscanner's interactive search form rather than navigating directly to a result URL, select the trip type through the button whose
aria-labelbegins withSelect trip type, then choose the list item whose text begins withMulti-city. This is a fallback UI flow only; direct result URLs are preferred. - Navigate directly to the constructed URL, wait for asynchronous results to settle, then run this evaluator on the loaded page:
(() => { const body = document.body?.innerText || ""; const blocked = /\/sttc\/px\/captcha/i.test(location.pathname) || /captcha|verify you are human|checking your browser/i.test(body); const candidates = [...document.querySelectorAll("a[href]")].filter( (a) => /Flight option/i.test(a.innerText || "") && !/Sponsored/i.test(a.innerText || ""), ); const fallback = [ ...document.querySelectorAll( '[data-testid^="itinerary"], [data-testid*="flight-card"], article', ), ].filter((node) => !/Sponsored/i.test(node.innerText || "")); const nodes = candidates.length ? candidates : fallback; const seen = new Set(); const flights = nodes .map((node) => { const text = (node.innerText || "").replace(/\s+/g, " ").trim(); const link = node.matches("a[href]") ? node : node.querySelector("a[href]"); return { text, url: link ? new URL(link.getAttribute("href"), location.href).href : null, }; }) .filter( (row) => row.text && (/Flight option/i.test(row.text) || /\b\d{1,2}:\d{2}\b|\b\d+\s*(?:h|hr|hours?)\b|₹|\bINR\b|flight/i.test( row.text, )), ) .filter((row) => { const key = row.text + "\n" + (row.url || ""); if (seen.has(key)) return false; seen.add(key); return true; }); return { blocked, url: location.href, flights }; })(); - If
blockedis true, report the CAPTCHA interstitial rather than treating the page as having no flights. Otherwise return the visible itinerary text and links, preserving displayed prices, carriers, times, stops, and durations.
Site-Specific Gotchas
- Skyscanner India supports both
/transport/flights-multi-city/and the alternate/transport/flights/multi-leg route, with each leg represented by an ordered origin, destination, andYYMMDDdate triplet. - Multi-city URLs use
adultsv2andcabinclass=business; the multi-city routes do not requirertn=1. - The interactive trip-type control is identified by an
aria-labelbeginning withSelect trip type; its menu item is a list item beginning withMulti-city. These selectors are a fallback for form-based flows, not a replacement for direct URL construction. - The route dates are local departure calendar dates for each individual leg, not a trip duration. Do not infer or substitute a return date for later legs.
- A result URL can redirect to
/sttc/px/captcha-v2/index.html; this anti-bot state is not evidence that no flights exist. CAPTCHA redirects may occur on either the canonical multi-city URL or the alternate/transport/flights/form. - Repeated navigation may continue to return CAPTCHA. Do not fabricate results or reuse transient CAPTCHA query values such as encoded
url, UUID, orvidparameters. - Prefer visible
Flight optionlinks. Use the itinerary/card selectors in the evaluator only as a fallback, and revalidate them if Skyscanner changes its markup. - Optional
sortby=priceandpreferdirectsparameters may be appended when explicitly requested; omit them by default.
Expected Output
Return {blocked, url, flights}. Each flight entry contains normalized visible itinerary-card text and its associated absolute url. When CAPTCHA is shown, return blocked: true and an empty or partial flights array rather than fabricated results.