# Thailand Government Lottery Results and Ticket Checker (`jackpotledger/thailand-government-lottery-results`) Actor

Official Thai Government Lottery (GLO) results for every draw: first prize, next-to-first, second to fifth prizes, front and back three digits, last two digits and the prize amount of each category. Check your 6-digit tickets against every draw. Latest draws or history.

- **URL**: https://apify.com/jackpotledger/thailand-government-lottery-results.md
- **Developed by:** [JackpotLedger](https://apify.com/jackpotledger) (community)
- **Categories:** Business, Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Thailand Government Lottery Results and Ticket Checker

Official results of the Thai Government Lottery, drawn on the 1st and 16th of each month. Every draw comes with all the winning numbers and the prize amount of each category, and you can check your own 6-digit tickets against every draw in the range.

### What you get

One record per draw:

| Field | Example |
|---|---|
| `draw_date`, `period_numbers` | 2026-11-16, \[43, 44] |
| `first_prize`, `first_prize_baht` | 645654, 6000000 |
| `next_to_first` | \[645653, 645655] |
| `front_three_digits`, `last_three_digits`, `last_two_digits` | two 3-digit numbers each, one 2-digit number |
| `second_prize` to `fifth_prize` | 5, 10, 50 and 100 winning numbers with their prize amounts |
| `ticket_checks` | per ticket: won, prizes and total in baht |
| `results_pdf_url`, `draw_video_url` | official results sheet and draw video |

### Who is it for

- Lottery result sites, apps, LINE bots and newsletters in Thailand
- Ticket sellers and players checking many tickets at once
- Number frequency and statistics tools

### How to use it

1. Leave the dates empty for the latest draws, or set a date range.
2. Optionally add your ticket numbers to check them against every draw.
3. Click Start and export the dataset as JSON, CSV or Excel.

### Input example

```json
{
  "ticketNumbers": ["645654", "123456"],
  "maxDraws": 12
}
```

### Pricing

You pay per draw returned. Runs that find nothing return one explanatory row and are not charged. Free Apify plans get up to 10 draws per run.

### FAQ

**How are front and back three digits checked?** The first three digits of your ticket are compared with the front-three numbers and the last three digits with the back-three numbers, as on the official checker.

# Actor input Schema

## `dateFrom` (type: `string`):

Oldest draw date to include (YYYY-MM-DD). Leave empty to get the latest draws.

## `dateTo` (type: `string`):

Newest draw date to include (YYYY-MM-DD). Leave empty for today.

## `ticketNumbers` (type: `array`):

Your 6-digit ticket numbers. Each draw then shows which tickets won, which prizes and the total in baht.

## `onlyWinningTickets` (type: `boolean`):

With ticket numbers, keep only draws where at least one of them won.

## `maxDraws` (type: `integer`):

Maximum number of draws, newest first. There are two draws a month.

## Actor input object example

```json
{
  "onlyWinningTickets": false,
  "maxDraws": 12
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxDraws": 12
};

// Run the Actor and wait for it to finish
const run = await client.actor("jackpotledger/thailand-government-lottery-results").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxDraws": 12 }

# Run the Actor and wait for it to finish
run = client.actor("jackpotledger/thailand-government-lottery-results").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxDraws": 12
}' |
apify call jackpotledger/thailand-government-lottery-results --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jackpotledger/thailand-government-lottery-results"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vgJliXM6F0nB8ZoZC/builds/c5K3D2jY3HJPJ5AIH/openapi.json
