Lottery Data API Documentation

Get Past Lottery Jackpot

This API allows you to retrieve the jackpot amount, not the full prize structure, for a specific draw in the past for the specified game. Depending on the game, the jackpot amount may be the estimated amount when there are no jackpot winners in the specified draw.

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.

Past Lottery Jackpot API Request

The base URL for our past lottery jackpot API is:

https://www.magayo.com/api/past_jackpot.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 past jackpot. This parameter is required.

The following games are supported:

  • Eurojackpot (eurojackpot)
  • EuroMillions (euromillions)
  • USA Mega Millions (us_mega_millions)
  • USA Powerball (us_powerball)

draw

The date of the draw for which you would like to retrieve the past jackpot. This parameter is required.

The past lottery jackpots are only available for draws from January 2021.

YYYY-MM-DD
Example: 2021-01-28

format

The API response format. This parameter is optional and the default format is JSON.

json or xml

Examples:

To retrieve the past jackpot on 20 January 2021 for USA Powerball game in JSON format:

https://www.magayo.com/api/past_jackpot.php?api_key=hXJDjsp8I6RY&game=us_powerball&draw=2021-01-20

To retrieve the past jackpot on 22 January 2021 for EuroMillions game in XML format:

https://www.magayo.com/api/past_jackpot.php?api_key=hXJDjsp8I6RY&game=euromillions&draw=2021-01-22&format=xml

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

Past Lottery Jackpot API Response

Element

Description

Value

error

Error code. Value greater than zero indicates an error.

The list of error codes are listed below.

currency

The currency of the jackpot amount.

ISO 4217 3-letter currency code
Example: USD

jackpot

The jackpot amount.

Numeric
Example: 80000000

Example of response in JSON format:

{
"error" : 0,
"currency" : "USD",
"jackpot" : "80000000"
}

Example of response in XML format:

<response>
<error>0</error>
<currency>EUR</currency>
<jackpot>80000000</jackpot>
</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.

203

Draw not provided.

Please add the draw 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

Draw not found.

There is no draw found 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