Khmer Lottery Public API

v1 Live

Free, read-only JSON API — no authentication, no rate limits, open to everyone.

No auth required CORS enabled JSON / UTF-8 5 lottery types
Base URL
GET https://www.copy.bkhlottery.cc/api.php

All parameters are passed as query-string arguments. The API accepts only GET requests.

Lottery Types ?type=
type Lottery Draw time slots Letters / Prizes
kh Khmer Lottery (KH) 10:35 AM · 01:00 PM · 03:45 PM · 06:00 PM · 07:45 PM · 08:35 PM p1p2p3p4
tc Vietnam Lottery (TC) 10:30 AM · 01:30 PM · 02:30 PM · 04:30 PM · 06:30 PM · 07:30 PM · 08:30 PM abcdfiknopzlo
mc MC Lottery 10:30 AM · 01:30 PM · 02:30 PM · 04:30 PM · 06:30 PM · 07:30 PM · 08:30 PM abcdfnilkov1v2lo
mt MT Evening Lottery 06:30 PM · 07:30 PM · 08:30 PM abcdlo
mt2 MT Daytime Lottery 10:30 AM · 11:30 AM · 01:30 PM · 02:30 PM · 04:30 PM abcdfiknlo
Query Parameters
ParameterTypeDefaultDescription
type string kh Lottery type: kh tc mc mt mt2
date string Filter by draw date in YYYY-MM-DD format
time_slot string Filter by time slot, e.g. 06:30 PM
id integer Fetch a single record by its database ID (returns the record directly, no pagination wrapper)
limit integer 50 Records per page — min 1, max 200
page integer 1 Page number for pagination
Examples

Latest KH results (defaults)

GET https://www.copy.bkhlottery.cc/api.php

KH results for a specific date

GET https://www.copy.bkhlottery.cc/api.php?type=kh&date=2026-05-11

TC results — date + time slot

GET https://www.copy.bkhlottery.cc/api.php?type=tc&date=2026-05-11&time_slot=06:30 PM

MC results — page 2, 20 per page

GET https://www.copy.bkhlottery.cc/api.php?type=mc&limit=20&page=2

MT2 daytime results for today

GET https://www.copy.bkhlottery.cc/api.php?type=mt2&date=2026-05-11

Fetch single KH record by ID

GET https://www.copy.bkhlottery.cc/api.php?type=kh&id=1

JavaScript — fetch with async/await

const res = await fetch('https://www.copy.bkhlottery.cc/api.php?type=kh&date=2026-05-11'); const json = await res.json(); console.log(json.data); // array of draw records

PHP — file_get_contents

$url = 'https://www.copy.bkhlottery.cc/api.php?type=tc&date=2026-05-11'; $json = json_decode(file_get_contents($url), true); foreach ($json['data'] as $row) { echo $row['draw_date'] . ' ' . $row['time_slot'] . PHP_EOL; }

Python — requests

import requests r = requests.get('https://www.copy.bkhlottery.cc/api.php', params={'type':'kh', 'date':'2026-05-11'}) data = r.json()['data'] for row in data: print(row['draw_date'], row['p1_2d'], row['p1_3d'])
Response Format

Successful list response

{ "type": "kh", "total": 42, "page": 1, "limit": 50, "total_pages": 1, "data": [ { "id": 1, "draw_date": "2026-05-11", "time_slot": "10:35 AM", "p1_2d": "12", "p1_3d": "903", "p2_2d": "67", "p2_3d": "329", "p3_2d": "17", "p3_3d": "693", "p4_2d": "48", "p4_3d": "272", "created_at": "2026-05-11 10:40:00", "updated_at": "2026-05-11 10:40:00" } ] }

Error response

{ "error": "Invalid date format. Use YYYY-MM-DD" }

HTTP Status Codes
200 OK Request succeeded
400 Bad Request Invalid parameter value
404 Not Found ID not found (single-record fetch)
405 Method Not Allowed Only GET is accepted
500 Server Error Database error
Field Reference

Common fields: id, draw_date, time_slot, created_at, updated_at

FieldSizeDescription
p1_2dVARCHAR(2)Prize 1 — last 2 digits
p1_3dVARCHAR(3)Prize 1 — last 3 digits
p2_2dVARCHAR(2)Prize 2 — last 2 digits
p2_3dVARCHAR(3)Prize 2 — last 3 digits
p3_2dVARCHAR(2)Prize 3 — last 2 digits
p3_3dVARCHAR(3)Prize 3 — last 3 digits
p4_2dVARCHAR(2)Prize 4 — last 2 digits
p4_3dVARCHAR(3)Prize 4 — last 3 digits
Try It Out
GET
Response
Click Send to test the API…