Lottery Data API Documentation

Get Game Information

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

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 game information. This parameter is required.

Please refer to the list of supported games and values to use.

format

The 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

Element

Description

Value

error

Error code. Value greater than zero indicates an error.

The list of error codes are listed below.

name

The name of the lottery game.

String
Example: Lotto 6/49

country

The country where the game is played.

String
Example: Canada

state

The state where the game is played.

String
Example: Nationwide

main_min

The minimum main ball value for Lotto games.

Numeric
Example: 1

main_max

The maximum main ball value for Lotto games.

Numeric
Example: 49

main_drawn

The number of main balls drawn for Lotto games.

Numeric
Example: 6

bonus_min

The minimum bonus ball value for Lotto games.

Numeric
Example: 1

bonus_max

The maximum bonus ball value for Lotto games.

Numeric
Example: 49

bonus_drawn

The number of bonus balls drawn for Lotto games.

Numeric
Example: 1

same_balls

Indicate if the main balls are the same set of balls as the bonus balls for Lotto games.

Character Y or N where Y=Yes and N=No

digits

The number of digits for Pick 3 & Pick 4 games

Numeric
Example: 3

drawn

The number of numbers drawn for Pick 3 & Pick 4 games

Numeric
Example: 1

is_option

Additional information for selected Lotto games

Character Y or N where Y=Yes and N=No

option_desc

Description of the additional information for selected Lotto games. See details below.

String
Example: Power Play

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

Country

Game

option_desc

Anguilla

Lucky Pick

Multiplier

Antigua & Barbuda

Lucky Pick

Multiplier

Aruba

Lotto 5

Free Letter

Belize

Fantasy 5

Free Letter

Bermuda

Lucky Pick

Multiplier

Dominica

Super 6

Free Letter

Grenada

Lotto

Free Letter

Grenada

Super 6

Free Letter

Italy

SuperEnalotto

Superstar

Puerto Rico

Loto

Multiplicador

Saint Kitts and Nevis

Lucky Pick

Multiplier

Saint Lucia

Power Play

Free Letter

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

Florida Lotto

XTRA

USA

Illinois Lotto

Extra Shot

USA

Lotto America

All Star Bonus

USA

Mega Millions

Megaplier

USA

Powerball

Power Play

USA

New Jersey Cash 5

XTRA

USA

New Jersey Pick-6 Lotto

XTRA

USA

South Carolina Palmetto Cash 5

Power-Up

USA

Wisconsin Supercash!

Doubler

Zambia

Africa Millions

Super Ball

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 Code

Description

Action or Resolution

0

No error.

Proceed to process the game information 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.

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

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

magayo.com is verified safe by McAfee SiteAdvisor

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