API Documentation

Welcome to the Resultsza API documentation. Here you will find all the information needed to use our API effectively.

Available Endpoints

GET Get Latest Results

Retrieves the latest results for all lottery games in a single call. Optionally, you can specify a date to get results for that day.

Endpoint
GET /api/get_latest_results?api_key=YOUR_API_KEY

Parameters

Parameter Type Description
api_key Required String Your API key for authentication
date Optional String Format: YYYY-MM-DD. If omitted, returns the most recent results.

Example Request

cURL
curl -i "https://resultsZA.co.za/api/get_latest_results?api_key=YOUR_API_KEY&date=2024-12-10"

Response Format

JSON
{ "status": "success", "results": { "daily_lotto_results": { "date": "2024-12-10T20:00:00Z", "draw_id": 2098, "draw_machine": "RNG2", "game_type": "Daily Lotto", "total_pool_size": 1633997.5, "total_sales": 3262896.0, "winning_numbers": [5, 11, 20, 28, 35], "bonus_ball": null, "next_draw_date": "2024-12-11T20:00:00Z", "divisions": [ {"division": "DIV 1", "winners": 6, "winning_amount": 96799.2}, {"division": "DIV 2", "winners": 466, "winning_amount": 287.1}, {"division": "DIV 3", "winners": 13571, "winning_amount": 19.7}, {"division": "DIV 4", "winners": 130413, "winning_amount": 5.0} ] }, "lotto_results": { "date": "2024-12-07T20:00:00Z", "draw_id": 2497, "draw_machine": "RNG2", "game_type": "Lotto", "total_pool_size": 16460059.56, "total_sales": 16554055.0, "winning_numbers": [10, 20, 30, 47, 49, 50], "bonus_ball": 21, "next_draw_date": "2024-12-11T20:00:00Z", "divisions": [ {"division": "DIV 1", "winners": 0, "winning_amount": 0.0}, {"division": "DIV 2", "winners": 1, "winning_amount": 104016.2}, {"division": "DIV 3", "winners": 104, "winning_amount": 1739.4}, {"division": "DIV 4", "winners": 113, "winning_amount": 2001.1}, {"division": "DIV 5", "winners": 3442, "winning_amount": 110.3}, {"division": "DIV 6", "winners": 3083, "winning_amount": 107.1}, {"division": "DIV 7", "winners": 45524, "winning_amount": 50.0}, {"division": "DIV 8", "winners": 32534, "winning_amount": 20.0} ] } } }
Note: If the date parameter is used, results for all game types drawn on that date will be returned.

GET Get Results by Game

Retrieve draw results for a specific game type.

Endpoint
GET /api/get_results_by_game?api_key=YOUR_API_KEY&game=GAME_NAME

Parameters

Parameter Type Description
api_key Required String Your API key for authentication
game Required String The lottery game name (e.g., "Lotto", "Powerball")
date Optional String Format: YYYY-MM-DD. Fetch results for a specific date.

Example Requests

cURL
curl -i "https://resultsZA.co.za/api/get_results_by_game?api_key=YOUR_API_KEY&game=Lotto"
curl -i "https://resultsZA.co.za/api/get_results_by_game?api_key=YOUR_API_KEY&game=Lotto&date=2024-11-16"

Response Format

JSON
{ "status": "success", "results": [ { "draw_id": 123, "draw_date": "2023-03-20T20:00:00Z", "winning_numbers": [1, 5, 7, 9, 10], "bonus_ball": 22 } ] }
Note: This endpoint returns only the winning numbers without division or prize details.

GET Generate Random Numbers

Generate random numbers for any game type. The numbers generated follow the rules of the specified game.

Endpoint
GET /api/generate_random_numbers?api_key=YOUR_API_KEY&game=GAME_NAME&lines=NUMBER_OF_LINES

Parameters

Parameter Type Description
api_key Required String Your API key
game Required String The game type (e.g., "Lotto", "Powerball")
lines Optional Integer Number of lines to generate (default is 1)

Example Requests

cURL
curl -i "https://resultsZA.co.za/api/generate_random_numbers?api_key=YOUR_API_KEY&game=Lotto"
curl -i "https://resultsZA.co.za/api/generate_random_numbers?api_key=YOUR_API_KEY&game=Lotto&lines=5"

Response Format

JSON
{ "status": "success", "game": "Lotto", "lines": 5, "random_numbers": [ [1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], ... ] }

GET Hot & Cold Numbers

Retrieve the most frequently (hot) and least frequently (cold) drawn numbers for a game.

Endpoint
GET /api/get_hot_cold_numbers_stats?api_key=YOUR_API_KEY&product=GAME_NAME

Parameters

Parameter Type Description
api_key Required String Your API key
product Required String The game type (e.g., "Lotto", "Powerball")

Example Request

cURL
curl -i "https://resultsZA.co.za/api/get_hot_cold_numbers_stats?api_key=YOUR_API_KEY&product=Lotto"

Response Format

JSON
{ "status": "success", "product": "Lotto", "hot": [5, 12, 19, ...], "cold": [45, 23, 7, ...] }

GET Get Number Frequencies

Fetch the frequency of each number drawn for a specific game type.

Endpoint
GET /api/get_number_frequencies?api_key=YOUR_API_KEY&product=GAME_NAME

Parameters

Parameter Type Description
api_key Required String Your API key
product Required String The game type (e.g., "Lotto", "Powerball")

Example Request

cURL
curl -i "https://resultsZA.co.za/api/get_number_frequencies?api_key=YOUR_API_KEY&product=Powerball Plus"

Response Format

JSON
{ "status": "success", "product": "Lotto", "statistics": [ {"number": 5, "frequency": 20, "last_drawn": "2023-03-15"}, ... ] }

GET Get Number Pairs

Retrieve the most common number pairs drawn together (top 10 pairs) for a game.

Endpoint
GET /api/get_number_pairs?api_key=YOUR_API_KEY&product=GAME_NAME

Parameters

Parameter Type Description
api_key Required String Your API key
product Required String The game type (e.g., "Lotto")

Example Request

cURL
curl -i "https://resultsZA.co.za/api/get_number_pairs?api_key=YOUR_API_KEY&product=Lotto"

Response Format

JSON
{ "status": "success", "product": "Lotto", "pairs": [ {"number1": 5, "number2": 7, "frequency": 15, "last_drawn": "2023-03-10"}, ... ] }

POST Winning Number Checker

Submit your played numbers and check them against the winning numbers for a specific game and draw date. Supports up to 10 lines per request.

Endpoint
POST /api/check_played_numbers?api_key=YOUR_API_KEY&game=GAME_NAME&date=YYYY-MM-DD

Request Body Format

{ "played_numbers": [ [10, 20, 30, 40, 50, 5], [1, 6, 29, 11, 15, 17] ] }

For a single line, use:

{ "played_numbers": [1, 6, 29, 11, 15, 17] }

Example Request

cURL
curl -X POST "https://resultsZA.co.za/api/check_played_numbers?api_key=YOUR_API_KEY&game=Lotto&date=2024-12-07" -H "Content-Type: application/json" -d '{ "played_numbers": [[10,20,30,40,50,5],[1,6,29,11,15,17]] }'

Response Format

JSON
{ "status": "success", "game": "Lotto", "draw_date": "2024-12-07", "results": { "line1_results": { "played_numbers": [10, 20, 30, 40, 50, 5], "winning_numbers": [10, 20, 30, 47, 49, 50], "bonus_ball": 21, "matches": { "main_matches": 4, "bonus_match": true }, "division": "DIV 4", "winning_amount": "2001.10" }, "line2_results": { "played_numbers": [1, 6, 29, 11, 15, 17], "winning_numbers": [10, 20, 30, 47, 49, 50], "bonus_ball": 21, "matches": { "main_matches": 0, "bonus_match": false }, "division": null, "winning_amount": null } } }

POST Bulk Number Checker

This endpoint allows you to check a larger set of played numbers against the winning numbers of a specific game type and draw date. It supports up to 500 lines of played numbers in a single request and deducts tokens based on the number of lines checked.

Endpoint
POST /api/bulk_check_numbers?api_key=YOUR_API_KEY&game=GAME_NAME&date=YYYY-MM-DD

API Call Consumption:

  • 5 API calls for up to 50 lines checked.
  • Requests exceeding 50 lines but not divisible by 50 will consume API calls for the next multiple of 50 (e.g., 53 lines consume 10 API calls).

Request Body Format:

The request body must be in JSON format:

{ "played_numbers": [ [10, 20, 30, 40, 50, 5], [1, 6, 29, 11, 15, 17], ... ] }

Notes:

  • For Powerball and Powerball Plus, the last number in each line is treated as the Powerball.
  • For other games, all numbers in a line are treated as main numbers, and the bonus ball is checked separately.
  • Lines exceeding the 500-line cap will return an error.

Example API Call:

curl -X POST "https://resultsZA.co.za/api/bulk_check_numbers?api_key=YOUR_API_KEY&game=Lotto Plus 1&date=2024-12-11" \ -H "Content-Type: application/json" \ -d '{ "played_numbers": [ [10, 20, 30, 40, 50, 5], [1, 6, 29, 11, 15, 17], ... ] }'

Response Format:

{ "status": "success", "game": "Lotto Plus 1", "draw_date": "2024-12-11", "lines_checked": 50, "results": { "line1_results": { "played_numbers": [10, 20, 30, 40, 50, 5], "winning_numbers": [10, 20, 30, 47, 49, 50], "bonus_ball": 21, "matches": { "main_matches": 4, "bonus_match": true }, "division": "DIV 4", "winning_amount": "2001.10" }, ... } }

Note: Ensure your API key has sufficient remaining API calls before submitting a bulk check request.

POST Text-to-Lucky Numbers

Convert input text into a unique set of lucky numbers for a selected game, following game rules.

Endpoint
POST /api/text_to_lucky_numbers?api_key=YOUR_API_KEY&game=GAME_NAME

Request Body Format

{ "text": "Your custom input text", "game_type": "Lotto" }

Example Request

cURL
curl -X POST "https://resultsZA.co.za/api/text_to_lucky_numbers?api_key=YOUR_API_KEY&game=Powerball" -H "Content-Type: application/json" -d '{ "text": "John Doe" }'

Response Format

JSON
{ "status": "success", "text": "John Doe", "game_type": "Powerball", "lucky_numbers": [7, 22, 33, 41, 50], "powerball": 18 }
Note: Each request consumes 1 API call and returns a unique, deterministic line of numbers.

GET Check API Key Balance

Check your API key balance and subscription status. This endpoint does not consume any API calls.

Endpoint
GET /check_api_key_balance?api_key=YOUR_API_KEY
POST /check_api_key_balance

Note: You can use either GET (with query parameter) or POST (with JSON body containing api_key).

Example Requests

cURL (GET)
curl -i "https://resultsZA.co.za/check_api_key_balance?api_key=YOUR_API_KEY"
cURL (POST)
curl -X POST "https://resultsZA.co.za/check_api_key_balance" -H "Content-Type: application/json" -d '{"api_key": "YOUR_API_KEY"}'

Response Formats

The response format for active subscriptions:

Active Subscription
JSON
{ "status": "success", "billing_model": "subscription", "tier": "professional", "monthly_limit": 4000, "used": 1250, "remaining": 2750, "subscription_status": "active", "subscription_end": "2026-02-23", "days_until_expiry": 31, "grace_period": false, "note": "IMPORTANT: When your subscription expires, you have 7 days (grace period) to renew. After the grace period, any unused API calls are permanently lost. If you exhaust your calls before expiration, you can upgrade to a higher tier immediately." }
Pending Payment
{ "status": "success", "billing_model": "subscription", "subscription_status": "pending", "message": "Your subscription is pending payment confirmation. Once payment is received and processed, your subscription will be activated and you will be able to use the API.", "tier": "basic", "subscription_status_display": "Pending Payment" }
Expired Subscription
{ "status": "success", "billing_model": "subscription", "subscription_status": "expired", "message": "Your subscription has expired. Please renew to restore API access. You will need to initiate a new subscription request, which will generate an invoice for payment.", "tier": "professional", "subscription_status_display": "Expired", "renewal_url": "https://resultsza.co.za/buy_now?api_key=YOUR_API_KEY&tier=professional&action=renew" }
In Grace Period
{ "status": "success", "billing_model": "subscription", "tier": "basic", "monthly_limit": 1000, "used": 750, "remaining": 250, "subscription_status": "active", "subscription_end": "2026-01-16", "days_until_expiry": -3, "grace_period": true, "days_remaining_in_grace": 4, "warning": "Your subscription expired 3 day(s) ago. You have 4 days remaining in grace period to renew.", "renewal_url": "https://resultsza.co.za/buy_now?api_key=YOUR_API_KEY&tier=basic&action=renew", "note": "IMPORTANT: When your subscription expires, you have 7 days (grace period) to renew. After the grace period, any unused API calls are permanently lost. If you exhaust your calls before expiration, you can upgrade to a higher tier immediately." }
Note: This endpoint does not deduct API calls. Use it to check your balance before making API requests.

Subscription Tiers & Billing

ResultsZA API uses subscription-based billing with monthly subscription plans and tiered API call limits that reset each month:

Tier Monthly API Calls Price (Monthly)
Starter 200 calls/month R99
Basic 1,000 calls/month R199
Professional 4,000 calls/month R399
Subscription Features:
  • Monthly API call limits reset automatically on your billing cycle
  • 7-day grace period after expiration to use remaining calls and renew
  • Upgrade or downgrade tiers at any time (unused calls are lost when downgrading)
  • Renewal allowed 7 days before expiry or during grace period
  • Unused calls are permanently lost after the 7-day grace period ends

API Call Consumption

Different endpoints consume different amounts of API calls:

Endpoint Calls Consumed
Get Latest Results 1 call
Get Results by Game 1 call
Generate Random Numbers 1 call per line
Hot & Cold Numbers 1 call
Number Frequencies 1 call
Number Pairs 1 call
Winning Number Checker 1 call per line (up to 10 lines)
Bulk Number Checker 5 API calls for up to 50 lines, then 5 API calls per additional 50 lines
Text-to-Lucky Numbers 1 call
Check API Key Balance 0 calls (free)

Supported Games

  • Daily Lotto
  • Daily Lotto Plus
  • Lotto
  • Lotto Plus 1
  • Lotto Plus 2
  • Powerball
  • Powerball Plus