Lottery Number Generator API

Lottery Number Generator API

Our Lottery Number Generator API provides you with the recommended numbers based on the same algorithm as our award-winning & proven lottery software.

After retrieving our recommended numbers, you can easily generate your tickets based on this pool of recommended numbers. This allows you to easily develop your own lottery software, lottery app or lottery website where you can offer lottery tickets with a greater chance of winning!

Our Lottery Number Generator API is available in JSON and XML formats and easily accessible through a simple API request. Secure HTTPS connections must be used.

Please note that the API key shown in the examples below is not valid. You must replace the API key value with your API key or please sign up for an API account if you do not have one.

Lottery Number Generator API Request

The base URL for our Lottery Number Generator API is

https://www.magayo.com/api/numbers.php

Request Parameters

ParameterDescriptionValid Values
api_keyYour assigned API key. This parameter is required.Your assigned API key value.
gameThe lottery game for which you would like to retrieve the recommended numbers. This parameter is required.Please refer to the list of supported games and values to use.
formatThe API response format. This parameter is optional and the default format is JSON.json or xml

Examples:

To retrieve the recommended numbers for USA Powerball game in JSON format:

https://www.magayo.com/api/numbers.php?api_key=hXJDjsp8I6RY&game=us_powerball

To retrieve the recommended numbers for EuroMillions game in XML format:

https://www.magayo.com/api/info.php?api_key=hXJDjsp8I6RY&game=euromillions&format=xml

View sample PHP snippets on how to use our Lottery Number Generator APIs

Lottery Number Generator API Response

Please note that test data is returned for the Free Plan.

ElementDescriptionFormat
errorError code. Value greater than zero indicates an error.The list of error codes are listed below.
mainThe pool of recommended main balls to play separated by commas for Lotto & Powerball type games.Example: 1,2,3,5,7,8,9,10,12,13,18,23,27,28,29,32,36,39
bonusThe pool of recommended bonus balls to play separated by commas for Lotto & Powerball type games.Example: 2,3,4,5,6,8
digit1The pool of recommended digits in the 1st position to play separated by commas for Pick 2/3/4/5/6 type games.Example: 0,2,3,5,6,8,9
digit2The pool of recommended digits in the 2nd position to play separated by commas for Pick 2/3/4/5/6 type games.Example: 1,3,4,5,8
digit3The pool of recommended digits in the 3rd position to play separated by commas for Pick 2/3/4/5/6 type games.Example: 0,1,2,6,7,9
digit4The pool of recommended digits in the 4th position to play separated by commas for Pick 2/3/4/5/6 type games.Example: 1,2,3,6,8
digit5The pool of recommended digits in the 5th position to play separated by commas for Pick 2/3/4/5/6 type games.Example: 0,1,2,3,5,6,7,8
digit6The pool of recommended digits in the 6th position to play separated by commas for Pick 2/3/4/5/6 type games.Example: 2,3,4,6,7,9
improvedThe improved chances of winning in percentage based on the recommended numbers.Example: 63

Example of response in JSON format for a Lotto or Powerball type game:

{
"error" : 0,
"main" : "1,2,3,5,7,8,9,10,12,13,18,23,27,28,29,32,36,39",
"bonus" : "2,3,4,5,6,8",
"digit1" : "",
"digit2" : "",
"digit3" : "",
"digit4" : "",
"digit5" : "",
"digit6" : "",
"improved" : 63
}

List of Error Codes

Error CodeDescriptionAction or Resolution
0No error.Proceed to process the recommended numbers retrieved.
99No error and test data returned.Test data is returned for testing purposes in the Free Plan.
100API key not provided.Please add the api_key parameter in your API request.
101Invalid API key.Please check & correct the value of the api_key parameter in your API request.
102API key not found.Please check & correct the value of the api_key parameter in your API request.
200Game not provided.Please add the game parameter in your API request.
201Invalid game.Please check & correct the value of the game parameter in your API request.
202Game not found.Please check & correct the value of the game parameter in your API request.
300Account suspended.You have violated our terms of use.
303API limit reached.You may like to consider upgrading your API plan.

Download magayo Lotto

magayo Lotto is FREE and 100% clean.

Read CNET Editors' review on magayo Lotto!

Read CNET Editors' review on magayo Lotto!

"Finally, here is software that might help you win the lottery"

Read CNET Editors' review

Read CNET Editors' review

Why avoid the installers of software download sites?

Read Softonic Editorial Team's review on magayo Lotto!

"This unique software bundle contains intelligent algorithms that could very well enable you to strike it rich."

Read Softonic Editorial Team's review

magayo Lotto is rated 5 stars by BestSoftware4Download

magayo Lotto is rated 5 stars by Download3000

magayo Lotto is rated 5 stars by BestFreewareDownload

magayo Lotto is rated 5 stars by Windows7Download

Play intelligently with our lottery software...

... to improve your chances of winning!

Download magayo Lotto

For any Lotto and Powerball games

Download magayo Pick

For any Pick 3 & Pick 4 games

Our lottery software is FREE and it does not expire. It is also 100% safe and clean with no virus, no adware and no spyware.

See the winning tickets of our Lotto winners!
See the awards for magayo Lotto!
See the awards for magayo Pick!
Why choose our lottery software?

Generate your own tickets with our recommended numbers from our Lottery Number Generator API!

magayo.com is verified safe by Google Safe Browsing

magayo.com is verified safe by Norton Safe Web

magayo.com is verified safe by McAfee SiteAdvisor

Website reputation of magayo.com is rated 100/100 by Webutation

Back to top of page