Overview
Card Deck Shuffler works by generating standard 52-card decks and applying shuffling algorithms. Supports up to 10 decks, optional jokers, and returns complete shuffled deck with sample hands and card details.
Endpoint
One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.
curl "https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates" \
-H "x-api-key: your_api_key_here"const res = await fetch('https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates', {
headers: { 'x-api-key': 'your_api_key_here' },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data } = await res.json();
console.log(data);import requests
res = requests.get(
"https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates",
headers={"x-api-key": "your_api_key_here"},
timeout=15,
)
res.raise_for_status()
print(res.json()["data"])package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates", nil)
req.Header.Set("x-api-key", "your_api_key_here")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.
Authentication
Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.
A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.
Parameters
Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.
| Parameter | Type | Description |
|---|---|---|
decksOptional | integer | Number of decks to shuffle default 1 · range 1–10 |
jokersOptional | boolean | Include jokers in the deck |
methodOptional | string | Shuffling methodfisher-yatesriffledefault fisher-yates |
Response
Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.
{
"status": "ok",
"error": null,
"data": {
"total_cards": 52,
"decks_used": 1,
"includes_jokers": false,
"shuffle_method": "fisher-yates",
"cards": [
{
"rank": "8",
"suit": "Spades",
"card": "8 of Spades",
"short": "8♠"
},
{
"rank": "2",
"suit": "Spades",
"card": "2 of Spades",
"short": "2♠"
},
{
"rank": "Queen",
"suit": "Hearts",
"card": "Queen of Hearts",
"short": "Q♥"
},
{
"rank": "7",
"suit": "Clubs",
"card": "7 of Clubs",
"short": "7♣"
},
{
"rank": "Queen",
"suit": "Spades",
"card": "Queen of Spades",
"short": "Q♠"
},
{
"rank": "King",
"suit": "Hearts",
"card": "King of Hearts",
"short": "K♥"
},
{
"rank": "6",
"suit": "Spades",
"card": "6 of Spades",
"short": "6♠"
},
{
"rank": "Queen",
"suit": "Diamonds",
"card": "Queen of Diamonds",
"short": "Q♦"
},
{
"rank": "King",
"suit": "Diamonds",
"card": "King of Diamonds",
"short": "K♦"
},
{
"rank": "4",
"suit": "Hearts",
"card": "4 of Hearts",
"short": "4♥"
},
{
"rank": "7",
"suit": "Hearts",
"card": "7 of Hearts",
"short": "7♥"
},
{
"rank": "8",
"suit": "Clubs",
"card": "8 of Clubs",
"short": "8♣"
},
{
"rank": "4",
"suit": "Spades",
"card": "4 of Spades",
"short": "4♠"
},
{
"rank": "9",
"suit": "Hearts",
"card": "9 of Hearts",
"short": "9♥"
},
{
"rank": "Ace",
"suit": "Diamonds",
"card": "Ace of Diamonds",
"short": "A♦"
},
{
"rank": "Jack",
"suit": "Diamonds",
"card": "Jack of Diamonds",
"short": "J♦"
},
{
"rank": "Jack",
"suit": "Hearts",
"card": "Jack of Hearts",
"short": "J♥"
},
{
"rank": "2",
"suit": "Clubs",
"card": "2 of Clubs",
"short": "2♣"
},
{
"rank": "Jack",
"suit": "Clubs",
"card": "Jack of Clubs",
"short": "J♣"
},
{
"rank": "Queen",
"suit": "Clubs",
"card": "Queen of Clubs",
"short": "Q♣"
},
{
"rank": "9",
"suit": "Spades",
"card": "9 of Spades",
"short": "9♠"
},
{
"rank": "8",
"suit": "Diamonds",
"card": "8 of Diamonds",
"short": "8♦"
},
{
"rank": "10",
"suit": "Spades",
"card": "10 of Spades",
"short": "10♠"
},
{
"rank": "9",
"suit": "Clubs",
"card": "9 of Clubs",
"short": "9♣"
},
{
"rank": "4",
"suit": "Clubs",
"card": "4 of Clubs",
"short": "4♣"
},
{
"rank": "Ace",
"suit": "Clubs",
"card": "Ace of Clubs",
"short": "A♣"
},
{
"rank": "7",
"suit": "Diamonds",
"card": "7 of Diamonds",
"short": "7♦"
},
{
"rank": "7",
"suit": "Spades",
"card": "7 of Spades",
"short": "7♠"
},
{
"rank": "5",
"suit": "Diamonds",
"card": "5 of Diamonds",
"short": "5♦"
},
{
"rank": "10",
"suit": "Clubs",
"card": "10 of Clubs",
"short": "10♣"
},
{
"rank": "10",
"suit": "Diamonds",
"card": "10 of Diamonds",
"short": "10♦"
},
{
"rank": "6",
"suit": "Hearts",
"card": "6 of Hearts",
"short": "6♥"
},
{
"rank": "King",
"suit": "Spades",
"card": "King of Spades",
"short": "K♠"
},
{
"rank": "Jack",
"suit": "Spades",
"card": "Jack of Spades",
"short": "J♠"
},
{
"rank": "Ace",
"suit": "Hearts",
"card": "Ace of Hearts",
"short": "A♥"
},
{
"rank": "5",
"suit": "Hearts",
"card": "5 of Hearts",
"short": "5♥"
},
{
"rank": "King",
"suit": "Clubs",
"card": "King of Clubs",
"short": "K♣"
},
{
"rank": "10",
"suit": "Hearts",
"card": "10 of Hearts",
"short": "10♥"
},
{
"rank": "2",
"suit": "Diamonds",
"card": "2 of Diamonds",
"short": "2♦"
},
{
"rank": "Ace",
"suit": "Spades",
"card": "Ace of Spades",
"short": "A♠"
},
{
"rank": "3",
"suit": "Clubs",
"card": "3 of Clubs",
"short": "3♣"
},
{
"rank": "5",
"suit": "Clubs",
"card": "5 of Clubs",
"short": "5♣"
},
{
"rank": "8",
"suit": "Hearts",
"card": "8 of Hearts",
"short": "8♥"
},
{
"rank": "3",
"suit": "Spades",
"card": "3 of Spades",
"short": "3♠"
},
{
"rank": "6",
"suit": "Clubs",
"card": "6 of Clubs",
"short": "6♣"
},
{
"rank": "4",
"suit": "Diamonds",
"card": "4 of Diamonds",
"short": "4♦"
},
{
"rank": "2",
"suit": "Hearts",
"card": "2 of Hearts",
"short": "2♥"
},
{
"rank": "3",
"suit": "Diamonds",
"card": "3 of Diamonds",
"short": "3♦"
},
{
"rank": "9",
"suit": "Diamonds",
"card": "9 of Diamonds",
"short": "9♦"
},
{
"rank": "5",
"suit": "Spades",
"card": "5 of Spades",
"short": "5♠"
},
{
"rank": "3",
"suit": "Hearts",
"card": "3 of Hearts",
"short": "3♥"
},
{
"rank": "6",
"suit": "Diamonds",
"card": "6 of Diamonds",
"short": "6♦"
}
],
"top_card": {
"rank": "8",
"suit": "Spades",
"card": "8 of Spades",
"short": "8♠"
},
"bottom_card": {
"rank": "6",
"suit": "Diamonds",
"card": "6 of Diamonds",
"short": "6♦"
},
"sample_hand": [
{
"rank": "8",
"suit": "Spades",
"card": "8 of Spades",
"short": "8♠"
},
{
"rank": "2",
"suit": "Spades",
"card": "2 of Spades",
"short": "2♠"
},
{
"rank": "Queen",
"suit": "Hearts",
"card": "Queen of Hearts",
"short": "Q♥"
},
{
"rank": "7",
"suit": "Clubs",
"card": "7 of Clubs",
"short": "7♣"
},
{
"rank": "Queen",
"suit": "Spades",
"card": "Queen of Spades",
"short": "Q♠"
}
]
}
}Response fields
Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.
| Field | Type | Example | Description |
|---|---|---|---|
total_cards | number | 52 | Total number of cards in the shuffled deck |
decks_used | number | 1 | Number of decks combined for this shuffle |
includes_jokers | boolean | false | Whether jokers are included in this deck |
shuffle_method | string | "fisher-yates" | Shuffling algorithm used for randomization |
cards | array[52] | Complete shuffled deck with all card details | |
rank | string | "8" | Card rank value like Ace, King, or number |
suit | string | "Spades" | Card suit: Spades, Hearts, Diamonds, or Clubs |
card | string | "8 of Spades" | Full card name like King of Hearts |
short | string | "8♠" | Abbreviated card notation with suit symbols |
top_card | object | {...} | First card in the shuffled deck sequence |
rank | string | "8" | Top card rank value |
suit | string | "Spades" | Top card suit |
card | string | "8 of Spades" | Top card full name |
short | string | "8♠" | Top card abbreviated notation |
bottom_cardPremium | object | {...} | Last card in the shuffled deck sequence |
rankPremium | string | "6" | Bottom card rank value |
suitPremium | string | "Diamonds" | Bottom card suit |
cardPremium | string | "6 of Diamonds" | Bottom card full name |
shortPremium | string | "6♦" | Bottom card abbreviated notation |
sample_handPremium | array[5] | First five cards as example hand from deck | |
rankPremium | string | "8" | Sample hand card rank value |
suitPremium | string | "Spades" | Sample hand card suit |
cardPremium | string | "8 of Spades" | Sample hand card full name |
shortPremium | string | "8♠" | Sample hand card abbreviated notation |
Errors
Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.
| Status | Meaning | What to do |
|---|---|---|
400 | Input was rejected | Read error; it names the parameter. |
401 | Key missing or invalid | Check the header name and the key value. |
403 | Key valid, but not permitted | A key restriction or IP allow-list; see key scoping. |
429 | Rate limited, or out of credits | Read error to tell them apart; see rate limits. |
Use cases
- Card Games
- Generate shuffled decks for online card games, poker, and blackjack applications
- Simulations
- Simulate card distributions and test card game probabilities with random shuffles
- Game Development
- Implement card shuffling functionality in gaming applications and virtual casinos
- Teaching Tools
- Demonstrate shuffling algorithms and randomization concepts in educational applications
Other ways to use Card Deck Shuffler
Set up Card Deck Shuffler on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.
Related
More in Games: