SA lottery results API

uncapped_shady

Well-Known Member
Joined
Nov 29, 2010
Messages
232
Reaction score
18
Location
Somewhere Close by
Hi all, I have created a lottery results API for anyone keen to test it out. It is still in development and I am working on other API endpoints but I have decided to make the base API endpoint available for free for now while I am still developing the app further.

Right now you will be able to get the latest results for the Daily Lotto, Lotto, Lotto Plus 1, Lotto Plus 2, Powerball and Powerball Plus in one API call.

This is also to test how efficient it all is running at the moment.

You can check it out here - https://resultsza.co.za/generate_api_key

The output is a JSON object and will look like the below snippet (It will contain all the lottery game results):

Code:
 "lotto_results": {
            "date": "Sat, 19 Aug 2023 00:00:00 ",
            "draw_id": "2361",
            "draw_machine": "RNG2",
            "game_type": "Lotto",
            "total_pool_size": "26858336.30",
            "total_sales": "16494280.00",
            "winning_numbers": "13, 14, 15, 18, 22, 33",
            "bonus_ball": 36,
            "next_draw_date": "Wed, 23 Aug 2023 00:00:00 ",
            "divisions": [
                {
                    "division": "DIV 1",
                    "winners": "1",
                    "winning_amount": "22463200.90"
                },
                {
                    "division": "DIV 2",
                    "winners": "4",
                    "winning_amount": "23842.80"
                },
                {
                    "division": "DIV 3",
                    "winners": "47",
                    "winning_amount": "3529.00"
                },
                {
                    "division": "DIV 4",
                    "winners": "107",
                    "winning_amount": "1937.70"
                },
                {
                    "division": "DIV 5",
                    "winners": "2902",
                    "winning_amount": "120.00"
                },
                {
                    "division": "DIV 6",
                    "winners": "3449",
                    "winning_amount": "87.70"
                },
                {
                    "division": "DIV 7",
                    "winners": "51473",
                    "winning_amount": "50.00"
                },
                {
                    "division": "DIV 8",
                    "winners": "35110",
                    "winning_amount": "20.00"
                }
            ]
        },

And feel free to leave comments on how I can make it even better or if you have any specific suggestions or requirements.

Cheers
 
Looks interesting. One thing though, the TOS and PP refer to a single page.
The policy refers to itself:

For more details on how we collect, use, and protect your personal information, please refer to our Privacy Policy.
 
Looks intersting. One thing though, the TOS and PP refer to a single page.
The policy refers to itself:

For more details on how we collect, use, and protect your personal information, please refer to our Privacy Policy.
Thanks for pointing that out. I will be fleshing that section out in greater detail for sure.
Still very early stages but will get there in the end.
 
Looks interesting. One thing though, the TOS and PP refer to a single page.
The policy refers to itself:

For more details on how we collect, use, and protect your personal information, please refer to our Privacy Policy.
Sorted. Thanks again for pointing that out. Got so busy with the other programming, I neglected the html LOL.
 
You might want to obfuscate your contact email on the privacy page. Spammers will soon get hold of that.

On a side note I see your mail is handled by mail.resultsza.co.za. You might want to fix the cert there. The CN is 000atnewshare.co.za
 
change the date fields to ISO 8601, in UTC, e.g.

2023‐08‐21T17:44:42Z

change `winners` and `winning_amount` to numbers instead of strings
 
You might want to obfuscate your contact email on the privacy page. Spammers will soon get hold of that.

On a side note I see your mail is handled by mail.resultsza.co.za. You might want to fix the cert there. The CN is 000atnewshare.co.za
Noted thanks, did not even think of that.
 
change "winning_numbers" to an array of number (unless you need strings, then array of string is fine too)

basically, make all numbers numbers, and not strings
 
change "winning_numbers" to an array of number (unless you need strings, then array of string is fine too)

basically, make all numbers numbers, and not strings
Have made some changes. I have also gotten the dates to ISO8601 format but still need to just output the JSON as a date object rather than a string but I am past tired now so will work on it a bit later again.

Thanks again for all the inputs guys, much appreciated :)
 
I have integrated automated Lottery game results updates daily via the ResultsZA Telegram bot in addition to the API. You can subscribe by simply typing the command /subscribe into the Telegram bot. If you would like to stop receiving results you can just type in /unsubscribe.

It will basically run at 22:00 each evening and send through only relevant Lottery game draws that took place on the day.

For more info on this feature check out https://resultsza.co.za/bot
As always, if you have any recommendations or issue you pick up, please let me know. Cheers
 
I have made some changes to the site as well. It is now more mobile friendly as well. I would appreciate a second look and if you have any recommendations, please do let me know. (Specifically from a mobile perspective)

Thanks all.
 
/unsubscribe does not work on the telegram bot. Maybe have a look at that.
 
Top
Sign up to the MyBroadband newsletter