VOOZH about

URL: https://apify.com/0x_wzhenkai/asean-lottery-companies

โ‡ฑ asean-lottery-companies ยท Apify


๐Ÿ‘ asean-lottery-companies avatar

asean-lottery-companies

Under maintenance

Pricing

$3.00/month + usage

Go to Apify Store

asean-lottery-companies

Under maintenance

Returns information about all lottery companies, including their provider IDs, names, and next scheduled draw dates.

Pricing

$3.00/month + usage

Rating

0.0

(0)

Developer

๐Ÿ‘ Zhen Kai

Zhen Kai

Maintained by Community

Actor stats

0

Bookmarked

4

Total users

0

Monthly active users

a year ago

Last modified

Share

ASEAN Lottery Companies Actor

This Apify actor retrieves all ASEAN lottery companies with their next draw dates from 12 different game providers across 5 ASEAN countries.

๐ŸŽฏ What it does

The actor connects to a MySQL database and fetches information about all available lottery companies, including:

  • Company provider ID (PID)
  • Company name
  • Next scheduled draw date

๐ŸŒ Supported Countries & Providers

Malaysia (6 providers)

  • Magnum 4D (PID: MAG)
  • Da Ma Cai 4D (PID: DMC)
  • Sports Toto 4D (PID: TOT)
  • Cashsweep 4D (PID: CSP)
  • Sandakan 4D (PID: STC)
  • Sabah 88 4D (PID: S88)

Singapore (1 provider)

  • Singapore Pools 4D (PID: SGP)

Cambodia (3 providers)

  • GD Lotto 4D (PID: GDL)
  • Lucky Hari Hari 4D (PID: LHH)
  • Perdana 4D (PID: PDN)

Vietnam (1 provider)

  • Vietnam Lottery 4D (PID: VIE)

Philippines (1 provider)

  • PCSO 4D Lotto (PID: PHL)

๐Ÿ“ฅ Input

This actor requires no input parameters. Simply run it to get all lottery companies.

{}

๐Ÿ“ค Output

The actor returns a JSON object with the following structure:

{
"success":true,
"data":[
{
"pid":"MAG",
"name":"Magnum",
"next_draw_date":"20250530"
},
{
"pid":"SGP",
"name":"Singapore Pools",
"next_draw_date":"20250531"
}
// ... more companies
]
}

Output Fields

  • success (boolean): Indicates if the operation was successful
  • data (array): Array of lottery companies
    • pid (string): Provider ID (e.g., "MAG", "SGP")
    • name (string): Full company name
    • next_draw_date (string): Next draw date in YYYYMMDD format

โš™๏ธ Configuration

Required Environment Variables

Set these environment variables in the Actor settings:

MYSQLHOST=your_database_host
MYSQLUSER=your_database_user
MYSQLPASSWORD=your_database_password
MYSQLDATABASE=your_database_name
MYSQLPORT=3306

Alternative Environment Variables (Fallback)

DB_HOST=your_database_host
DB_USER=your_database_user
DB_PASSWORD=your_database_password
DB_NAME=your_database_name
DB_PORT=3306

๐Ÿ“Š Database Requirements

The actor expects these database tables:

lottery_companies

  • company_id (INT, PRIMARY KEY)
  • pid (VARCHAR) - Provider ID
  • name (VARCHAR) - Company name

upcoming_draws

  • company_id (INT) - Foreign key to lottery_companies
  • next_draw_date (DATE/DATETIME) - Next scheduled draw
  • completed (TINYINT) - Draw completion status (0 = not completed)

๐Ÿš€ Usage Examples

Run via Apify Console

  1. Go to the actor page
  2. Click "Start"
  3. Leave input empty {}
  4. View results in the Dataset

Run via API

curl-X POST https://api.apify.com/v2/acts/YOUR_ACTOR_ID/runs \
-H"Authorization: Bearer YOUR_API_TOKEN"\
-H"Content-Type: application/json"\
-d'{}'

Run via Apify Client (Node.js)

const{ ApifyApi }=require('apify-client');
const client =newApifyApi({
token:'YOUR_API_TOKEN'
});
const run =await client.actor('YOUR_ACTOR_ID').call();
const dataset =await client.dataset(run.defaultDatasetId).listItems();
console.log(dataset.items);

โฐ Draw Schedules

Malaysia

  • Regular draws: Wednesday, Saturday, Sunday at 7:00 PM
  • Special draws: Occasionally on Tuesdays at 7:00 PM

Singapore

  • Draws: Wednesday, Saturday, Sunday at 6:30 PM

Cambodia

  • Draws: Daily
    • GD Lotto: 7:15 PM
    • Lucky Hari Hari: 7:45 PM
    • Perdana: 7:15 PM

Vietnam

  • Draws: Daily at 11:30 AM

Philippines

  • Draws: Monday, Wednesday, Friday at 9:00 PM

๐Ÿ” Troubleshooting

Common Issues

Database Connection Failed

  • Verify database credentials
  • Check network connectivity
  • Ensure database accepts external connections

No Results Returned

  • Check if lottery_companies table has data
  • Verify upcoming_draws table has future dates
  • Check database table structure

Empty next_draw_date

  • Ensure upcoming_draws table is populated
  • Check date formats in database
  • Verify completed field is set correctly

๐Ÿ“ Notes

  • The actor only returns draws scheduled for current date or future dates
  • Completed draws (completed=1) are excluded from next_draw_date calculation
  • Date format is always YYYYMMDD for consistency
  • Actor automatically handles different date formats from database

๐Ÿ”’ Security

  • Use read-only database user for production
  • Secure database credentials in environment variables
  • Enable SSL/TLS for database connections when possible

๐Ÿ“ž Support

For issues related to this actor, please check:

  1. Database connectivity and credentials
  2. Table structure and data
  3. Environment variable configuration

๐Ÿ“„ License

This actor is provided as-is for lottery data retrieval purposes.

You might also like

Lottery Draws

eternal_ngultrum/lottery-draws

Lottery Draws provides programmatic access to historical lottery draw data across multiple countries and games. The Actor retrieves official draw results by country and game, returning structured data including draw dates, main numbers, and bonus numbers.

๐Ÿ‘ User avatar

Draws Analytics

47

Quick Draw Lottery Past Winning Numbers

harvest/quick-draw-lottery-past-winning-numbers

This actor retrieves historical winning numbers for the Quick Draw lottery within a specified date range.

CALIFORNIA LOTTERY

syntellect_ai/ca-lotto-draw-games

California Lottery Hot Spot historical data scraper. Fast and reliable extraction of past winning numbers with customizable draw limits."CALOTTERY.COM PAST GAME SCRAPER

๐Ÿ‘ User avatar

christopher athans crow

8

Pick 10 Lottery Past Winning Numbers

harvest/pick-10-lottery-past-winning-numbers

This actor retrieves historical winning numbers for the Pick 10 lottery within a specified date range.

Win-4 Lottery Past Winning Numbers

harvest/win-4-lottery-past-winning-numbers

This actor retrieves historical winning numbers for the Win-4 lottery within a specified date range.

Take 5 Lottery Past Winning Numbers

harvest/take-5-lottery-past-winning-numbers

This actor retrieves historical winning numbers for the Take 5 lottery within a specified date range.

Powerball Lottery Past Winning Numbers

harvest/powerball-lottery-past-winning-numbers

This actor retrieves historical winning numbers for the Powerball Lottery within a specified date range.

86

5.0

New York Lottery Past Winning Numbers

harvest/new-york-lottery-past-winning-numbers

This actor retrieves historical winning numbers for the New York Lotto lottery within a specified date range.

Mega Millions Lottery Past Winning Numbers

harvest/mega-millions-lottery-past-winning-numbers

This actor retrieves historical winning numbers for the Mega Millions Lottery within a specified date range.

40

Cash 4 Life Lottery Past Winning Numbers

harvest/cash-4-life-lottery-past-winning-numbers

This actor retrieves historical winning numbers for the Cash 4 Life lottery within a specified date range.