ทุก API ต้องส่งพารามิเตอร์ api_key ใน query string
http://localhost:3400/endpoint?api_key=YOUR_KEYหมายเหตุ: แทนที่ YOUR_KEY ด้วย API key ที่ถูกต้อง
/lottothai
ดึงข้อมูลลอตเตอรี่ล่าสุด
GET /lottothai?api_key=YOUR_KEY
/lottothai/all
ดึงข้อมูลลอตเตอรี่ทั้งหมด
GET /lottothai/all?api_key=YOUR_KEY
/lottothai/dates
ดึงรายการวันที่ที่มีข้อมูลทั้งหมด
GET /lottothai/dates?api_key=YOUR_KEY
/lottothai/:date
ดึงข้อมูลตามวันที่ (รูปแบบ: DDMMBBYY)
GET /lottothai/01022568?api_key=YOUR_KEY
{
"success": true,
"data": {
"date": "01022568",
"prizes": {
"first": { "number": "123456", "amount": "6,000,000" },
"firstNearby": { "numbers": ["123455", "123457"], "amount": "100,000" },
"second": { "numbers": ["..."], "amount": "200,000" },
"third": { "numbers": ["..."], "amount": "80,000" },
"fourth": { "numbers": ["..."], "amount": "40,000" },
"fifth": { "numbers": ["..."], "amount": "20,000" },
"frontThree": { "numbers": ["..."], "amount": "4,000" },
"backThree": { "numbers": ["..."], "amount": "4,000" },
"backTwo": { "number": "...", "amount": "2,000" }
},
"lastUpdate": "2024-01-01T00:00:00.000Z"
}
}
{ "message": "Invalid API key" }