Developers

Practical code snippets for working with the Keputusan4D.com API. All endpoints are static — no auth, no rate limits, no SDK needed. CC0-1.0 data.

Fetch today's results

curl -s https://keputusan4d.com/api/today.json

Fetch a single operator

curl -s https://keputusan4d.com/api/operators/magnum.json | jq '.'

Detect changes cheaply

# grab the SHA-256 of today.json without downloading the body
curl -s https://keputusan4d.com/api/today-hash.txt

# or grab the full checksum manifest
curl -s https://keputusan4d.com/api/checksums.json | jq '.entries[] | select(.path == "/api/today.json")'

Subscribe to upcoming draws

# iCalendar — drop into Google Calendar or Apple Calendar
https://keputusan4d.com/api/draws.ics

# or read the JSON form
curl -s https://keputusan4d.com/api/upcoming.json | jq '.next_draws[] | {operator, myt_time, seconds_to_draw}'

Build a dashboard

curl -s https://keputusan4d.com/api/health.json
curl -s https://keputusan4d.com/api/operator-status.json
curl -s https://keputusan4d.com/api/feed-formats.json | jq '.formats | length'

Discover everything

curl -s https://keputusan4d.com/api/explain.json | jq '.endpoints[] | {path, desc}'

OpenAPI

An OpenAPI 3.1 spec is available at /api/openapi.yaml and /api/openapi.json. Import into Postman, generate a client, or wire into Swagger UI.

JSON Schema

The shape of today.json is described in JSON Schema 2020-12 at /api/today.schema.json.

Embed a badge

<img src="https://keputusan4d.com/api/badge.svg" alt="Keputusan4D.com status" />

License

Result data on Keputusan4D.com is dedicated to the public domain under CC0-1.0. Operator brand names are trademarks of their respective owners; see /api/license.json.

Errata

Report incorrect draw data via Telegram @tg4_main_bot. Corrections are pushed live within minutes and surfaced in /api/changelog.json.

← Back to Keputusan4D.com