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

Token Consumption:

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

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 tokens 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 token and returns a unique, deterministic line of numbers.

GET Check API Token Balance

Check your remaining API token balance. This endpoint does not consume any tokens.

Endpoint
GET /check_api_key_balance?api_key=YOUR_API_KEY

Example Request

cURL
curl -i "https://resultsZA.co.za/check_api_key_balance?api_key=YOUR_API_KEY"

Response Format

JSON
{ "status": "success", "tokens_remaining": 25, "is_paying_customer": true }
Note: This endpoint does not deduct tokens.

Supported Games

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