# Singapore Real Time Data API

> Singapore weather forecasts, air quality (PSI, PM2.5), UV index and live carpark availability

- Vendor: `singaporerealtimedataapi` · version 1.0 · category Weather · tags singapore weather api, psi api, air quality api, pm25 api, uv index api, carpark availability api
- Datasource: custom HTTP routes
- Marketplace page: https://apiclay.com/api/singaporerealtimedataapi
- This document: https://apiclay.com/docs/singaporerealtimedataapi.md
- OpenAPI 3.1: https://apiclay.com/api/singaporerealtimedataapi/openapi.json
- MCP: connect https://api.apiclay.com/v1/mcp (see https://apiclay.com/llms.txt), then `apiclay_describe_api` with vendor `singaporerealtimedataapi`
- Updated: 2026-11-18

## About

## Singapore Real Time Data API

Singapore government real-time open data from data.gov.sg: 2-hour forecasts by area, the 24-hour forecast by region, the Pollutant Standards Index and PM2.5 by region, the UV index, and live lot availability at every HDB carpark.

Data comes from **data.gov.sg** (https://data.gov.sg). Every route calls the source's own public JSON endpoint (found with the live-URL scan of https://data.gov.sg) and returns it unchanged.

Typical flow: call a route with no parameters for the latest reading, or pass `date_time` for a past one.

### Routes

Every environment route takes the same optional parameters:

| Param | In | Type | Required | Description |
|---|---|---|---|---|
| date_time | query | string | no | `YYYY-MM-DDTHH:mm:ss` (SGT): the reading at that time. |
| date | query | string | no | `YYYY-MM-DD`: all readings that day. |

#### GET `/forecast-2h` - 2-hour forecast
Returns: `area_metadata` (47 areas with lat/lng) and `items[0].forecasts[{area, forecast}]` with `valid_period`.

#### GET `/forecast-24h` - 24-hour forecast
Returns: `items[0].general` (forecast, temperature, humidity, wind) and `periods[]` by region.

#### GET `/psi` - Pollutant Standards Index
Returns: `region_metadata` and `items[0].readings` (`psi_twenty_four_hourly`, `pm25_twenty_four_hourly`, `o3_sub_index`...) by region.

#### GET `/pm25` - PM2.5
Returns: `items[0].readings.pm25_one_hourly` by region.

#### GET `/uv-index` - UV index
Returns: `items[0].index[{value, timestamp}]`.

#### GET `/carparks` - Carpark availability
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| date_time | query | string | no | `YYYY-MM-DDTHH:mm:ss` (SGT). |

Returns: `items[0].carpark_data[{carpark_number, update_datetime, carpark_info[{total_lots, lot_type, lots_available}]}]`.

### License

Singapore Open Data Licence v1.0 (data.gov.sg).

### Caveats

- `/carparks` returns every carpark at once (about 250 KB).
- Upstream responses can change over time. Verify fields before relying on them.
- Not affiliated with or endorsed by data.gov.sg.

## Pricing

- Pay as you go: 0.0012 credits/request
- Trial: 1 free requests per buyer
- Billing order: trial requests -> subscribed plan requests -> pay as you go. 1 credit's USD value is shown on the marketplace page.

## HTTP routes

Only the public, buyer-facing parts of each route are listed; vendor-side credentials stay on the gateway.

### GET /forecast-2h — 2-hour weather forecast
- Gateway: `GET https://api.apiclay.com/v1/api/singaporerealtimedataapi/forecast-2h`
- Public query params: `date_time` (string), `date` (string)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /forecast-24h — 24-hour weather forecast
- Gateway: `GET https://api.apiclay.com/v1/api/singaporerealtimedataapi/forecast-24h`
- Public query params: `date_time` (string), `date` (string)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /psi — Pollutant Standards Index
- Gateway: `GET https://api.apiclay.com/v1/api/singaporerealtimedataapi/psi`
- Public query params: `date_time` (string), `date` (string)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /pm25 — PM2.5
- Gateway: `GET https://api.apiclay.com/v1/api/singaporerealtimedataapi/pm25`
- Public query params: `date_time` (string), `date` (string)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /uv-index — UV index
- Gateway: `GET https://api.apiclay.com/v1/api/singaporerealtimedataapi/uv-index`
- Public query params: `date_time` (string), `date` (string)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /carparks — Carpark availability
- Gateway: `GET https://api.apiclay.com/v1/api/singaporerealtimedataapi/carparks`
- Public query params: `date_time` (string)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

## Call example

```bash
curl -X GET "https://api.apiclay.com/v1/api/singaporerealtimedataapi/forecast-2h" \
  -H "token: <YOUR_APICLAY_TOKEN>"
```

Index of every published API: https://apiclay.com/llms.txt
