irctc.co.in logo
irctc.co.in

book-train-ticket-maq-mail

Installation

Adds this website's skill for your agents

 

Summary

Drive IRCTC to find train 12601 Mangaluru Mail (dep Chennai Central MAS 20:10) and read class-wise availability + fare for a journey date 60 days out (ARP), stopping read-only before login/payment. Candidate: IRCTC's Akamai IP-blocks all Browserbase browser egress.

FIG. 01
FIG. 02
FIG. 03
FIG. 04
SKILL.md
216 lines

Book Mangaluru Mail (MAQ Mail) 8:10 PM Train on IRCTC — Availability & Booking Prep

Purpose

Prepare a reservation for the MAQ Mail — train 12601 Mangaluru Mail (erail/IR label "MAS MAQ SF MAIL"), the Superfast that departs Chennai Central (MAS) at 20:10 (8:10 PM) and arrives Mangaluru Central (MAQ) ~12:06 next day — for a journey date 60 days after the booking date (the IRCTC Advance Reservation Period / ARP limit). The skill drives the IRCTC booking site (/nget/train-search) through station selection, date selection, search, and class-wise availability + fare extraction for the 20:10 train.

Read-only / booking-prep only. This skill stops at the availability-results screen — the exact point a human would click Book Now. It does not log in, enter passenger details, choose a berth, or pay. Completing a real booking requires an authenticated IRCTC account + payment and is out of scope.

Status: CANDIDATE — not reproducible from this runtime. Across 4 Browserbase browser-session configurations (proxies-only, verified+proxies, India-geolocated proxy, and advancedStealth+India-proxy) every page load on irctc.co.in returned an Akamai "Access Denied" (edgesuite.net reference) — a hard IP/geo wall against the sandbox's egress. The workflow below is verified against the live site's structure and the train's real schedule (confirmed via erail.in), but the IRCTC availability step itself could not be executed from this environment. It will run only from a network IRCTC's Akamai trusts (an Indian residential/mobile IP). See Site-Specific Gotchas.

When to Use

  • A scheduling/booking agent that needs to confirm the 20:10 Chennai→Mangaluru Mail (12601) is bookable for a date exactly 60 days out, and read its live class-wise fare + availability (SL/3A/2A/1A, GENERAL quota).
  • The recurring scenario: reservations for this train for date D open at 08:00 IST on the day D − 60; an agent wakes near the ARP open window to grab availability the moment the quota releases.
  • Any flow that needs the pre-booking availability snapshot without actually purchasing. Actual ticket purchase (login + passenger form + IRCTC payment) is a separate, credentialed skill.

Workflow

The IRCTC booking site is an Angular SPA (/nget/) backed by heavily-signed internal REST endpoints. There is no usable public API: the availability/fare calls (/eticketing/protected/mapps1/avlFarenquiry/...) require app-generated greq/bmirak signed headers, a bootstrap bearer token, and valid Akamai _abck/bm_sz sensor cookies — none of which are reproducible outside the running app. Therefore the recommended method is the browser, driving the real SPA. Lead with the browser flow below.

Precondition — network: run from an IP IRCTC's Akamai trusts (Indian residential/mobile egress). From this sandbox's Browserbase egress the site returns Akamai "Access Denied" on every request (see Gotchas). A residential-India proxy that is not in Browserbase's known pool may pass; Browserbase's own --proxies pool (incl. geolocation.country=IN) is blocked.

1. Compute the journey date (ARP logic)

  • ARP = 60 days, counted excluding the journey date. Reservations open at 08:00 IST, 60 days ahead.
  • journey_date = booking_date + 60 days. Worked example: booking on 2026-10-16 → journey 2026-12-15. Booking on Monday 2026-10-19 → journey 2026-12-18.
  • Format the date as the picker expects: DD/MM/YYYY (e.g. 15/12/2026).
  • Do not request a date beyond ARP — IRCTC rejects it ("Reservation period is not open for selected date").

2. Start a trusted-network remote session & open the booking page

browse open "https://www.irctc.co.in/nget/train-search" --remote
browse wait load
browse wait timeout 4000          # Angular bootstrap; form renders 2–4s after load
browse get title                  # expect the IRCTC portal title, NOT "Access Denied"

If browse get title returns "Access Denied", you are on a blocked IP — stop and switch egress (see Gotchas). Do not retry the same IP; the ban is per-IP, not transient.

3. Select the "From" station (Chennai Central / MAS)

browse snapshot
browse click @<from-input-ref>
browse type "Chennai Central"
browse wait timeout 1500          # p-autocomplete dropdown animates in
browse snapshot
browse click @<option ending in "- MAS">   # pick the MAS suggestion explicitly

The From field is a PrimeNG p-autocomplete ("From*"). Type the station name, wait for the suggestion panel, then click the row whose code is MAS. Don't press Enter before the panel appears — it submits an empty value.

4. Select the "To" station (Mangaluru Central / MAQ)

browse click @<to-input-ref>
browse type "Mangaluru Central"
browse wait timeout 1500
browse snapshot
browse click @<option ending in "- MAQ">

Pick the MAQ row (Mangaluru Central; also spelled "Mangalore Central"). Note MAQ is Mangaluru Central, not MAJN (Mangaluru Jn).

5. Set the journey date

browse click @<date-input-ref>    # opens the p-calendar
browse snapshot
# Navigate the calendar header to the target month/year, then click the day.
browse click @<next-month-chevron>   # repeat until the panel shows December 2026
browse click @<day-cell "15">

The date field is a p-calendar. Advance the month chevron to the ARP month, then click the day cell. Leave Quota = GENERAL (default) unless a specific quota is required.

6. Search

browse snapshot
browse click @<Search-button-ref>
browse wait timeout 5000          # train list renders progressively
browse snapshot

7. Locate the 20:10 train and read availability

browse get text body              # scan for "12601", "MANGALURU MAIL", departure "20:10"
browse snapshot
  • Find the card for 12601 / MANGALURU MAIL with departure 20:10.
  • Each class tile (SL, 3A, 2A, 1A, …) shows the class, the fare, and an availability status. Live availability for the journey date often loads only after you click the class tile — click the tile (this is a read action, it does not book), then re-snapshot:
browse click @<class-tile e.g. "SL">
browse wait timeout 3000
browse snapshot                   # now shows AVAILABLE-NNNN / RAC NN / WL NN / REGRET
  • Repeat per class you need. Stop here. The green Book Now button under a class is the read-only boundary — do not click it.

8. Extract & emit

Emit the JSON in Expected Output. If any step hit Access Denied / captcha / "reservation period not open", emit the success: false shape with error_reasoning.

Fallback — train identity & schedule only (no live availability)

If you only need to confirm the train, its timings, and that it runs on the journey date (not live seat counts), erail.in is reachable from blocked-IP environments and mirrors Indian Railways timetable data:

# JSON timetable feed (no auth, works via browse cloud fetch --proxies):
browse cloud fetch "https://erail.in/rail/getTrains.aspx?Station_From=MAS&Station_To=MAQ&DataSource=0&Language=0&Cache=true" --proxies

This returns a ~/^-delimited record confirming 12601 | MAS MAQ SF MAIL | dep 20.10 | arr 12.06 | daily (1111111) | Superfast | 889 km | ARP 60. It does not give live seat availability or fares for a future date — that is IRCTC-only. erail.in/12601 (HTML) shows the full schedule and class list.

Site-Specific Gotchas

  • Akamai hard-blocks Browserbase browser egress — confirmed, no workaround from this runtime. Every CDP browser session on irctc.co.in returned Access Denied with an errors.edgesuite.net/18.* reference, across all four stealth configs tried: --proxies (US pool), --verified --proxies, body-level proxies:[{geolocation:{country:"IN"}}] in ap-southeast-1, and advancedStealth:true + India proxy. The ban is per egress IP / proxy-pool, not a fingerprint or warm-up problem — opening the homepage first does not help, and the block is served identically to the homepage and deep links. Don't waste iterations re-trying Browserbase stealth variants; the only fix is a different, IRCTC-trusted egress (Indian residential/mobile IP outside known proxy pools).
  • browse cloud fetch --proxies is the ONE surface that returns 200 — but it only returns the static Angular index.html shell (~12.8 KB, has app-root, no train data). A plain browse cloud fetch (no proxy) returns 403 Access Denied. The 200 is deceptive: it proves the proxy egress isn't geo-blocked for static fetches, but it cannot run the SPA, so it yields no availability data. Do not mistake the 200 shell for a working data path.
  • No usable REST shortcut. The real availability endpoint POST /eticketing/protected/mapps1/avlFarenquiry/{train}/{date}/{src}/{dst}/{class}/{quota}/... requires app-signed greq/bmirak headers + a bootstrap bearer token + live Akamai sensor cookies. Not reproducible headlessly. Don't try to call it directly — confirmed infeasible.
  • ARP = 60 days, excluding journey date; opens 08:00 IST. Requesting a date > 60 days out is rejected with "Reservation period is not open for selected date". The user's "every Monday 8 AM" is the booking-day they intend to use; IRCTC actually opens the ARP window daily at 08:00 IST for the date exactly 60 days ahead (plus Tatkal at 10:00/11:00 IST one day prior) — it is not Monday-specific. Assumption made: journey date = booking date + 60 calendar days.
  • Station codes: From = MAS (Chennai Central / "Mgr Chennai Ctr"), To = MAQ (Mangaluru/Mangalore Central). Do not confuse MAQ with MAJN (Mangaluru Jn) — 12601 terminates at MAQ.
  • Train identity: erail/IR labels 12601 as "MAS MAQ SF MAIL"; the common name is Mangaluru Mail / Mangalore Mail. Departs 20:10, arrives 12:06 (+1 day), ~15h56m, runs daily, Superfast. A sibling number 22638 appears in the IR feed (shared rake/slip) — the 20:10 ex-MAS service is 12601.
  • PrimeNG autocomplete timing. The From/To fields are p-autocomplete; the suggestion panel animates in ~1–1.5s after typing. Snapshot and click the exact - MAS/- MAQ row; pressing Enter early submits an empty station.
  • Availability loads on class-tile click. The search results list trains with fares, but live per-date availability (AVAILABLE/RAC/WL/REGRET) frequently populates only after you click the class tile. Clicking a class tile is read-only; clicking Book Now is the forbidden boundary.
  • Login/captcha wall is downstream. The captcha and account login only appear after Book Now — the availability flow above does not require login, so a read-only run never needs credentials (another reason to stop at results).
  • Inner-agent corroboration. An independent autobrowse run hit the identical Access Denied wall over ~20 turns, correctly diagnosed it as Akamai, and pivoted to erail.in on its own — consistent with the fallback above.

Expected Output

// Success (from an IRCTC-trusted network) — availability read for the 20:10 train
{
  "success": true,
  "train_number": "12601",
  "train_name": "MANGALURU MAIL",
  "from": "MAS",
  "from_name": "Chennai Central",
  "to": "MAQ",
  "to_name": "Mangaluru Central",
  "departure": "20:10",
  "arrival": "12:06",
  "duration": "15h56m",
  "quota": "GENERAL",
  "journey_date": "2026-12-15",
  "booking_date": "2026-10-16",
  "arp_days": 60,
  "classes": [
    { "class": "SL", "fare": "530",  "availability": "AVAILABLE-0123" },
    { "class": "3A", "fare": "1405", "availability": "WL 12" },
    { "class": "2A", "fare": "2010", "availability": "AVAILABLE-0045" },
    { "class": "1A", "fare": "3390", "availability": "RAC 3" }
  ],
  "read_only_stop": "availability screen (did not click Book Now / login / pay)",
  "error_reasoning": null
}
// Blocked by Akamai (this runtime's actual outcome)
{
  "success": false,
  "train_number": "12601",
  "journey_date": "2026-12-15",
  "error_reasoning": "Akamai 'Access Denied' (errors.edgesuite.net/18.*) on every irctc.co.in request across proxies-only, verified+proxies, India-geo proxy, and advancedStealth+India-proxy sessions. Browserbase egress IPs are IP-banned by IRCTC. Requires an Indian residential/mobile egress outside known proxy pools."
}
// Date outside ARP
{
  "success": false,
  "journey_date": "2027-02-01",
  "error_reasoning": "Reservation period is not open for selected date — journey date is beyond the 60-day ARP window."
}