Lottery Data API

Lottery Results API

Our lottery results are 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 Results API Request

The base URL for our lottery results API is

https://www.magayo.com/api/results.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 draw results. This parameter is required.Please refer to the list of supported games and values to use.
drawThe date of the draw for which you would like to retrieve the draw results. This parameter is optional. If not specified, the latest draw results in our database will be returned.YYYY-MM-DD
Example: 2015-08-28
formatThe API response format. This parameter is optional and the default format is JSON.json or xml

Examples:

To retrieve the latest draw results for USA Powerball game in JSON format:

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

To retrieve the latest draw results for EuroMillions game in XML format:

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

To retrieve the draw results for Oz Lotto game on 10 March 2015 in JSON format:

https://www.magayo.com/api/results.php?api_key=hXJDjsp8I6RY&game=au_oz_lotto&draw=2015-03-10

View sample PHP snippets on how to use our lottery data APIs

Lottery Results API Response

ElementDescriptionFormat
errorError code. Value greater than zero indicates an error.The list of error codes are listed below.
drawThe date of the draw.YYYY-MM-DD
Example: 2015-03-10
resultsThe draw results separated by commas. For Lotto & Powerball games, bonus balls will be returned after all the main balls. For Pick 3 & Pick 4 games with more than 1 prize, the results returned will contain the top prize first followed by the lower prizes.99,99,99...
Example for Lotto game: 03,08,19,26,27,38
Example for Pick 4 game: 2388,7878,6892

In addition, the following games will have the additional information appended to the end of the "results" separated by a comma:

GameAdditional Information
Anguilla - Lucky PickMultiplier
Antigua & Barbuda - Lucky PickMultiplier
Aruba - Lotto 5Free Letter
Belize - Fantasy 5Free Letter
Bermuda - Lucky PickMultiplier
Dominica - Super 6Free Letter
Grenada - LottoFree Letter
Grenada - Super 6Free Letter
Saint Kitts and Nevis - Lucky PickMultiplier
Saint Lucia - Super 6Free Letter
Saint Vincent and the Grenadines - Super 6Free Letter
Sint Maarten - Lucky PickMultiplier
Spain - BonoLotoReintegro
Spain - La PrimitivaReintegro
Switzerland - Swiss LottoReplay
US Virgin Islands - Lucky PickMultiplier
USA - Lotto AmericaAll Star Bonus
USA - Mega MillionsMegaplier
USA - PowerballPower Play
USA Florida - Florida LottoXTRA
USA Illinois - LottoExtra Shot
USA New Jersey - Jersey Cash 5XTRA
USA New Jersey - Pick-6 LottoXTRA
USA South Carolina - Palmetto Cash 5Power-Up
USA Wisconsin - SuperCashDoubler

Example of response in JSON format:

	{
"error" : 0,
"draw" : "2015-03-10",
"results" : "03,08,19,26,27,38"
}

Example of response in XML format:

	<response>
<error>0</error>
<draw>2015-03-10</draw>
<results>03,08,19,26,27,38</results>
</response>

List of Error Codes

Error CodeDescriptionAction or Resolution
0No error.Proceed to process the draw results 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.
400Invalid draw date.Please check & correct the value of the draw parameter in your API request. The date format must be YYYY-MM-DD.
401No draw results.There is no draw on the date specified in the draw parameter.

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