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/plan

Public Bus Transit Journey Planner

Multi-modal bus journey planner. Resolves origin and destination from 5-digit bus stop codes (e.g. 01012), GPS coordinates (1.2968,103.8525), or landmark/stop search terms (e.g. Orchard, Tang Plaza). Returns ordered direct routes and 1-transfer routes with walking distances, stop sequences, cumulative travel times, Google Maps transit deep links, and live arrival times for the first boarding bus.

ParameterTypeRequiredDefaultDescription
fromstringRequiredβ€”Origin 5-digit bus stop code, "lat,lng" coordinates, or landmark/road search term (e.g. 01012).
tostringRequiredβ€”Destination 5-digit bus stop code, "lat,lng" coordinates, or landmark/road search term (e.g. 09048).
πŸ§ͺ 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, and LangChain. For formal RFC Draft 2020-12 JSON response schemas, see llms-full.txt:

[
  {
    "type": "function",
    "function": {
      "name": "get_singapore_bus_arrivals",
      "description": "Fetch live arrival times, crowding status (SEA: Seats Available, SDA: Standing Available, LSD: Limited Standing), vehicle deck type (SD/DD/BD), and wheelchair accessibility for the next 3 arriving buses at any 5-digit Singapore bus stop.",
      "parameters": {
        "type": "object",
        "properties": {
          "bus_stop_code": {
            "type": "string",
            "description": "5-digit zero-padded Singapore Bus Stop Code (e.g. '01012', '09048', '67009')."
          },
          "service_no": {
            "type": "string",
            "description": "Optional specific bus service number to filter (e.g. '190', '65', '10')."
          }
        },
        "required": ["bus_stop_code"]
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "plan_singapore_bus_journey",
      "description": "Plan a public bus journey in Singapore between any two locations. Resolves 5-digit stop codes, GPS lat/lng coordinates, or landmark/stop names. Returns direct and 1-transfer itineraries with duration, stop count, and live arrival times for the first boarding leg.",
      "parameters": {
        "type": "object",
        "properties": {
          "origin": {
            "type": "string",
            "description": "Starting location: 5-digit bus stop code (e.g. '01012'), coordinates ('1.2968,103.8525'), or landmark/road name ('Victoria St', 'City Hall')."
          },
          "destination": {
            "type": "string",
            "description": "Destination location: 5-digit bus stop code (e.g. '09048'), coordinates ('1.3045,103.8331'), or landmark/road name ('Orchard Stn', 'Tang Plaza')."
          }
        },
        "required": ["origin", "destination"]
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "find_nearby_singapore_bus_stops",
      "description": "Find closest public bus stops from GPS coordinates in Singapore, sorted by walking distance with calling bus services.",
      "parameters": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number",
            "description": "WGS84 Latitude between 1.15 and 1.48 (e.g. 1.2968)."
          },
          "longitude": {
            "type": "number",
            "description": "WGS84 Longitude between 103.58 and 104.05 (e.g. 103.8525)."
          },
          "radius_km": {
            "type": "number",
            "description": "Search radius in km (default 1.2, max 10.0)."
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of bus stops to return (default 20, max 50)."
          }
        },
        "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 term (e.g. 'Orchard', 'Bedok Int', 'Victoria St', '01012')."
          },
          "limit": {
            "type": "integer",
            "description": "Max results to return (default 30, max 100)."
          }
        },
        "required": ["query"]
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_bus_service_details",
      "description": "Retrieve full route details, operating operators, directions, and ordered stop sequences for a specific Singapore bus service.",
      "parameters": {
        "type": "object",
        "properties": {
          "service_no": {
            "type": "string",
            "description": "Bus service number (e.g. '190', '65', '14', '960e')."
          }
        },
        "required": ["service_no"]
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_bus_route_stops",
      "description": "Retrieve the sequential list of bus stops, cumulative kilometer distance, and weekday/weekend operating timetables for a bus line and direction.",
      "parameters": {
        "type": "object",
        "properties": {
          "service_no": {
            "type": "string",
            "description": "Bus service number (e.g. '65')."
          },
          "direction": {
            "type": "integer",
            "enum": [1, 2],
            "description": "Direction 1 (outbound) or 2 (inbound). Default: 1."
          }
        },
        "required": ["service_no"]
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_planned_bus_changes",
      "description": "Retrieve scheduled future bus route diversions, road closures, and route adjustments across Singapore.",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_weather",
      "description": "Retrieve live Singapore weather: 2-hour regional nowcast across 47 towns, 24-hour national forecast with sub-day periods, 4-day outlook, and live station readings (temperature, humidity, wind, rainfall).",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_environment_air_quality",
      "description": "Get real-time Singapore 24-hour PSI air quality ratings, 1-hour PM2.5 readings across 5 regions (North, South, East, West, Central), and current UV index with hourly trend.",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_traffic_cameras",
      "description": "Retrieve live expressway traffic camera image snapshot URLs and coordinates across all major expressways (PIE, CTE, AYE, BKE, etc.) and Malaysia border checkpoints (Woodlands Causeway, Tuas Second Link).",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "get_singapore_carpark_availability",
      "description": "Check live parking lot vacancy and distance across 2,600+ HDB, URA, and LTA shopping mall carparks in Singapore.",
      "parameters": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Filter by carpark code (e.g. 'ACB'), mall/building name (e.g. 'Suntec', 'Orchard'), or estate."
          },
          "lat": {
            "type": "number",
            "description": "User GPS latitude for nearby distance ranking."
          },
          "lng": {
            "type": "number",
            "description": "User GPS longitude for nearby distance ranking."
          },
          "radius": {
            "type": "number",
            "description": "Search radius in km (0.1 to 15.0 km, default 1.5)."
          },
          "agency": {
            "type": "string",
            "enum": ["ALL", "HDB", "LTA", "URA"],
            "description": "Filter by agency. Default: 'ALL'."
          },
          "lot_type": {
            "type": "string",
            "enum": ["ALL", "C", "Y", "H"],
            "description": "Vehicle type: 'C' (Cars), 'Y' (Motorcycles), 'H' (Heavy). Default: 'ALL'."
          }
        }
      }
    }
  },
  {
    "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",
            "enum": ["ALL", "SP_MOBILITY", "CDG_ENGIE", "CHARGE_PLUS", "SHELL", "TESLA", "KEPPEL_VOLT", "TOTALENERGIES", "GO_CITY_ENERGY"],
            "description": "Filter operator network."
          },
          "speed": {
            "type": "string",
            "enum": ["ALL", "ULTRA_FAST", "FAST_DC", "AC_NORMAL"],
            "description": "Filter charging speed tier: ULTRA_FAST (>=120kW), FAST_DC (50-100kW), AC_NORMAL (7.4-22kW)."
          },
          "connector": {
            "type": "string",
            "enum": ["ALL", "CCS2", "TYPE2", "TESLA"],
            "description": "Filter plug connector type."
          },
          "lat": {
            "type": "number",
            "description": "GPS latitude for nearby distance ranking."
          },
          "lng": {
            "type": "number",
            "description": "GPS longitude for nearby distance ranking."
          },
          "radius": {
            "type": "number",
            "description": "Search radius in km (0.1 to 25.0 km, default 2.5)."
          },
          "available_only": {
            "type": "boolean",
            "description": "Set to true to only return stations with at least 1 currently available plug."
          }
        }
      }
    }
  },
  {
    "type": "function",
    "function": {
      "name": "search_singapore_acra_entity",
      "description": "Search Singapore registered companies, businesses, LLPs, societies, and healthcare institutions across ACRA regulatory registries by entity name or UEN.",
      "parameters": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Company name or UEN (e.g. 'DBS Bank', 'Grab', '201812345A')."
          },
          "page": {
            "type": "integer",
            "description": "Page number (24 entities per page, 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();
}

// 4. Plan Public Bus Journey
async function planBusJourney(from: string, to: string) {
  const url = new URL(`${BASE_URL}/bus/plan`);
  url.searchParams.set("from", from);
  url.searchParams.set("to", to);
  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}`);