Developer Platform REST API & LLM Tool Spec

API & AI Integration Reference

Fast, CORS-enabled, unauthenticated REST APIs providing unified real-time Singapore data for developers, autonomous AI agents, and custom integrations.

πŸ€– llms.txt πŸ“‹ llms-full.txt

⚑ Overview & Base URL

All SingaNow APIs are served over HTTPS, return UTF-8 JSON payloads with standard HTTP response status codes, and allow cross-origin requests (CORS). No API keys or registration tokens are required for public endpoints.

Base URL
https://singanow.com/api
Timezone
Asia/Singapore (UTC+8)
Rate Limit
Generous / Stale-Cache Guard
GET /api/bus/arrival

Live Bus Arrival Times & Capacity

Returns real-time arrival predictions, passenger load levels (SEA: Seats Available, SDA: Standing Available, LSD: Limited Standing), wheelchair accessibility, and next 3 buses for a given bus stop.

ParameterTypeRequiredDefaultDescription
stopstringRequiredβ€”5-digit Singapore Bus Stop Code (e.g. 01012).
servicestringOptionalβ€”Filter by bus service number (e.g. 190).
refreshbooleanOptionalfalseSet to 1 to bypass cache and query LTA directly.
πŸ§ͺ Live API Console
GET /api/bus/services

Bus Services Directory & Full Route Lookup

Returns all public bus services or full bidirectional stop sequences, operating hours, and operators for a specific service.

ParameterTypeRequiredDefaultDescription
servicestringOptionalβ€”Single bus service lookup with full route stops (e.g. 190).
qstringOptionalβ€”Filter by service number or terminal/interchange name.
operatorstringOptionalβ€”SBST, SMRT, TTS, GAS.
categorystringOptionalβ€”TRUNK, FEEDER, EXPRESS, INDUSTRIAL.
πŸ§ͺ Live API Console
GET /api/bus/stops

Bus Stops Lookup & Search

Search over 5,200 Singapore bus stops by stop code, road name, or description, with calling bus service numbers.

ParameterTypeRequiredDefaultDescription
qstringOptionalβ€”Keyword query (e.g. Orchard, Bedok, Victoria).
codestringOptionalβ€”Exact 5-digit bus stop code lookup (e.g. 09048).
limitintegerOptional30Max results (1 to 100).
πŸ§ͺ Live API Console
GET /api/bus/routes

Sequential Bus Route Stops

Returns the ordered stop sequence, cumulative distance in kilometers, and scheduled first/last bus timings for a given service.

ParameterTypeRequiredDefaultDescription
servicestringRequiredβ€”Bus service number (e.g. 65).
dirintegerOptional1Direction: 1 (Outbound) or 2 (Return).
πŸ§ͺ Live API Console
GET /api/bus/nearby

GPS Nearby Bus Stops & Distance

Finds the nearest bus stops and walking distances from any GPS coordinate in Singapore.

ParameterTypeRequiredDefaultDescription
latfloatRequiredβ€”WGS84 Latitude (e.g. 1.2968).
lngfloatRequiredβ€”WGS84 Longitude (e.g. 103.8525).
radiusfloatOptional1.2Radius in kilometers (0.1 to 10.0).
limitintegerOptional20Max results (1 to 50).
πŸ§ͺ Live API Console
GET /api/bus/planned

Planned Bus Route Changes

Returns scheduled upcoming bus route diversions, road works, and network adjustments.

πŸ§ͺ Live API Console
GET /api/weather

2-Hour Regional, 24-Hour Forecast & Live Stations

Provides live 2-hour forecasts across 47 towns, 24-hour national forecast, 4-day outlook, and live climate station telemetry (temperature, humidity, wind, rain).

πŸ§ͺ Live API Console
GET /api/environment

PSI Air Quality, PM2.5 & UV Index

24-hour National & Regional Pollutant Standards Index (PSI), 1-hour PM2.5 readings (North, South, East, West, Central), and hourly UV index trends.

πŸ§ͺ Live API Console
GET /api/traffic

Live Traffic Camera Feeds

High-definition snapshot images updated every 90 seconds across PIE, CTE, AYE, BKE, ECP, SLE, KJE, TPE, MCE, and Woodlands/Tuas Malaysia border checkpoints.

πŸ§ͺ Live API Console
GET /api/carparks

Real-Time Carpark Availability & Nearby Lots

Live parking lot availability, GPS distance calculations, and vacancy percentages across 2,600+ HDB, LTA (shopping malls & commercial hubs), and URA carparks nationwide.

ParameterTypeRequiredDefaultDescription
latfloatOptionalβ€”User GPS latitude for nearby distance ranking.
lngfloatOptionalβ€”User GPS longitude for nearby distance ranking.
radiusfloatOptional1.5Search radius in km (0.1 to 15.0 km).
querystringOptionalβ€”Search carpark code (e.g. ACB), development/mall (e.g. Suntec, Orchard), or area.
agencystringOptionalALLFilter agency (ALL, HDB, LTA, URA).
lot_typestringOptionalALLVehicle lot type (ALL, C for cars, Y for motorcycles, H for heavy).
sortstringOptionaldistanceSorting order (distance, available, pct).
pageintegerOptional1Pagination page number.
πŸ§ͺ Live API Console
GET /api/ev

Electric Vehicle (EV) Charging Stations & Availability

Directory and live connector availability powered by the Singapore Land Transport Authority (LTA) DataMall API across SP Mobility, Charge+, Tesla Superchargers, CDG ENGIE, Shell Recharge, Keppel Volt, TotalEnergies, and Go by City Energy. Supports 6-digit postal code lookups, connector types (CCS2, Type 2, Tesla), power outputs (7.4kW to 250kW), parking bay locations, tariffs, and GPS distance rankings.

ParameterTypeRequiredDefaultDescription
latfloatOptionalβ€”User GPS latitude for nearby distance ranking.
lngfloatOptionalβ€”User GPS longitude for nearby distance ranking.
radiusfloatOptional2.5Search radius in km (0.1 to 25.0 km).
querystringOptionalβ€”Search station name, address, estate, operator, or postal code (e.g. Orchard, Tampines, Tesla).
operatorstringOptionalALLFilter operator (ALL, SP_MOBILITY, CDG_ENGIE, CHARGE_PLUS, SHELL, TESLA, KEPPEL_VOLT, TOTALENERGIES).
speedstringOptionalALLFilter charging speed (ALL, ULTRA_FAST ≥120kW, FAST_DC 50–100kW, AC_NORMAL 7.4–22kW).
connectorstringOptionalALLFilter connector type (ALL, CCS2, TYPE2, TESLA).
available_onlyintegerOptional0Pass 1 to return only stations with currently available plugs.
sortstringOptionaldistanceSorting order (distance, available, power, name).
pageintegerOptional1Pagination page number.
πŸ§ͺ Live API Console
GET /api/acra

ACRA Corporate Registry & UEN Search

Query 2.1+ million Singapore corporate entities, businesses, LLPs, societies, and healthcare institutions with full SSIC classifications and registered addresses.

ParameterTypeRequiredDefaultDescription
q or querystringRequiredβ€”Company Name or UEN (e.g. Singtel, 201400001A, Grab).
pageintegerOptional1Page number (24 entities per page).
πŸ§ͺ Live API Console

πŸ€– AI Agent & LLM Tool Calling Schema

Copy-paste ready tool definitions compatible with OpenAI Function Calling, Anthropic Claude Tools, Google Gemini, LangChain, and MCP servers:

[
  {
    "type": "function",
    "function": {
      "name": "get_singapore_bus_arrivals",
      "description": "Fetch real-time bus arrivals, passenger crowding (SEA/SDA/LSD), and wheelchair accessibility for a specific 5-digit Singapore bus stop code.",
      "parameters": {
        "type": "object",
        "properties": {
          "bus_stop_code": {
            "type": "string",
            "description": "The 5-digit bus stop code in Singapore (e.g. '01012', '09048')."
          },
          "service_no": {
            "type": "string",
            "description": "Optional service number to filter (e.g. '190', '10', '65')."
          }
        },
        "required": ["bus_stop_code"]
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "find_nearby_singapore_bus_stops",
      "description": "Locate the nearest bus stops and walking distances in kilometers from GPS coordinates in Singapore.",
      "parameters": {
        "type": "object",
        "properties": {
          "latitude": { "type": "number", "description": "WGS84 Latitude (1.15 - 1.48)." },
          "longitude": { "type": "number", "description": "WGS84 Longitude (103.58 - 104.05)." },
          "radius_km": { "type": "number", "description": "Search radius in km (default: 1.2)." }
        },
        "required": ["latitude", "longitude"]
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "search_singapore_bus_stops",
      "description": "Search Singapore bus stops by road name, landmark name, or 5-digit stop code.",
      "parameters": {
        "type": "object",
        "properties": {
          "query": { "type": "string", "description": "Search keyword (e.g. 'Orchard', 'Bedok', 'Victoria', '01012')." }
        },
        "required": ["query"]
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_carpark_availability",
      "description": "Check real-time parking lot vacancy, GPS distance, and available lots across 2,600+ HDB, URA, and LTA commercial shopping mall carparks in Singapore.",
      "parameters": {
        "type": "object",
        "properties": {
          "query": { "type": "string", "description": "Carpark code, mall/development name (e.g. 'Suntec', 'Orchard'), or area." },
          "lat": { "type": "number", "description": "Optional user GPS latitude for distance sorting." },
          "lng": { "type": "number", "description": "Optional user GPS longitude for distance sorting." },
          "radius": { "type": "number", "description": "Search radius in km (default: 1.5)." }
        }
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_ev_charging_points",
      "description": "Search real-time EV charging stations and live plug availability across SP Mobility, CDG ENGIE, Charge+, Shell Recharge, Tesla Superchargers, and HDB hubs in Singapore.",
      "parameters": {
        "type": "object",
        "properties": {
          "query": { "type": "string", "description": "Station name, shopping mall, operator, or 6-digit postal code (e.g. 'Orchard', 'Tesla', '529510')." },
          "operator": { "type": "string", "description": "Filter operator ('ALL', 'SP_MOBILITY', 'CDG_ENGIE', 'CHARGE_PLUS', 'SHELL', 'TESLA', 'KEPPEL_VOLT', 'TOTALENERGIES')." },
          "speed": { "type": "string", "description": "Filter speed ('ALL', 'ULTRA_FAST' >=120kW, 'FAST_DC' 50-100kW, 'AC_NORMAL' 7.4-22kW)." },
          "lat": { "type": "number", "description": "Optional GPS latitude for distance ranking." },
          "lng": { "type": "number", "description": "Optional GPS longitude for distance ranking." }
        }
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_weather",
      "description": "Retrieve live Singapore 2-hour regional area forecast (47 towns), 24-hour national forecast, 4-day outlook, and live climate station readings (temperature, rainfall, humidity).",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_environment_air_quality",
      "description": "Get real-time Singapore 24-hour PSI air quality, 1-hour PM2.5 readings, and hourly UV index by region.",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_traffic_cameras",
      "description": "Get live traffic camera image snapshot URLs for Singapore expressways (PIE, CTE, AYE, etc.) and Malaysia border checkpoints (Woodlands Causeway, Tuas).",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "search_singapore_acra_entity",
      "description": "Search Singapore registered corporate entities, companies, LLPs, and societies by company name or UEN.",
      "parameters": {
        "type": "object",
        "properties": {
          "query": { "type": "string", "description": "Entity name or UEN (e.g. 'DBS Bank', 'Grab', '201812345A')." },
          "page": { "type": "integer", "description": "Page number (default: 1)." }
        },
        "required": ["query"]
      }
    }
  }
]

πŸ’» Code Integration Examples

// Modern TypeScript / JavaScript Fetch Examples
const BASE_URL = "https://singanow.com/api";

// 1. Fetch Real-Time Bus Arrivals
async function getBusArrivals(busStopCode: string, serviceNo?: string) {
  const url = new URL(`${BASE_URL}/bus/arrival`);
  url.searchParams.set("stop", busStopCode);
  if (serviceNo) url.searchParams.set("service", serviceNo);
  const res = await fetch(url.toString());
  return res.json();
}

// 2. Fetch Live EV Charging Stations
async function getEVStations(query = "Orchard", operator = "ALL") {
  const url = new URL(`${BASE_URL}/ev`);
  if (query) url.searchParams.set("query", query);
  if (operator !== "ALL") url.searchParams.set("operator", operator);
  const res = await fetch(url.toString());
  return res.json();
}

// 3. Fetch Nearby Parking Vacancy
async function getCarparksNearGPS(lat: number, lng: number, radius = 1.5) {
  const url = new URL(`${BASE_URL}/carparks`);
  url.searchParams.set("lat", String(lat));
  url.searchParams.set("lng", String(lng));
  url.searchParams.set("radius", String(radius));
  const res = await fetch(url.toString());
  return res.json();
}

// Example usage:
const evData = await getEVStations("Orchard");
console.log(`Found ${evData.total} EV stations. Available plugs: ${evData.summary.totalAvailable}`);