# SingaNow API & Data Specification > Real-Time Singapore Live Intelligence Dashboard, Public Transit, Weather, Environment, Traffic Cameras, Carpark Availability, and ACRA Corporate Registry API. SingaNow provides high-speed, CORS-friendly, unauthenticated REST JSON APIs providing real-time data across Singapore government and municipal datasets. All endpoints return standard JSON encoded in UTF-8. - API Base URL: `https://singanow.com/api` - Extended Technical Documentation & JSON Schemas: [https://singanow.com/llms-full.txt](https://singanow.com/llms-full.txt) - Interactive Web Documentation & Playground: [https://singanow.com/docs](https://singanow.com/docs) - Protocol: HTTPS GET - Authentication: None required for public endpoints - CORS: Enabled globally (`Access-Control-Allow-Origin: *`) - Default Response Format: JSON (`Content-Type: application/json; charset=UTF-8`) - Timezone: `Asia/Singapore` (SGT / UTC+8, ISO-8601 formatted with `+08:00`) - Geographic Bounding Box: Latitude `1.1500` to `1.4800` °N, Longitude `103.5800` to `104.0500` °E - Central Fallback Coordinate: Latitude `1.2968`, Longitude `103.8525` (City Hall / Raffles Place) --- ## 1. Domain Constants, Conventions & Enums When building LLM agents, OpenAI Function Calling, Anthropic Claude Tools, or Google Gemini Function Calling integrations: 1. **Geographic Coordinates**: - Latitude: `1.15` to `1.48` °N - Longitude: `103.58` to `104.05` °E - Central Singapore Fallback: Coordinates outside Singapore automatically fallback to Central Singapore with `"is_outside_singapore": true`. 2. **Bus Stop Codes**: - Always 5-digit zero-padded strings (e.g. `'01012'`, `'09048'`, `'67009'`). Never convert to integers. 3. **Bus Service Numbers**: - Alphanumeric strings, case-insensitive (e.g. `'10'`, `'65'`, `'190'`, `'960e'`, `'NR1'`). 4. **Public Transport Operators (PTOs)**: - `SBST`: SBS Transit - `SMRT`: SMRT Buses - `TTS`: Tower Transit Singapore - `GAS`: Go-Ahead Singapore 5. **Bus Passenger Load Codes**: - `SEA` = Seats Available (Green / Low crowding) - `SDA` = Standing Available (Orange / Moderate crowding) - `LSD` = Limited Standing (Red / High crowding) 6. **Bus Vehicle Deck Types**: - `SD` = Single Deck Bus - `DD` = Double Deck Bus - `BD` = Bendy / Articulated Bus 7. **Accessibility**: - `is_wab: true` or `Feature: "WAB"` indicates Wheelchair Accessible Bus with boarding ramp. 8. **ACRA Corporate Registry & UEN Formats**: - Businesses (9 characters): e.g. `53123456B` - Local Companies (10 characters): e.g. `201812345A` - Other Entities / LLPs / Societies (10 characters): e.g. `T08LL0001B` - Issuing Agencies: `ACRA`, `ROS`, `MOH`, `MAS` 9. **Environment & Air Quality Scales**: - 24-hr PSI: `0-50` (Good), `51-100` (Moderate), `101-200` (Unhealthy), `201-300` (Very Unhealthy), `>300` (Hazardous). - 1-hr PM2.5: µg/m³ concentrations across North, South, East, West, Central. - UV Index: `0-2` (Low), `3-5` (Moderate), `6-7` (High), `8-10` (Very High), `11+` (Extreme). 10. **Carpark Agencies & Lot Types**: - Agencies: `HDB` (Public housing), `LTA` (Malls & commercial centres), `URA` (City surface lots). - Lot Types: `C` (Cars), `Y` (Motorcycles), `H` (Heavy vehicles). 11. **EV Charging Networks, Power & Connectors**: - Operators: `SP_MOBILITY`, `CDG_ENGIE`, `CHARGE_PLUS`, `SHELL`, `TESLA`, `KEPPEL_VOLT`, `TOTALENERGIES`, `GO_CITY_ENERGY`. - Power Tiers: `ULTRA_FAST` (≥120 kW), `FAST_DC` (50–100 kW), `AC_NORMAL` (7.4–22 kW). - Connectors: `CCS2` (DC Fast), `TYPE2` (AC Standard), `TESLA` (Supercharger). --- ## 2. API Endpoints & Tool Definitions All 13 endpoints correspond directly to production AI Tool definitions available in [llms-full.txt](https://singanow.com/llms-full.txt). ### 2.1 Public Bus Transport - [Bus Arrival API](https://singanow.com/api/bus/arrival): Real-time live arrival countdowns, passenger capacity loads, wheelchair accessibility, and next 3 arriving buses for any 5-digit bus stop. - **Tool Name**: `get_singapore_bus_arrivals` - **Endpoint**: `GET /api/bus/arrival?stop={bus_stop_code}&service={service_no}&refresh={refresh}` - **Parameters**: - `stop` (string, required): 5-digit bus stop code (e.g. `01012` for Victoria St - Hotel Grand Pacific). - `service` (string, optional): Specific bus service number to filter (e.g. `190`, `65`, `10`). - `refresh` (boolean, optional): Set to `1` or `true` to bypass cache and fetch latest LTA DataMall feed. - **Example**: `https://singanow.com/api/bus/arrival?stop=01012` - [Bus Journey Planner API](https://singanow.com/api/bus/plan): Plan public bus journeys between any two stops, GPS coordinates, or landmarks in Singapore. Generates direct and 1-transfer itineraries with walking distances, travel durations, and live boarding arrivals. - **Tool Name**: `plan_singapore_bus_journey` - **Endpoint**: `GET /api/bus/plan?from={origin}&to={destination}` - **Parameters**: - `from` (string, required): Starting location (5-digit bus stop code e.g. `01012`, `"lat,lng"` coordinates e.g. `1.2968,103.8525`, or landmark name e.g. `Victoria St`). - `to` (string, required): Destination location (5-digit bus stop code e.g. `09048`, `"lat,lng"` coordinates e.g. `1.3045,103.8331`, or landmark name e.g. `Orchard Stn`). - **Example**: `https://singanow.com/api/bus/plan?from=01012&to=09048` - [Bus Services API](https://singanow.com/api/bus/services): All registered public bus services in Singapore, operators, origin, destination, operating hours, and frequencies. - **Tool Name**: `get_singapore_bus_service_details` - **Endpoint**: `GET /api/bus/services?service={service_no}&operator={operator}&category={category}&q={query}` - **Parameters**: - `service` (string, optional): Look up a single service and return full route stops for Direction 1 and 2 (e.g. `190`). - `operator` (string, optional): Filter by operator: `SBST`, `SMRT`, `TTS`, `GAS`. - `category` (string, optional): `TRUNK`, `FEEDER`, `EXPRESS`, `INDUSTRIAL`, `NIGHT SERVICE`. - `q` (string, optional): Search service number or terminal/interchange name. - **Example**: `https://singanow.com/api/bus/services?service=190` - [Bus Stops API](https://singanow.com/api/bus/stops): Search or retrieve metadata for over 5,200 Singapore bus stops. - **Tool Name**: `search_singapore_bus_stops` - **Endpoint**: `GET /api/bus/stops?code={stop_code}&q={query}&limit={limit}` - **Parameters**: - `code` (string, optional): Direct 5-digit bus stop code lookup (returns single stop with full calling bus services). - `q` (string, optional): Search keyword matching bus stop code, description, or road name (e.g. `Orchard`, `Bedok`, `Victoria`). - `limit` (integer, optional, default: 30, max: 100): Result limit. - **Example**: `https://singanow.com/api/bus/stops?q=Orchard` - [Bus Routes API](https://singanow.com/api/bus/routes): Sequential list of stops, distance in kilometers, operating hours, and scheduled intervals for a given bus service and direction. - **Tool Name**: `get_singapore_bus_route_stops` - **Endpoint**: `GET /api/bus/routes?service={service_no}&dir={direction}` - **Parameters**: - `service` (string, required): Bus service number (e.g. `14`, `65`, `190`, `960`). - `dir` (integer, optional, default: 1): Direction `1` (outbound) or `2` (inbound / return). - **Example**: `https://singanow.com/api/bus/routes?service=65&dir=1` - [Nearby Bus Stops API](https://singanow.com/api/bus/nearby): Find nearest bus stops from any GPS coordinate within walking distance with calling bus services. - **Tool Name**: `find_nearby_singapore_bus_stops` - **Endpoint**: `GET /api/bus/nearby?lat={latitude}&lng={longitude}&radius={radius_km}&limit={limit}` - **Parameters**: - `lat` (float, required): WGS84 Latitude in Singapore (e.g. `1.2968`). - `lng` (float, required): WGS84 Longitude in Singapore (e.g. `103.8525`). - `radius` (float, optional, default: 1.2, max: 10.0): Search radius in kilometers. - `limit` (integer, optional, default: 20, max: 50): Max bus stops to return. - **Example**: `https://singanow.com/api/bus/nearby?lat=1.2968&lng=103.8525` - [Planned Bus Changes API](https://singanow.com/api/bus/planned): Scheduled upcoming bus route diversions, additions, and network adjustments. - **Tool Name**: `get_singapore_planned_bus_changes` - **Endpoint**: `GET /api/bus/planned` - **Example**: `https://singanow.com/api/bus/planned` --- ### 2.2 Weather & Environment - [Live Weather API](https://singanow.com/api/weather): Real-time 2-hour regional area forecast (47 town locations), 24-hour national forecast, 4-day outlook, and live climate station readings (temperature, humidity, wind, rainfall). - **Tool Name**: `get_singapore_weather` - **Endpoint**: `GET /api/weather` - **Response Fields**: - `forecast_2h.regions`: 47 area nowcasts with standardized icon tags (`sunny`, `cloudy`, `rain`, `showers`, `thunderstorm`, etc.). - `forecast_24h`: Overall 24-hour forecast, temperature range (°C), humidity (%), wind speed (km/h) and direction, plus 3 sub-day periods. - `outlook_4d`: 4-day daily weather projections with temperature and humidity ranges. - `stations`: Real-time weather stations reporting live temperature (°C), relative humidity (%), wind speed (knots), and rainfall (mm). - **Example**: `https://singanow.com/api/weather` - [Air Quality & UV Index API](https://singanow.com/api/environment): 24-hour Pollutant Standards Index (PSI), 1-hour PM2.5 concentrations across 5 Singapore regions (North, South, East, West, Central), and hourly UV index readings. - **Tool Name**: `get_singapore_environment_air_quality` - **Endpoint**: `GET /api/environment` - **Response Fields**: - `psi.regions`: Regional 24-hour PSI values, category rating (`Good`, `Moderate`, `Unhealthy`, `Very Unhealthy`, `Hazardous`), and color code. - `pm25.regions`: 1-hour PM2.5 readings (µg/m³) across North, South, East, West, Central. - `uv`: Current UV index value, category rating (`Low`, `Moderate`, `High`, `Very High`, `Extreme`), and hourly trend history. - **Example**: `https://singanow.com/api/environment` --- ### 2.3 Traffic Cameras & Carpark Availability - [Live Traffic Cameras API](https://singanow.com/api/traffic): High-definition live LTA traffic camera feeds across major expressways (PIE, CTE, AYE, BKE, ECP, SLE, KJE, TPE, MCE) and Malaysia border crossings (Woodlands Causeway, Tuas Second Link). - **Tool Name**: `get_singapore_traffic_cameras` - **Endpoint**: `GET /api/traffic` - **Response Fields**: - `categories`: Grouped camera objects containing `id`, `label`, `description`, `imageUrl` (live high-res camera snapshot JPEG), `timestamp`, `lat`, and `lon`. - **Example**: `https://singanow.com/api/traffic` - [Carpark Availability & Nearby API](https://singanow.com/api/carparks): Real-time lot availability, GPS distance calculations, and parking vacancy across 2,600+ HDB, LTA (shopping malls & commercial hubs), and URA carparks in Singapore. - **Tool Name**: `get_singapore_carpark_availability` - **Endpoint**: `GET /api/carparks?lat={lat}&lng={lng}&radius={radius}&query={query}&agency={agency}&lot_type={lot_type}&page={page}` - **Parameters**: - `lat` (float, optional): User GPS latitude for distance sorting. - `lng` (float, optional): User GPS longitude for distance sorting. - `radius` (float, optional, default: 1.5): Search radius in km (0.1 to 15.0 km). - `query` (string, optional): Filter carpark by code (e.g. `ACB`, `BA12`), development name (e.g. `Suntec`, `Orchard`), or area. - `agency` (string, optional, enum: `ALL`, `HDB`, `LTA`, `URA`, default: `ALL`): Filter by agency. - `lot_type` (string, optional, enum: `ALL`, `C`, `Y`, `H`, default: `ALL`): Filter by vehicle type (`C` for cars, `Y` for motorcycles, `H` for heavy). - `page` (integer, optional, default: 1): Pagination page number. - **Response Fields**: - `summary`: Total monitored lots, total available lots, and nationwide vacancy percentage. - `carparks`: List of carparks with `id`, `name`, `area`, `agency`, `lat`, `lng`, `distance_km`, `distance_m`, `lots`, `available`, `pct` (occupancy %), `status` (`Available`, `Limited`, `Full`), `color`, and `lot_types` breakdown. - **Example**: `https://singanow.com/api/carparks?lat=1.2938&lng=103.8532&radius=1.5` - [EV Charging Points & Availability API](https://singanow.com/api/ev): Real-time EV charger directory and live plug availability across SP Mobility, CDG ENGIE, Charge+, Shell Recharge, Tesla Superchargers, and HDB hubs in Singapore. - **Tool Name**: `get_singapore_ev_charging_points` - **Endpoint**: `GET /api/ev?lat={lat}&lng={lng}&radius={radius}&query={query}&operator={operator}&speed={speed}&connector={connector}&available_only={available_only}&page={page}` - **Parameters**: - `lat` (float, optional): User GPS latitude for distance sorting. - `lng` (float, optional): User GPS longitude for distance sorting. - `radius` (float, optional, default: 2.5): Search radius in km (0.1 to 25.0 km). - `query` (string, optional): Search station name, mall, estate, operator, or postal code (e.g. `Orchard`, `Tesla`, `529510`). - `operator` (string, optional, enum: `ALL`, `SP_MOBILITY`, `CDG_ENGIE`, `CHARGE_PLUS`, `SHELL`, `TESLA`, `KEPPEL_VOLT`, `TOTALENERGIES`, `GO_CITY_ENERGY`, default: `ALL`): Filter operator network. - `speed` (string, optional, enum: `ALL`, `ULTRA_FAST`, `FAST_DC`, `AC_NORMAL`, default: `ALL`): Filter charging speed tier. - `connector` (string, optional, enum: `ALL`, `CCS2`, `TYPE2`, `TESLA`, default: `ALL`): Filter plug connector type. - `available_only` (boolean, optional, default: false): Only return stations with at least 1 currently available plug. - `page` (integer, optional, default: 1): Pagination page number. - **Response Fields**: - `summary`: Total stations, total plugs, available plugs count, overall occupancy percentage, fast DC & ultra-fast count. - `stations`: List of EV stations with `id`, `name`, `address`, `area`, `operator`, `lat`, `lng`, `distance_km`, `distance_m`, `total_plugs`, `available`, `status`, `color`, `pct`, `max_speed_kw`, `has_ultra_fast`, `plugs`, `pricing_ac`, `pricing_dc`, and `parking_info`. - **Example**: `https://singanow.com/api/ev?query=Orchard&speed=FAST_DC` --- ### 2.4 ACRA Corporate Registry & UEN Search - [ACRA Search API](https://singanow.com/api/acra): Instant UEN lookup and corporate entity validation across 2.1+ million registered Singapore companies, businesses, LLPs, societies, and healthcare institutions. - **Tool Name**: `search_singapore_acra_entity` - **Endpoint**: `GET /api/acra?q={query}&page={page}` - **Parameters**: - `q` or `query` (string, required): Company/Entity name or UEN (e.g. `DBS`, `Singtel`, `201400001A`, `Grab`). Multi-word searches automatically supported with intelligent relevance ranking. - `page` (integer, optional, default: 1): Page number (24 entities per page). - **Response Fields**: - `entities`: Array of corporate entities containing `uen`, `name`, `type`, `status` (`Live`, `Struck Off`, etc.), `agency` (`ACRA`, `ROS`, `MOH`, `MAS`), `issue_date`, `full_address`, `ssic_primary` (`code`, `description`, `user_desc`), `ssic_secondary`, `constitution`, `filing` dates, `former_names`, and `audit_firms`. - **Example**: `https://singanow.com/api/acra?q=Singtel` --- ## 3. Multi-Platform AI Model Tool Schemas Complete, copy-paste ready tool definitions for all 13 APIs are maintained in [llms-full.txt](https://singanow.com/llms-full.txt): 1. **OpenAI Function Calling (Format A)**: - Full 13-tool JSON array with `"type": "function"` and standard JSON Schema `"parameters"`. - Compatible with GPT-4o, GPT-4o-mini, o1, o3-mini, and LangChain. - Reference: [llms-full.txt Section 3.1](https://singanow.com/llms-full.txt#31-format-a-openai-function-calling-specification) 2. **Anthropic Claude Tool Use (Format B)**: - Full 13-tool JSON array using `"input_schema"` and strict required fields. - Compatible with Claude 3.5 Sonnet, Claude 3.7 Sonnet, and Claude 3 Opus via the Messages API. - Reference: [llms-full.txt Section 3.2](https://singanow.com/llms-full.txt#32-format-b-anthropic-claude-tool-use-specification) 3. **Google Gemini Function Declarations (Format C)**: - Full 13-function Python declarations utilizing `types.FunctionDeclaration` and `types.Schema`. - Compatible with the modern `google-genai` SDK on Gemini 2.0 Flash and Gemini 1.5 Pro. - Reference: [llms-full.txt Section 3.3](https://singanow.com/llms-full.txt#33-format-c-google-gemini-function-declarations) 4. **Formal JSON Response Schemas**: - RFC Draft 2020-12 compliant schemas with comprehensive type annotations and validation rules for each endpoint. - Reference: [llms-full.txt Section 2](https://singanow.com/llms-full.txt#2-exhaustive-api-reference--json-response-schemas) --- ## 4. Production Code Recipes Ready-to-use production client implementations: - **Python + Pydantic v2**: Type-safe response parsing and validation models ([llms-full.txt Section 4.1](https://singanow.com/llms-full.txt#41-python-3--pydantic-schema-validation)). - **TypeScript + Zod**: Runtime schema parsing for Node.js and browser runtimes ([llms-full.txt Section 4.2](https://singanow.com/llms-full.txt#42-typescript--zod-response-validation)). - **Command Line cURL**: CLI recipes for rapid testing and shell scripts ([llms-full.txt Section 4.3](https://singanow.com/llms-full.txt#43-command-line-curl-recipes)). --- ## 5. Web Pages & Portals - [SingaNow Live Dashboard](https://singanow.com/): Real-time unified Singapore dashboard with weather, air quality, traffic cameras, and carparks. - [EV Charging Points Portal](https://singanow.com/ev): Real-time EV charging station directory and live plug availability across Singapore. - [EV Charging Nearby GPS Finder](https://singanow.com/ev/nearby): Find nearest available EV chargers from current location. - [Parking Availability Portal](https://singanow.com/carparks): Real-time parking lot availability across 2,600+ HDB, commercial, and URA carparks. - [Bus Commuter Portal](https://singanow.com/bus): Live bus arrival countdowns, bus stop search, and route sequence timetables. - [Bus Nearby GPS Finder](https://singanow.com/bus/nearby): Find nearest bus stops from current location. - [Bus Route Explorer](https://singanow.com/bus/routes): Complete ordered stop sequences and route maps for all Singapore bus lines. - [ACRA Singapore UEN Directory](https://singanow.com/acra): Web search interface for registered Singapore corporate entities. - [API Documentation & Playground](https://singanow.com/docs): Interactive developer documentation, playground console, and code snippets. - [About SingaNow](https://singanow.com/about): System architecture, mission, open data attribution, and engineering values. - [Legal & Open Data Attribution](https://singanow.com/legal): Terms of service, statutory board attribution, and Singapore Open Data Licence info. --- ## 6. Optional & Crawler Resources - [Comprehensive LLM Specification (llms-full.txt)](https://singanow.com/llms-full.txt): Complete tool definitions, formal JSON schemas, cURL examples, and field enums. - [XML Sitemap](https://singanow.com/sitemap.xml): Machine-readable sitemap of all public routes. - [Robots.txt](https://singanow.com/robots.txt): Crawler permissions and guidelines.