Lottery Numbers

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.

API End Points

The end point for connecting : If you subscribe directly from us use this endpoint.
	https://api.fungenerators.com
	

Ratelimiting

Some of our API calls are public. To maintain our service level we ratelimit the number of API calls. For public API calls this is 60 API calls a day with distribution of 5 calls an hour. For paid plans this limit is increased according to the service level described in the plan.

Authentication

For public calls you don't need to pass any API key. Just invoke the endpoint (see examples below). For paid subscriptions you need to pass the API key.

Currently we support API Key based authentication. Please set a request header 'X-FunGenerators-Api-Secret' 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.

API Documentation

Getting the list of countries

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",
             "..."
         ]
     }
}

Getting the list of supported lottory games supported in a given country

   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"
                  },
                  {"..."}
           ]
     }
}

Draw numbers for a specific lottery game

   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
          ]
        ]
      }
    ]
  }
}

API Console

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.

Subscribe

Fun Generators Lottery API Basic

$4.99/mo

No contracts. Anytime cancellation.
1 API Key
1000 API Calls / day
Best in class backend tools
Easy to use REST API
Immediate provisioning

Fun Generators Lottery API Premium

$9.99/mo

No contracts. Anytime cancellation.
1 API Key
5000 API Calls / day
Best in class backend tools
Easy to use REST API
Immediate provisioning

Fun Generators Lottery API Ultra

$24.99/mo

No contracts. Anytime cancellation.
1 API Key
12500 API Calls / day
Best in class backend tools
Easy to use REST API
Immediate provisioning