# Singapore Transit Scraper — MRT, LRT, Bus via LTA DataMall (`jungle_synthesizer/singapore-transit-scraper`) Actor

Singapore transit data via LTA DataMall REST API. Real-time bus arrivals, bus stops with coordinates, service inventories, bus routes with stop sequences, and MRT/LRT service alerts. Covers MRT, LRT, and bus services (SMRT, SBS Transit, Tower Transit, Go-Ahead). Free AccountKey required.

- **URL**: https://apify.com/jungle\_synthesizer/singapore-transit-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Travel, Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Singapore Transit Scraper — MRT, LRT, Bus via LTA DataMall

Extracts Singapore public transit data from the [LTA DataMall REST API](https://datamall.lta.gov.sg/). Covers real-time bus arrivals, full bus stop inventories with GPS coordinates, bus service definitions, route-stop sequences, and live MRT/LRT service alerts — five modes, one actor, free government API.

---

### Singapore Transit Scraper Features

- Extracts real-time bus arrival ETAs for any bus stop — next three buses, loading status, wheelchair access, bus type (single/double deck/bendy)
- Returns the complete inventory of ~5,400 bus stops with latitude, longitude, and road name
- Collects all ~600 bus service definitions including operator, first/last bus times by day type, and service category
- Downloads ~30,000 bus route-stop records with stop sequences and cumulative distance from origin
- Fetches current MRT/LRT service alerts — normal-service status or disruption details with affected segments and timestamps
- Pure API — no browser, no proxy, no HTML parsing. DataMall is a public government endpoint with no geo-restrictions.
- A valid LTA DataMall AccountKey is required. Registration is free at [datamall.lta.gov.sg](https://datamall.lta.gov.sg/content/datamall/en/request-for-api.html).

---

### What Can You Do with Singapore Transit Data?

- **MaaS developers** — Build real-time arrival displays, trip planners, or transit apps on top of official LTA data rather than scraping operator websites
- **Logistics and last-mile planners** — Map bus stop locations against delivery zones to identify coverage gaps or plan fleet positioning
- **Urban mobility researchers** — Analyse Singapore's route network structure, service frequency by area, or first/last bus timing coverage
- **Transit alert systems** — Monitor MRT/LRT disruptions in real time and trigger notifications for affected commuters or services
- **Data journalists** — Track service changes, new routes, and LTA schedule adjustments over time
- **Fintech and PropTech analysts** — Score properties by transit access using bus stop density, route counts, and MRT proximity

---

### How Singapore Transit Scraper Works

1. **Choose a mode.** Five modes cover different data types: `bus_arrival` for real-time ETAs, `bus_stops` / `bus_services` / `bus_routes` for the static network inventories, and `train_alerts` for live MRT/LRT status.
2. **Provide your LTA AccountKey.** The scraper passes it as the `AccountKey` header on every request. The DataMall API enforces authentication on all endpoints.
3. **The scraper calls the API.** For `bus_arrival` and `train_alerts`, it's a single request. For the three static modes, it pages through results in batches of 500 using `$skip` until it hits your `maxItems` limit or exhausts the dataset.
4. **Results land in the Apify dataset.** Each record is a flat JSON object. A `record_type` field tells you which mode produced it, so mixed exports stay sorted.

---

### Input

```json
{
  "mode": "bus_arrival",
  "ltaApiKey": "your-lta-accountkey-here",
  "busStopCode": "83139",
  "serviceNo": "",
  "maxItems": 15,
  "sp_intended_usage": "Real-time bus arrival display for commuters",
  "sp_improvement_suggestions": "n/a"
}
````

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `mode` | string | `bus_arrival` | Which dataset to fetch. One of: `bus_arrival`, `bus_stops`, `bus_services`, `bus_routes`, `train_alerts`. |
| `ltaApiKey` | string | *(required)* | Your LTA DataMall AccountKey. Free registration at datamall.lta.gov.sg. |
| `busStopCode` | string | `83139` | 5-digit bus stop code. Required for `bus_arrival` mode. Run `bus_stops` mode to find codes. |
| `serviceNo` | string | *(empty)* | Filter by bus service number (e.g. `857`, `65M`). Optional — omit to return all services at the stop. |
| `maxItems` | integer | `15` | Max records to return. Caps pagination for `bus_stops`, `bus_services`, and `bus_routes`. Set high for full inventories. |

**Additional examples by mode:**

```json
{
  "mode": "bus_stops",
  "ltaApiKey": "your-lta-accountkey-here",
  "maxItems": 5400
}
```

```json
{
  "mode": "train_alerts",
  "ltaApiKey": "your-lta-accountkey-here",
  "maxItems": 10
}
```

***

### Singapore Transit Scraper Output Fields

Output varies by mode. Every record includes `record_type`, `source_url`, and `scraped_at`.

#### bus\_arrival

```json
{
  "record_type": "arrival",
  "operator": "SMRT",
  "service_no": "858",
  "stop_code": "83139",
  "eta_1_time": "2026-05-05T06:14:22.000Z",
  "eta_1_minutes": 3,
  "eta_1_load": "SEA",
  "eta_1_feature": "WAB",
  "eta_1_type": "SD",
  "eta_2_time": "2026-05-05T06:23:10.000Z",
  "eta_2_minutes": 12,
  "eta_2_load": "SDA",
  "eta_2_type": "DD",
  "eta_3_time": "2026-05-05T06:34:55.000Z",
  "eta_3_minutes": 23,
  "eta_3_load": "SEA",
  "eta_3_type": "SD",
  "bus_load": "SEA",
  "bus_feature": "WAB",
  "source_url": "https://datamall2.mytransport.sg/ltaodataservice/v3/BusArrival?BusStopCode=83139",
  "scraped_at": "2026-05-05T06:11:00.000Z"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `record_type` | string | Always `arrival` for this mode |
| `operator` | string | Bus operator: SMRT, SBS Transit, Tower Transit, Go-Ahead Singapore |
| `service_no` | string | Bus service number |
| `stop_code` | string | 5-digit bus stop code |
| `eta_1_time` | string | ISO 8601 arrival time for next bus |
| `eta_1_minutes` | number | Minutes until next bus arrives |
| `eta_1_load` | string | SEA (seats available), SDA (standing available), LSD (limited standing) |
| `eta_1_feature` | string | WAB = wheelchair accessible bus |
| `eta_1_type` | string | SD = single deck, DD = double deck, BD = bendy |
| `eta_2_time` | string | Arrival time for 2nd next bus |
| `eta_2_minutes` | number | Minutes until 2nd next bus |
| `eta_2_load` | string | Passenger load for 2nd bus |
| `eta_2_type` | string | Bus type for 2nd bus |
| `eta_3_time` | string | Arrival time for 3rd next bus |
| `eta_3_minutes` | number | Minutes until 3rd next bus |
| `eta_3_load` | string | Passenger load for 3rd bus |
| `eta_3_type` | string | Bus type for 3rd bus |
| `bus_load` | string | Alias for `eta_1_load` |
| `bus_feature` | string | Alias for `eta_1_feature` |
| `source_url` | string | DataMall endpoint URL |
| `scraped_at` | string | ISO 8601 extraction timestamp |

#### bus\_stops

```json
{
  "record_type": "stop",
  "stop_code": "83139",
  "stop_name": "Bedok Int",
  "road_name": "New Upper Changi Rd",
  "latitude": 1.32479,
  "longitude": 103.93002,
  "source_url": "https://datamall2.mytransport.sg/ltaodataservice/BusStops?$skip=0",
  "scraped_at": "2026-05-05T06:11:00.000Z"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `record_type` | string | Always `stop` |
| `stop_code` | string | 5-digit bus stop code |
| `stop_name` | string | Official stop name / description |
| `road_name` | string | Road the stop is on |
| `latitude` | number | WGS84 latitude |
| `longitude` | number | WGS84 longitude |

#### bus\_services

```json
{
  "record_type": "service",
  "service_no": "858",
  "operator": "SMRT",
  "direction": 1,
  "service_type": "TRUNK",
  "category": "TRUNK",
  "origin_code": "46009",
  "destination_code": "84009",
  "loop_desc": "",
  "first_bus_weekday": "0430",
  "last_bus_weekday": "2330",
  "first_bus_saturday": "0500",
  "last_bus_saturday": "2330",
  "first_bus_sunday": "0530",
  "last_bus_sunday": "2330",
  "source_url": "https://datamall2.mytransport.sg/ltaodataservice/BusServices?$skip=0",
  "scraped_at": "2026-05-05T06:11:00.000Z"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `record_type` | string | Always `service` |
| `service_no` | string | Bus service number |
| `operator` | string | Bus operator |
| `direction` | number | 1 = outbound, 2 = inbound |
| `service_type` | string | Service category |
| `category` | string | EXPRESS, FEEDER, INDUSTRIAL, TOWNLINK, TRUNK, NIGHT SERVICE, CITY\_DIRECT, FLAT\_FEE\_BUS |
| `origin_code` | string | First stop code |
| `destination_code` | string | Last stop code |
| `loop_desc` | string | Loop terminal description (looping services only) |
| `first_bus_weekday` | string | First departure time on weekdays (HHMM) |
| `last_bus_weekday` | string | Last departure time on weekdays (HHMM) |
| `first_bus_saturday` | string | First departure on Saturdays (HHMM) |
| `last_bus_saturday` | string | Last departure on Saturdays (HHMM) |
| `first_bus_sunday` | string | First departure on Sundays/PH (HHMM) |
| `last_bus_sunday` | string | Last departure on Sundays/PH (HHMM) |

#### bus\_routes

```json
{
  "record_type": "route_stop",
  "service_no": "858",
  "operator": "SMRT",
  "direction": 1,
  "sequence": 1,
  "stop_code": "46009",
  "distance_km": 0.0,
  "first_bus_weekday": "0430",
  "last_bus_weekday": "2330",
  "first_bus_saturday": "0500",
  "last_bus_saturday": "2330",
  "first_bus_sunday": "0530",
  "last_bus_sunday": "2330",
  "source_url": "https://datamall2.mytransport.sg/ltaodataservice/BusRoutes?$skip=0",
  "scraped_at": "2026-05-05T06:11:00.000Z"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `record_type` | string | Always `route_stop` |
| `service_no` | string | Bus service number |
| `operator` | string | Bus operator |
| `direction` | number | 1 = outbound, 2 = inbound |
| `sequence` | number | Stop sequence on this route (1-based) |
| `stop_code` | string | 5-digit bus stop code |
| `distance_km` | number | Cumulative distance from route origin in km |
| `first_bus_weekday` | string | First departure from this stop on weekdays (HHMM) |
| `last_bus_weekday` | string | Last departure from this stop on weekdays (HHMM) |
| `first_bus_saturday` | string | First departure on Saturdays (HHMM) |
| `last_bus_saturday` | string | Last departure on Saturdays (HHMM) |
| `first_bus_sunday` | string | First departure on Sundays/PH (HHMM) |
| `last_bus_sunday` | string | Last departure on Sundays/PH (HHMM) |

#### train\_alerts

```json
{
  "record_type": "train_alert",
  "train_alert_status": "Disrupted",
  "affected_segments": "CCL:City:Caldecott:Bartley",
  "train_alert_message": "05:00-CCL-Planned Service Adjustment. Circle Line train services will end earlier at 11.00pm on Saturday nights.",
  "train_alert_created_at": "2026-04-10T00:15:58.000Z",
  "source_url": "https://datamall2.mytransport.sg/ltaodataservice/TrainServiceAlerts",
  "scraped_at": "2026-05-05T06:11:00.000Z"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `record_type` | string | Always `train_alert` |
| `train_alert_status` | string | `Normal` or `Disrupted` |
| `affected_segments` | string | MRT/LRT segments affected, comma-separated (empty when Normal) |
| `train_alert_message` | string | Human-readable alert text from LTA |
| `train_alert_created_at` | string | ISO 8601 timestamp of the alert |

***

### FAQ

#### How do I get an LTA DataMall API key?

Singapore Transit Scraper requires a free AccountKey from [LTA DataMall](https://datamall.lta.gov.sg/content/datamall/en/request-for-api.html). Fill out the registration form — name, company, email, intended use — and LTA sends the key by email. Registration is free for any use case. Most applicants receive their key within a business day.

#### How much does Singapore Transit Scraper cost to run?

Singapore Transit Scraper charges $0.10 per actor start plus $0.0008 per record. A full bus stop inventory (~5,400 records) runs roughly $4.40 total. Real-time arrivals for a single stop return 3–15 records, making it a few cents per call. Train alerts return a handful of messages at most.

#### What transit data does LTA DataMall provide?

Singapore Transit Scraper wraps five LTA DataMall datasets: real-time bus arrivals, the complete bus stop network (~5,400 stops with GPS), all bus services (~600), bus route-stop sequences (~30,000 records), and current MRT/LRT alerts. MRT timetables, taxi availability, ERP gantry data, and parking availability are separate DataMall endpoints not covered in this actor.

#### Does Singapore Transit Scraper need proxies?

No. LTA DataMall is a Singapore government API with no geo-restrictions and no aggressive rate limiting. The scraper runs without proxy configuration and adds a 200ms courtesy delay between paginated requests.

#### Can I get arrivals for multiple bus stops in one run?

`bus_arrival` mode takes one `busStopCode` per actor run. To query multiple stops, trigger parallel runs via the Apify API. Use `bus_stops` mode first to build a complete stop list with codes.

***

### Need More Features?

Need additional DataMall endpoints, multi-stop arrival batching, or scheduled monitoring? [File a request](https://console.apify.com/actors/issues) or get in touch.

### Why Use Singapore Transit Scraper?

- **Official data** — Sourced directly from LTA DataMall, Singapore's authoritative transit data source. The same data that powers the MyTransport.SG app.
- **Five datasets in one actor** — Real-time arrivals, bus stops, services, routes, and train alerts without managing multiple API integrations or paginating $skip loops yourself.
- **No infrastructure overhead** — No browser, no proxy, no fragile HTML parsing. DataMall returns clean JSON; Singapore Transit Scraper normalizes it into flat records and handles pagination, retries, and rate limiting.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

Please describe how you plan to use the data extracted by this crawler.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

Provide your email address so we can get in touch with you.

## `mode` (type: `string`):

What to extract. bus\_arrival returns real-time arrivals for a bus stop. bus\_stops returns all bus stops with coordinates. bus\_services returns all bus service definitions. bus\_routes returns all bus routes with stop sequences. train\_alerts returns current MRT/LRT disruption notices.

## `ltaApiKey` (type: `string`):

Your AccountKey from LTA DataMall (datamall.lta.gov.sg). Free registration required. Leave blank only if an OrbTop shared key is configured — check actor docs for availability.

## `busStopCode` (type: `string`):

5-digit bus stop code. Required for bus\_arrival mode. Example: 83139 (Bedok Interchange). Find codes via bus\_stops mode.

## `serviceNo` (type: `string`):

Filter by bus service number (e.g. '857', '65'). Optional — when empty returns all services at the stop.

## `maxItems` (type: `integer`):

Maximum records to return. Applies to bus\_stops, bus\_services, and bus\_routes pagination. Set 15 or lower for fast test runs. Full inventories: bus\_stops ~5400, bus\_services ~600, bus\_routes ~30000.

## `proxyConfiguration` (type: `object`):

Proxy not required — LTA DataMall is a public government API with no geo-restrictions. Default: no proxy.

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "mode": "bus_arrival",
  "busStopCode": "83139",
  "maxItems": 15,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "mode": "bus_arrival",
    "ltaApiKey": "",
    "busStopCode": "83139",
    "serviceNo": "",
    "maxItems": 15,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/singapore-transit-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "mode": "bus_arrival",
    "ltaApiKey": "",
    "busStopCode": "83139",
    "serviceNo": "",
    "maxItems": 15,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/singapore-transit-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "mode": "bus_arrival",
  "ltaApiKey": "",
  "busStopCode": "83139",
  "serviceNo": "",
  "maxItems": 15,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call jungle_synthesizer/singapore-transit-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=jungle_synthesizer/singapore-transit-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Singapore Transit Scraper — MRT, LRT, Bus via LTA DataMall",
        "description": "Singapore transit data via LTA DataMall REST API. Real-time bus arrivals, bus stops with coordinates, service inventories, bus routes with stop sequences, and MRT/LRT service alerts. Covers MRT, LRT, and bus services (SMRT, SBS Transit, Tower Transit, Go-Ahead). Free AccountKey required.",
        "version": "1.0",
        "x-build-id": "dApXm6ZvRJk6mMrES"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/jungle_synthesizer~singapore-transit-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-jungle_synthesizer-singapore-transit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/jungle_synthesizer~singapore-transit-scraper/runs": {
            "post": {
                "operationId": "runs-sync-jungle_synthesizer-singapore-transit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/jungle_synthesizer~singapore-transit-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-jungle_synthesizer-singapore-transit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "sp_intended_usage",
                    "sp_improvement_suggestions"
                ],
                "properties": {
                    "sp_intended_usage": {
                        "title": "What is the intended usage of this data?",
                        "minLength": 1,
                        "type": "string",
                        "description": "Please describe how you plan to use the data extracted by this crawler."
                    },
                    "sp_improvement_suggestions": {
                        "title": "How can we improve this crawler for you?",
                        "minLength": 1,
                        "type": "string",
                        "description": "Provide any feedback or suggestions for improvements."
                    },
                    "sp_contact": {
                        "title": "Contact Email",
                        "minLength": 1,
                        "type": "string",
                        "description": "Provide your email address so we can get in touch with you."
                    },
                    "mode": {
                        "title": "Scrape Mode",
                        "enum": [
                            "bus_arrival",
                            "bus_stops",
                            "bus_services",
                            "bus_routes",
                            "train_alerts"
                        ],
                        "type": "string",
                        "description": "What to extract. bus_arrival returns real-time arrivals for a bus stop. bus_stops returns all bus stops with coordinates. bus_services returns all bus service definitions. bus_routes returns all bus routes with stop sequences. train_alerts returns current MRT/LRT disruption notices.",
                        "default": "bus_arrival"
                    },
                    "ltaApiKey": {
                        "title": "LTA DataMall API Key",
                        "type": "string",
                        "description": "Your AccountKey from LTA DataMall (datamall.lta.gov.sg). Free registration required. Leave blank only if an OrbTop shared key is configured — check actor docs for availability."
                    },
                    "busStopCode": {
                        "title": "Bus Stop Code",
                        "type": "string",
                        "description": "5-digit bus stop code. Required for bus_arrival mode. Example: 83139 (Bedok Interchange). Find codes via bus_stops mode."
                    },
                    "serviceNo": {
                        "title": "Bus Service Number",
                        "type": "string",
                        "description": "Filter by bus service number (e.g. '857', '65'). Optional — when empty returns all services at the stop."
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "type": "integer",
                        "description": "Maximum records to return. Applies to bus_stops, bus_services, and bus_routes pagination. Set 15 or lower for fast test runs. Full inventories: bus_stops ~5400, bus_services ~600, bus_routes ~30000.",
                        "default": 15
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy not required — LTA DataMall is a public government API with no geo-restrictions. Default: no proxy."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
