Lottery Data API

Game Information API

Our lottery game information 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.

Game Information API Request

The base URL for our game information API is

https://www.magayo.com/api/info.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 game information. 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 game information for USA Powerball game in JSON format:

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

To retrieve the game information 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 data APIs

Game Information API Response

ElementDescriptionFormat
errorError code. Value greater than zero indicates an error.The list of error codes are listed below.
nameThe name of the lottery game.Example: Lotto 6/49
countryThe country where the game is played.Example: Canada
stateThe state where the game is played.Example: Nationwide
main_minThe minimum main ball value for Lotto games.Example: 1
main_maxThe maximum main ball value for Lotto games.Example: 49
main_drawnThe number of main balls drawn for Lotto games.Example: 6
bonus_minThe minimum bonus ball value for Lotto games.Example: 1
bonus_maxThe maximum bonus ball value for Lotto games.Example: 49
bonus_drawnThe number of bonus balls drawn for Lotto games.Example: 1
same_ballsIndicate if the main balls are the same set of balls as the bonus balls for Lotto games.Y or N
digitsThe number of digits for Pick 3 & Pick 4 gamesExample: 3
drawnThe number of numbers drawn for Pick 3 & Pick 4 gamesExample: 1
is_optionAdditional information for selected Lotto gamesY or N
option_descDescription of the additional information for selected Lotto gamesExample: Power Play

The "is_option" is equal to "Y" only for the following games and the value of "option_desc" is listed below:

Gameoption_desc
Spain - BonoLotoReintegro
Spain - La PrimitivaReintegro
USA - Mega MillionsMegaplier
USA - PowerballPower Play
USA Illinois - LottoExtra Shot
USA New Jersey - Jersey Cash 5XTRA
USA New Jersey - Pick-6 LottoXTRA
USA South Carolina - Palmetto Cash 5Power-Up

Example of response in JSON format:

{
"error" : 0,
"name" : "Powerball",
"country" : "United States",
"state" : "Multi-state",
"main_min" : 1,
"main_max" : 69,
"main_drawn" : 5,
"bonus_min" : 1,
"bonus_max" : 26,
"bonus_drawn" : 1,
"same_balls" : "N",
"digits" : 0,
"drawn" : 0,
"is_option" : "Y",
"option_desc" : "Power Play"
}

List of Error Codes

Error CodeDescriptionAction or Resolution
0No error.Proceed to process the game information retrieved.
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

Read BytesIn Editor's review on magayo Lotto!

"If you play the lottery and you want to improve your chances of winning, magayo Lotto is an application that can be of help."

Read BytesIn Editor'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?

Don't play blindly! Always play intelligently and responsibly!

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