Purpose
Find master rooms for rent on iBilik in specified locations, geographic corridors, or station areas, returning listing links and visible listing text for downstream report filtering.
When to Use
Use when the caller provides one or more iBilik locations or a geographic corridor and wants master-room rental listings. The caller may supply location names such as Bukit Jalil, Sungai Besi, or Kuchai Lama, or a station-area query supported by iBilik.
Workflow
- For ordinary locations, convert each requested location to the lowercase hyphenated iBilik location slug, preserving meaningful alphanumeric tokens (for example,
Bukit Jalil→bukit-jalil). Navigate directly tohttps://www.ibilik.com/locations/malaysia/kuala-lumpur/{location-slug}?roomType=MASTER_ROOM. - The shorter
https://www.ibilik.com/rooms/{location-slug}?roomType=MASTER_ROOMroute may also work, but the/locations/malaysia/kuala-lumpur/route is preferred. - For a supported station-area search, construct the single direct URL
https://www.ibilik.com/room-rentals/search?roomType=MASTER&area={area-slug}and navigate to it. TheroomType=MASTERquery parameter applies the master-room filter without requiring an in-page click. Examples of readable station slugs includelrt-sungai-besi-sp16andlrt-bukit-jalil-sp17; the station suffix is part of the site-provided area identifier and must not be invented when unknown. - For a corridor or multiple areas, repeat the direct station URL for each requested
{area-slug}, extract each result set, and de-duplicate listings by URL. Known adjacent LRT area slug patterns includelrt-bandar-tun-razak-sp13,lrt-salak-selatan-sp14,lrt-bandar-tasik-selatan-sp15,lrt-sungai-besi-sp16,lrt-bukit-jalil-sp17,lrt-sri-petaling-sp18,lrt-awan-besar-sp19,lrt-muhibbah-sp20,lrt-alam-sutera-sp21, andlrt-kinrara-bk5-sp22. - In one browser call where possible, navigate directly to the selected URL, wait for the results DOM, and run this
evaluate()extractor on the loaded results page:
(() => {
const origin = location.origin;
const visible = el => {
const s = getComputedStyle(el), r = el.getBoundingClientRect();
return s.display !== 'none' && s.visibility !== 'hidden' && r.width > 0 && r.height > 0;
};
const clean = s => (s || '').replace(/\\s+/g, ' ').trim();
const rows = [], seen = new Set();
for (const a of document.querySelectorAll('a[href]')) {
if (!visible(a)) continue;
const url = new URL(a.getAttribute('href'), location.href);
if (url.origin !== origin || !/^\\/room-rentals\\/[a-f0-9-]{10,}/i.test(url.pathname)) continue;
const card = a.closest('article, li, [class*="card"], [class*="listing"], [class*="room"]');
const text = clean((card || a).textContent);
const heading = card && card.querySelector('h3,h2,h4');
const title = clean(heading ? heading.textContent : a.textContent);
if (!title || !text || seen.has(url.href)) continue;
seen.add(url.href);
rows.push({title, url: url.href, text});
}
return rows;
})()- Apply caller-supplied report criteria to each returned
titleandtext; do not assume every visible anchor is a listing without checking that its URL matches/room-rentals/{opaque-id}and that its surrounding card contains listing text. - If the station-area slug is unknown, use the homepage UI only as a fallback: on
https://www.ibilik.com/orhttps://www.ibilik.my/, type the station/area name intoinput[type='text'], wait for suggestions, select the button whose text exactly matches or contains the requested area, then select the submit button whose trimmed text isSearch. The selected suggestion must precede submission; read the resulting URL and reuse itsareavalue for future direct navigation.
Site-Specific Gotchas
- The durable direct URL pattern for ordinary locations is
/locations/malaysia/kuala-lumpur/{location-slug}?roomType=MASTER_ROOM; avoid visiting the homepage and typing into the search box when a location slug is sufficient. - Station-area searches support the direct combined query
/room-rentals/search?roomType=MASTER&area={area-slug}. This is shorter and more reliable than loading/room-rentals/search?area={area-slug}and clickingbutton#room-type-MASTERafterward. - Station slugs may encode the LRT station name plus an opaque-looking line/station code, such as
lrt-sungai-besi-sp16; obtain unsupported slugs from iBilik suggestions rather than guessing. - iBilik may redirect between
www.ibilik.comandwww.ibilik.my; accept the canonical redirected host. - Listing links observed in the search HTML use
/room-rentals/{opaque-id}. The extractor filters to that path shape, prefers nearby heading text, and de-duplicates repeated card links. - The extractor's card detection uses several class-name conventions because no single stable listing-card selector was established. Verify unusual results before reporting them.
- The station-area fallback requires selecting the suggestion before clicking
Search; typing the text alone does not establish the area filter.
Expected Output
An array of de-duplicated objects, one per candidate listing, shaped as {title, url, text}. Combine arrays from all requested location or station-area slugs and retain the source location or area separately when needed for the report.