Lottery Data API Documentation

Get Draw Results

This API allows you to retrieve the draw results for the specified game.

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.

Draw Results API Request

The base URL for our draw results API is:

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

Request Parameters

Parameter

Description

Valid Values

api_key

Your assigned API key. This parameter is required.

Your assigned API key value.

game

The 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.

draw

The 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

format

The 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 2019 in JSON format:

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

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

Draw Results API Response

Element

Description

Value

error

Error code. Value greater than zero indicates an error.

The list of error codes are listed below.

draw

The date of the draw.

YYYY-MM-DD
Example: 2019-03-10

results

The 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

For Bosnia and Herzegovina SuperLOTO, bonus ball "01" = "BLACK" and "02" = "RED".

For Jamaica Cash Pot, bonus ball "01" = "GOLD" and "02" = "WHITE".

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

Country

Game

Additional Information

Anguilla

Lucky Pick

Multiplier

Antigua & Barbuda

Lucky Pick

Multiplier

Aruba

Lotto 5

Free Letter

Aruba

Lucky 3

Multi-X

Belize

Fantasy 5

Free Letter

Bermuda

Lucky Pick

Multiplier

Dominica

Super 6

Free Letter

Dominica

Big 4 & Pick 2

Multi-X

Dominican Republic

Loto Mas

Super Mas

Finland

Lotto

Plusnumero

Georgia

Golden Ball 5/35

"0" = No Golden Ball and "1" = Golden Ball drawn

Grenada

Lotto

Free Letter

Grenada

Super 6

Free Letter

Guyana

Lotto Supa 6

Free Ticket Letter

Italy

SuperEnalotto

Superstar

Puerto Rico

Loto

Multiplicador

Saint Kitts and Nevis

Lucky Pick

Multiplier

Saint Lucia

Power Play

Free Letter

Saint Lucia

Big 4 & Pick 2

Multi-X

Saint Lucia

Super 6

Free Letter

Saint Vincent and the Grenadines

Super 6

Free Letter

Sint Maarten

Lucky Pick

Multiplier

Spain

BonoLoto

Reintegro

Spain

La Primitiva

Reintegro

Sri Lanka

Ada Kotipathi

English Letter

Sri Lanka

Development Fortune

English Letter

Sri Lanka

Jayoda

English Letter

Sri Lanka

Kotipathi Kapruka

English Letter

Sri Lanka

Saturday Fortune

English Letter

Sri Lanka

Super Ball

English Letter

Switzerland

Swiss Lotto

Replay

Trinidad and Tobago

Cash Pot

Multiplier

US Virgin Islands

Lucky Pick

Multiplier

USA

Lotto America

All Star Bonus

USA

Mega Millions

Megaplier

USA

Powerball

Power Play

USA

Connecticut Play 3 & Play 4

Wild Ball

USA

Florida Lotto

XTRA

USA

Florida Pick 2, Pick 3, Pick 4 & Pick 5

Fireball

USA

Idaho Pick 3 & Pick 4

Sum It Up

USA

Illinois Lotto

Extra Shot

USA

Illinois Pick 3 & Pick 4

Fireball

USA

Indiana Daily 3 & Daily 4

Superball

USA

Mississippi Cash 3 & Cash 4

Fireball

USA

New Jersey Cash 5

XTRA

USA

New Jersey Pick 3 & Pick 4

Fireball

USA

North Carolina Pick 3 & Pick 4

Fireball

USA

Pennsylvania Pick 2, Pick 3, Pick 4 & Pick 5

Wild Ball

USA

South Carolina Pick 3 & Pick 4

Fireball

USA

Tennessee Cash 3 & Cash 4

Wild Ball*

USA

Texas Pick 3 & Daily 4

Fireball

USA

Virginia Pick 3 & Pick 4

Fireball

USA

Wisconsin Supercash!

Doubler

Zambia

Africa Millions

Super Ball

*Wild Ball replaces Lucky Sum.

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 Code

Description

Action or Resolution

0

No error.

Proceed to process the draw results retrieved.

100

API key not provided.

Please add the api_key parameter in your API request.

101

Invalid API key.

Please check & correct the value of the api_key parameter in your API request.

102

API key not found.

Please check & correct the value of the api_key parameter in your API request.

200

Game not provided.

Please add the game parameter in your API request.

201

Invalid game.

Please check & correct the value of the game parameter in your API request.

202

Game not found.

Please check & correct the value of the game parameter in your API request.

300

Account suspended.

You have violated our terms of use.

303

API limit reached.

You may like to consider upgrading your API plan.

400

Invalid draw date.

Please check & correct the value of the draw parameter in your API request. The date format must be YYYY-MM-DD.

401

No draw results.

There is no draw on the date specified in the draw parameter.

Jackpot Lottery Winner

Mexico Chispazo winning Jackpot lottery ticket

"I played the recommendation... and I won the first prize!"

magayo Lotto software user

See the winning lottery tickets of magayo Lotto users

Download magayo Lotto software

magayo Lotto is also available as an Android app

Easily integrate lottery data with our lottery API!

magayo.com is verified safe by Google Safe Browsing

magayo.com is verified safe by Norton Safe Web