Generate lottery numbers for over 300+ lottery games around the world. Super easy API and easy terms subscription.
To access the web version of this functionality click here.
The end point for connecting : If you subscribe directly from us use this endpoint.
https://api.fungenerators.com
To get the list of countries in the system, you can use the following API call.
GET /lottery/countries
In curl this would look something like this
curl -X GET "http://api.fungenerators.com/lottery/countries" -H "accept: application/json" -H "content-type: application/json"
The result would look like the following JSON
{
"success": {"total":76},
"contents":{
"countries": \[
"Anguilla",
"Antigua and Barbuda",
"..."
\]
}
}
GET /lottery/supported
In curl this would look something like this
curl -X GET "http://api.fungenerators.com/lottery/supported?country=USA" -H "accept: application/json" -H "content-type: application/json"
The result would return all the supported lottery games for the given country and it will look like the following JSON
{
"success": { "total":91 },
"contents":{
"country":"USA",
"games":\[
{
"id":"usa-all-or-nothing-multi-state",
"name":"All or Nothing (Multi-State)"
},
{
"id":"usa-arizona-the-pick",
"name":"Arizona - The Pick"
},
{
"id":"usa-arizona-2-by-2",
"name":"Arizona - 2 By 2"
},
{
"id":"usa-arizona-all-or-nothing",
"name":"Arizona - All or Nothing"
},
{"..."}
\]
}
}
GET /lottery/draw
curl -X GET "https://api.fungenerators.com/lottery/draw?game=usa-all-or-nothing-multi-state&count=2" -H "accept: application/json" -H "content-type: application/json"
Here is a sample result of the above call.
{
"success": {
"total": 2
},
"contents": {
"game": {
"id":"usa-all-or-nothing-multi-state",
"name":"All or Nothing (Multi-State)",
"country":"USA"
},
"numbers": \[
{
"draw": \[
\[
12,
6,
3,
1,
8,
18,
10,
19,
14,
2,
9,
15
\]
\]
},
{
"draw": \[
\[
3,
12,
10,
16,
13,
5,
11,
2,
21,
6,
22,
17
\]
\]
}
\]
}
}
Some of our API calls may be public(requires free API key) , while others requires paid subscription. To maintain our serice levels both public and private API endpoints are ratelimited. Please consult your specific plan that you subscribed to for the rate limit details.
Currently we support API Key based authentication. Please set your Autorization Bearer request header with value of your API key. Alternatively you can also pass api_key= as a request parameter, though we strongly discourage this mode of passing the key, since it will allow others to see your key.
In curl this would mean sending the Authorization header like below.
curl -i <url> -H "Authorization: Bearer <api_key>"
If you are using PHP.
$authorization = "Authorization: Bearer <api_key>";
$ch = curl_init('<url>'); // Initialise cURL
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization ));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); // OR GET
$result = curl_exec($ch);
curl_close($ch);
In javascript you can use headers key to add the authorization header
$.ajax({
url: '<url>'
type: 'GET',
contentType: 'application/json'
headers: {
'Authorization': 'Bearer <api_key>'
},
success: function (result) {
// CallBack(result);
},
error: function (error) {
}
});
The following are the API calls you can make. You can try out / test the calls right from this page. Please note, javascript needs to be enabled to see the documentation below.
We understand that every customer is unique, which is why we offer a variety of pricing plans tailored to fit different needs and budgets. Whether you're a small business owner, a growing startup, or a large enterprise, we have a plan that will provide you with the features and support you need to succeed. Explore our plans below and find the one that's right for you!