Find an API

Search public APIs with auth details & Postman guides

← All APIs

Numbers API

whapi · Media

Media No Auth Free & Open entertainment

The William Hill Numbers API uses a single method that allows you to generate random numbers for your application. Numbers can either be unique or can be produced with the chance that some might be the same. For example, you can have a highest value of 6 and a lowest value of 1 with a count of 2 with a unique value of false - this will give you two numbers between 1 and 6 which are independent, just like two dice being rolled. The Numbers API is a Private API and therefore not automat

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET getRandomNumbers

This method is used to generate random numbers for your app. Within the request, you can specify the lowest number, the highest number and the amount of numbers returned. There is also an option to generate a unique set of numbers with no repetition of the same numbers allowed in the return.

https://api.apis.guru/v2/specs/whapi.com/numbers/2.0/generate/integers?count=10&lowest=1&unique=true&highest=1&gameCode=example

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
apiKey example
apiSecret example
curl -X GET "https://api.apis.guru/v2/specs/whapi.com/numbers/2.0/generate/integers?count=10&lowest=1&unique=true&highest=1&gameCode=example" \
  -H "apiKey: example" \
  -H "apiSecret: example"
import requests
params = {
    "count": "10",
    "lowest": "1",
    "unique": "true",
    "highest": "1",
    "gameCode": "example"
}
headers = {
    "apiKey": "example",
    "apiSecret": "example"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/whapi.com/numbers/2.0/generate/integers",
    params=params,
    headers=headers,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/whapi.com/numbers/2.0/generate/integers');
url.searchParams.set('count', '10');
url.searchParams.set('lowest', '1');
url.searchParams.set('unique', 'true');
url.searchParams.set('highest', '1');
url.searchParams.set('gameCode', 'example');

const response = await fetch(url, {
  headers: {
    'apiKey': 'example',
    'apiSecret': 'example'
  },
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/whapi.com/numbers/2.0/generate/integers")
	q := baseURL.Query()
	q.Set("count", "10")
	q.Set("lowest", "1")
	q.Set("unique", "true")
	q.Set("highest", "1")
	q.Set("gameCode", "example")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)
	req.Header.Set("apiKey", "example")
	req.Header.Set("apiSecret", "example")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/whapi.com/numbers/2.0/generate/integers")
uri.query = URI.encode_www_form({
  "count" => "10",
  "lowest" => "1",
  "unique" => "true",
  "highest" => "1",
  "gameCode" => "example"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)
req["apiKey"] = "example"
req["apiSecret"] = "example"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/whapi.com/numbers/2.0/generate/integers?" . http_build_query([
    "count" => "10",
    "lowest" => "1",
    "unique" => "true",
    "highest" => "1",
    "gameCode" => "example"
]);
$opts = ["http" => [
    "method" => "GET",
    "header" => implode("\r\n", [
        "apiKey: example",
        "apiSecret: example"
    ]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. See official documentation for authentication and setup.

What can you build with Numbers API?

Numbers API is a Media API. Developers commonly use media APIs for:

  • storing and delivering images, video, and audio
  • building digital asset management and media libraries
  • transcoding and optimising media for the web
  • adding video streaming and playback to your app
  • automating content tagging and metadata extraction

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Numbers API is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗