← 返回
效率工具 中文

BusLah - Singapore Bus Arrivals

One-word trigger for next bus arrival to your destination
单字触发,查询到达目的地的下一班公交车
abhayjb
效率工具 clawhub v1.0.0 2 版本 100000 Key: 无需
★ 0
Stars
📥 643
下载
💾 5
安装
2
版本
#latest

概述

ArriveLah - Singapore Bus Arrivals

Natural language bus lookup for Singapore.

Trigger Format

bus from <source location> to <destination location>

Examples:

  • "bus from Silat Road Sikh Temple to Queens condo"
  • "bus from Tanjong Pagar MRT to VivoCity"
  • "bus from my office to home"

Step-by-Step Workflow

Step 1: Geocode source location

Use web_fetch to resolve the source location to coordinates via OneMap API:

https://www.onemap.gov.sg/api/common/elastic/search?searchVal=<source>&returnGeom=Y&getAddrDetails=Y&pageNum=1

Extract LATITUDE and LONGITUDE from the first result.

Step 2: Find nearest bus stops to source

Fetch the full Singapore bus stop list and find stops closest to source coordinates:

https://busrouter.sg/data/2/bus-stops.json

This returns a JSON object where each key is a bus stop code, with fields: description, road, lat, lng.

Compute distance using: sqrt((lat2-lat1)^2 + (lng2-lng1)^2) (approximate is fine for short distances).

Pick the 3 nearest stops within ~300m.

Step 3: Geocode destination location

Same as Step 1 for the destination. Extract its coordinates.

Step 4: Find which buses go from source stops toward destination

For each of the 3 nearest source stops, fetch arrivals:

https://arrivelah2.busrouter.sg/?id=<stop_code>

Then for each bus service at those stops, check if it passes near the destination using:

https://busrouter.sg/data/2/routes.json

This maps bus service numbers to arrays of stop codes in order. Cross-reference with bus-stops.json to get coordinates of each stop on the route, and check if any stop is within ~400m of the destination coordinates.

Keep only buses that:

  1. Have the source stop before the destination stop in their route (correct direction)
  2. Pass within ~400m of the destination

Step 5: Fetch live arrival times

For each matching bus at the source stop, get from the arrivelah2 response:

  • next.duration_ms → minutes until next bus
  • subsequent.duration_ms → minutes until bus after that
  • next.load → seat availability: SEA = Seats Available, SDA = Standing Available, LSD = Limited Standing
  • next.featureWAB = Wheelchair accessible
  • next.typeDD = Double decker, SD = Single deck, BD = Bendy

Step 6: Format and return

🚌 Buses from [Source Stop Name] → [Destination]

Bus [XX]
  ⏰ Next: X min | Then: Y min
  💺 [Seats Available / Standing / Limited Standing]
  🚌 [Double Decker / Single Deck]

Bus [YY]
  ⏰ Next: X min | Then: Y min
  💺 [Seats Available / Standing / Limited Standing]

📍 Stop: [Stop Description], [Road Name] (Stop code: XXXXX)

If no direct bus found, say so and suggest nearest MRT or alternative.

Load Code Reference

  • SEA = Seats Available 🟢
  • SDA = Standing Available 🟡
  • LSD = Limited Standing 🔴

Bus Type Reference

  • DD = Double Decker
  • SD = Single Deck
  • BD = Bendy Bus
  • WAB = Wheelchair Accessible Bus

API Endpoints (no auth needed)

  • OneMap geocode: https://www.onemap.gov.sg/api/common/elastic/search
  • Bus stops: https://busrouter.sg/data/2/bus-stops.json
  • Routes: https://busrouter.sg/data/2/routes.json
  • Live arrivals: https://arrivelah2.busrouter.sg/?id=

版本历史

共 2 个版本

  • v1.0.0 当前
    2026-03-30 00:47 安全 安全
  • v0.0.1
    2026-03-07 02:01

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 433 📥 103,861
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 446 📥 226,454
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 440 📥 148,113