API

A Random Name Picker API, Free and Without a Key

Pick winners, shuffle lists, split teams and draw numbers from your own code with one HTTPS request. No account, no key, open CORS. When a result has to stand up to scrutiny, certified draws add a signed record anyone can check.

Endpoint

One per line. Jordan:3 gives Jordan three tickets on pick.

POST/api/v1/pick
Response from namewheel.orgNot sent yet
// Press Send request. This calls the live API from your browser.

      

The Four Endpoints

Every endpoint accepts GET with query parameters or POST with a JSON body, so you can test in a browser address bar and build with a proper request later. names takes a JSON array, or one string split on commas or new lines. Each response includes drawn_at, an ISO timestamp from our server.

GET POSThttps://namewheel.org/api/v1/pick

Draws one or more winners without repeats. count sets how many (default 1). Add :N to the end of a name to give it N tickets, from 1 to 99, the same rule the NameWheel wheel and certified draws use.

# request
curl "https://namewheel.org/api/v1/pick?names=Abd,Maya,Jordan:3&count=2"

# response
{ "winner": "Jordan", "winners": [ { "name": "Jordan", "index": 2 }, { "name": "Abd", "index": 0 } ],
  "entries": 3, "tickets": 5, "drawn_at": "2026-10-29T13:11:09.095Z", "source": "crypto.randomInt" }
GET POSThttps://namewheel.org/api/v1/shuffle

Returns the whole list in a random order, every order equally likely. Use it for presentation order, turn order, draft order or a fair queue.

curl -X POST https://namewheel.org/api/v1/shuffle \
  -H "Content-Type: application/json" \
  -d '{"names": ["Abd", "Maya", "Jordan", "Priya"]}'

{ "order": ["Priya", "Abd", "Jordan", "Maya"], "entries": 4, ... }
GET POSThttps://namewheel.org/api/v1/teams

Splits a list into random teams. Send teams for a number of teams, or size for people per team. Team sizes never differ by more than one, and which team gets the extra person is random too.

curl "https://namewheel.org/api/v1/teams?names=a,b,c,d,e,f,g&teams=3"

{ "teams": [["e", "b"], ["g", "a", "d"], ["c", "f"]], "team_count": 3, "entries": 7, ... }
GET POSThttps://namewheel.org/api/v1/numbers

Random whole numbers between min and max, both included. count up to 1,000. unique is true by default, so no number repeats; send unique=false for independent draws such as dice rolls.

curl "https://namewheel.org/api/v1/numbers?min=1&max=75&count=5"

{ "numbers": [41, 7, 68, 22, 55], "min": 1, "max": 75, "unique": true, ... }

Errors

Bad input answers HTTP 400 with an error code and a plain English detail, for example {"error": "need_names", "detail": "Send at least 2 names, as a JSON array or comma separated."}. Going over the rate limit answers HTTP 429 with {"error": "rate_limited"}; wait a minute and try again.

How the Randomness Works

All four endpoints use crypto.randomInt from Node.js, which draws from the operating system's secure random source and uses rejection sampling, so a range like 1 to 7 is not quietly biased the way random() % 7 would be. Shuffles use the Fisher and Yates method, which makes every order equally likely. Weighted picks lay out one ticket per weight and draw a ticket, then remove the winner before drawing the next.

We checked the endpoints the boring way before publishing this page: 60,000 weighted picks with weights 1, 2, 1 and 4 came back at 0.99, 2.03, 1.00 and 3.98, and 40,000 team splits put a given person in a team of two 57.4 percent of the time, against 57.1 percent expected when two teams of two and one of three share seven people.

What this API does not do: it keeps no record of your draws. Lists sent in a POST body live in memory for one request and are gone. That is right for apps, bots and classroom tools, and wrong for prize draws where people may later ask for proof. For those, use certified draws below.

Code Examples

JavaScript in the browser or Node 18 and later

const res = await fetch('https://namewheel.org/api/v1/pick', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ names: ['Abd', 'Maya', 'Jordan'], count: 1 })
});
const { winner } = await res.json();
console.log(winner);

Python

import requests

r = requests.post("https://namewheel.org/api/v1/teams",
                  json={"names": ["Abd", "Maya", "Jordan", "Priya"], "teams": 2}, timeout=10)
for i, team in enumerate(r.json()["teams"], 1):
    print(f"Team {i}: {', '.join(team)}")

Google Sheets with Apps Script

Paste this into Extensions, Apps Script, save, and type =PICKNAME(A2:A40) in any cell. It draws a fresh winner each time the sheet recalculates, so copy the result and paste it as a value once you have your winner.

function PICKNAME(range) {
  const names = range.flat().filter(String);
  const res = UrlFetchApp.fetch('https://namewheel.org/api/v1/pick', {
    method: 'post', contentType: 'application/json',
    payload: JSON.stringify({ names })
  });
  return JSON.parse(res.getContentText()).winner;
}

A Discord or Twitch bot

Bots are the most common use. Read the entries from your command, call /api/v1/pick, and post the winner with the drawn_at time. Keep one request per command; the limit of 60 requests a minute per address is far above what a chat command needs.

Certified Draws: Results Anyone Can Check

Certified draws are the same draws that power NameWheel's verified wheel spins, available from your own code with a free API key. They exist for giveaways, raffles and any draw where somebody might say it was rigged.

  1. Commit. You send the title, the entries and at least 16 characters of your own random text, called client entropy. Before anything is drawn, our server picks a secret seed and records its SHA-256 hash, the commitment.
  2. Draw. The winner comes from an HMAC of the seed over your entropy and the hash of the entry list. Neither side can steer it alone: we cannot pick the seed after seeing your entropy, and you cannot predict our seed.
  3. Reveal and sign. Finishing the draw reveals the seed and signs the whole record with our Ed25519 key. The public page at namewheel.org/v/CODE recomputes everything in the visitor's browser.
CallAuthWhat it does
POST /api/draw/startAPI keyBody: title, entries (2 to 500), clientEntropy. Returns code, commit, winner, winnerIndex and verifyUrl.
POST /api/draw/finishAPI keyBody: code. Reveals serverSeed and returns the Ed25519 signature.
GET /api/draw/CODENoneThe public record of a draw, for your own checks or a results page.
POST /api/freezeAPI keyLocks an entry list before entries close, with a public link, so a later draw can prove it used that exact list.
GET /api/draw-keyNoneOur Ed25519 public key, to verify signatures yourself.
curl -X POST https://namewheel.org/api/draw/start \
  -H "Authorization: Bearer nw_live_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"title": "October raffle", "entries": ["Abd", "Maya", "Jordan"], "clientEntropy": "8f2c1e9a77b04d3c"}'

Create a key in your dashboard settings with a free account. You can hold five active keys and revoke any of them there. A key can run draws, freeze lists and read your plan, and nothing else: it cannot change the account, its email or its payments. An account can run up to 20 certified draws in any 24 hours. Call these endpoints from your server, and never put a key in code that runs in a visitor's browser.

The full protocol, including the exact bytes that are hashed and signed, is in the TrueSpin specification.

Limits and Fair Use

LimitPublic v1 APICertified draws
Key neededNoFree account API key
Requests60 per minute per IP address15 starts per minute, 20 draws per 24 hours
Entries2 to 1,000 names, 100 characters each2 to 500 entries, 80 characters each
CORSOpen to every originServer to server
StoredNo database recordThe draw record, public at its link
PriceFreeFree

The API is provided as is, without an uptime promise, under the site terms. If you are building something that will send more than a few thousand requests a day, tell us first so we can plan for it. Please do not use it to choose anything where the law requires a licensed random number generator, such as real money gambling.

Other Ways to Build With NameWheel

MCP server for AI assistants

Claude, ChatGPT and other assistants can spin wheels, make teams and run certified draws through the NameWheel MCP server.

Connect the MCP server

Embed a wheel

Put a working wheel on your own site or LMS with one iframe, including your list of names.

Embed instructions

Stream overlay

A transparent wheel for OBS that takes its settings from the link, handy for bots that build links for streamers.

OBS wheel overlay

API Questions

Is the NameWheel API free?
Yes. The v1 endpoints for pick, shuffle, teams and numbers are free with no key and no account. Certified draws are free too, with a free account and an API key.
Do I need an API key?
Not for the v1 endpoints. Send a request and you get a result. You only need a key for certified draws and list freezes, which create a public record tied to your account.
Can I call the API from a web page?
Yes. The v1 endpoints send open CORS headers, so a fetch from any website works. The playground on this page calls the live API exactly that way.
Is the API random enough for a giveaway?
The picks are fair: they come from a secure random source with no modulo bias. What v1 does not give you is proof, because nothing is recorded. For a giveaway where entrants may ask how the winner was chosen, use a certified draw, which leaves a signed record anyone can check.
Do you store the names I send?
The v1 endpoints never write your names to our database; each list is used for one request and discarded. Names sent in a GET address travel in the URL, and URLs appear in ordinary web server logs, so send private lists in a POST body. Certified draws are different on purpose: their record is kept and published at its verification link.
How do I give someone more chances?
On pick, add a colon and a number to the end of a name, such as Maya:3 for three tickets. Weights run from 1 to 99. The winner list returns the plain name without the weight.
What happens if I go over the rate limit?
You get HTTP 429 with the error rate_limited. The limit is 60 requests a minute for each IP address and resets after a minute. If you need more, contact us before you launch.

Just need a winner right now?

The NameWheel wheel picks from your list in a few seconds, with Eliminate mode, teams, themes and sounds. No code required.

Developer API

What Is the NameWheel Random API?

The NameWheel Random API is a free HTTPS API for random selection, documented at namewheel.org/developers. Version 1 has four endpoints that need no key and send open CORS headers: /api/v1/pick draws one or more winners without repeats and supports weights written as Name:3; /api/v1/shuffle returns a list in random order; /api/v1/teams splits a list into teams whose sizes differ by at most one; and /api/v1/numbers draws whole numbers in a range, with or without repeats. Results come from Node's crypto.randomInt, the limit is 60 requests a minute per IP address, lists of up to 1,000 names are accepted, and no draw is saved to a database. For draws that need proof, NameWheel certified draws use a commit and reveal protocol: the server publishes a SHA-256 commitment to a secret seed, the winner is an HMAC of that seed over client entropy and the entry list hash, and the finished record is signed with Ed25519 and published at namewheel.org/v/CODE. Certified draws need a free account API key and allow 20 draws in any 24 hours.

Build with NameWheel