Malaysia Transit — KTMB Rail & Easybook Bus Routes avatar

Malaysia Transit — KTMB Rail & Easybook Bus Routes

Pricing

Pay per event

Go to Apify Store
Malaysia Transit — KTMB Rail & Easybook Bus Routes

Malaysia Transit — KTMB Rail & Easybook Bus Routes

Scrape Malaysian transit data: KTMB rail stations (ETS, Intercity, Komuter — ~150 stations with IDs and state groupings) and Easybook intercity bus routes (80+ routes with distance, duration, and city-pair metadata). Transit network graph for travel apps, MaaS platforms, and mapping services.

Pricing

Pay per event

Rating

0.0

(0)

Developer

BowTiedRaccoon

BowTiedRaccoon

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Malaysia Transit Scraper — KTMB Rail & Easybook Bus Routes

Extracts Malaysian public transit network data from two sources: the KTMB rail station directory and the Easybook intercity bus route catalog. Delivers the station and route graph used by travel apps, MaaS platforms, and regional mapping services — without requiring live schedule queries or CAPTCHA solving.

Malaysia Transit Scraper Features

  • Scrape KTMB rail stations across Peninsular Malaysia — ~150 stations covering ETS, Intercity, and Komuter lines with numeric station IDs and state groupings
  • Scrape the Easybook intercity bus route catalog — 400+ Malaysia routes with city-pair metadata including distance, average journey duration, and operator count
  • Filter by data source: KTMB rail only, Easybook bus only, or both in a single run
  • Cap results with maxItems for sampling or testing without pulling the full catalog
  • Runs on Malaysian residential proxy for geo-consistent content
  • Handles rate limiting and retries automatically via CoreCrawler

Who Uses Malaysian Transit Data?

  • MaaS platforms — bootstrap a Malaysia transit network graph without manually compiling station lists from PDFs or timetable PDFs
  • Travel apps — populate route finders and journey planners with real station IDs and city-pair links
  • Regional mapping services — overlay rail and bus networks on maps using structured place IDs and geographic metadata
  • Transport researchers — analyze intercity connectivity, route coverage, and operator presence across Peninsular Malaysia
  • Developers — integrate KTMB station IDs directly with the KTMB booking API for downstream automation

How Malaysia Transit Scraper Works

  1. Select which data source to scrape: KTMB rail stations, Easybook bus routes, or both.
  2. For KTMB, the scraper fetches the timetable search page and extracts the embedded groupedStations JSON — all ~150 stations with their IDs, names, lines, and state groupings, no CAPTCHA required.
  3. For Easybook, the scraper fetches the Malaysia bus route directory, collects all route links, and visits each route page to extract static metadata: distance, average duration, operator count, and from/to place IDs from the embedded search view model.
  4. Results are saved as flat records. KTMB and Easybook records share the same schema with null fields for inapplicable columns.

Input

{
"dataSource": "all",
"maxItems": 15
}
FieldTypeDefaultDescription
dataSourceString"all"Which sources to scrape. Options: "all", "ktmb_stations", "easybook_routes".
maxItemsInteger15Maximum records to return across all sources.
proxyConfigurationObjectMalaysian residentialApify proxy configuration. Defaults to MY residential proxy for geo-consistent results.

KTMB Stations Only

{
"dataSource": "ktmb_stations",
"maxItems": 150
}

Easybook Bus Routes Only

{
"dataSource": "easybook_routes",
"maxItems": 100
}

Malaysia Transit Scraper Output Fields

KTMB Rail Station Record

{
"record_type": "ktmb_station",
"source": "KTMB",
"station_id": "19100",
"station_name": "KL SENTRAL",
"line": "ETS / Intercity",
"state": "Kuala Lumpur",
"from_city": null,
"from_place_id": null,
"to_city": null,
"to_place_id": null,
"distance_km": null,
"avg_duration_mins": null,
"operator_count": null,
"route_url": null
}

Easybook Bus Route Record

{
"record_type": "easybook_route",
"source": "Easybook",
"station_id": null,
"station_name": null,
"line": null,
"state": null,
"from_city": "Kuala Lumpur",
"from_place_id": "2",
"to_city": "Penang",
"to_place_id": "5",
"distance_km": 351.0,
"avg_duration_mins": 294,
"operator_count": 12,
"route_url": "https://www.easybook.com/en-my/bus/booking/kualalumpur-to-penang"
}
FieldTypeDescription
record_typeStringRecord type: ktmb_station or easybook_route
sourceStringData source name: KTMB or Easybook
station_idStringKTMB numeric station ID (KTMB records only)
station_nameStringKTMB station name in uppercase (KTMB records only)
lineStringTrain line or service type — ETS / Intercity / Komuter (KTMB records only)
stateStringMalaysian state where the station is located (KTMB records only)
from_cityStringOrigin city for the bus route (Easybook records only)
from_place_idStringEasybook internal place ID for the origin city
to_cityStringDestination city for the bus route (Easybook records only)
to_place_idStringEasybook internal place ID for the destination city
distance_kmNumberRoute distance in kilometres (Easybook records only)
avg_duration_minsNumberAverage journey duration in minutes (Easybook records only)
operator_countNumberNumber of bus operators serving this route (Easybook records only)
route_urlStringEasybook route page URL (Easybook records only)

Scope and Limitations

This scraper extracts the static transit network directory — station catalogs and route metadata. It does not extract:

  • Live departure times or timetables (gated behind CAPTCHA on both KTMB and Easybook)
  • Fare prices or seat availability (CAPTCHA-gated)
  • Real-time service status or disruptions

The station and route data changes infrequently and is stable for use in network graph construction, mapping overlays, and app bootstrapping.