# Card Deck Shuffler API Documentation

> Complete Card Deck Shuffler API documentation with examples, parameters, authentication, and code samples. Card Deck Shuffler is a tool for shuffling standard playing card decks. It supports multiple decks, optional jokers, and different shuffling methods to generate randomized card sequences for games and simulations. Fast, reliable, and easy to integrate.

# ![Card Deck Shuffler](https://apiverve.web.app/publicapis/logos/carddeckshuffler.svg)Card Deck Shuffler

OnlineToken Usage:1 per callLatency:134ms avg

Card Deck Shuffler is a tool for shuffling standard playing card decks. It supports multiple decks, optional jokers, and different shuffling methods to generate randomized card sequences for games and simulations.

This API provides reliable and fast access to card deck shuffler data through a simple REST interface. Built for developers who need consistent, high-quality results with minimal setup time.

To use this API, you need an API key. You can get one by [creating a free account](https://apiverve.com/signup) and visiting your [dashboard](https://apiverve.com/dashboard).

[View API in Directory](https://apiverve.com/marketplace/carddeckshuffler)

## GET Endpoint

URL

```http
https://api.apiverve.com/v1/carddeckshuffler
```

## Code Examples

Here are examples of how to call this API in different programming languages:

cURLJavaScriptPythonNode.jsPHPGoRubyC#

cURL Request

```bash
curl -X GET \
  "https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates" \
  -H "X-API-Key: your_api_key_here"
```

JavaScript (Fetch API)

```javascript
const response = await fetch('https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates', {
  method: 'GET',
  headers: {
    'X-API-Key': 'your_api_key_here',
    'Content-Type': 'application/json'
  }
});

const data = await response.json();
console.log(data);
```

Python (Requests)

```python
import requests

headers = {
    'X-API-Key': 'your_api_key_here',
    'Content-Type': 'application/json'
}

response = requests.get('https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates', headers=headers)

data = response.json()
print(data)
```

Node.js (Native HTTPS)

```javascript
const https = require('https');
const url = require('url');

const options = {
  method: 'GET',
  headers: {
    'X-API-Key': 'your_api_key_here',
    'Content-Type': 'application/json'
  }
};

const req = https.request('https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates', options, (res) => {
  let data = '';
  res.on('data', (chunk) => data += chunk);
  res.on('end', () => console.log(JSON.parse(data)));
});

req.end();
```

PHP (cURL)

```php
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'X-API-Key: your_api_key_here',
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
print_r($data);

?>
```

Go (net/http)

```go
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")
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
```

Ruby (Net::HTTP)

```ruby
require 'net/http'
require 'json'

uri = URI('https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri)
request['X-API-Key'] = 'your_api_key_here'
request['Content-Type'] = 'application/json'

response = http.request(request)
puts JSON.pretty_generate(JSON.parse(response.body))
```

C# (HttpClient)

```csharp
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("X-API-Key", "your_api_key_here");

        var response = await client.GetAsync("https://api.apiverve.com/v1/carddeckshuffler?decks=1&jokers=false&method=fisher-yates");
        response.EnsureSuccessStatusCode();

        var responseBody = await response.Content.ReadAsStringAsync();
        Console.WriteLine(responseBody);
    }
}
```

## Authentication

This API requires authentication via API key. Include your API key in the request header:

Required Header

```
X-API-Key: your_api_key_here
```

## Interactive API Playground

Test this API directly in your browser with live requests and responses.

[

**Open in API Playground**Test with your API key in the dashboard

](https://dashboard.apiverve.com/playground?id=carddeckshuffler)

## Parameters

The following parameters are available for this API endpoint:

Parameter

Type

Required

Description

Default

Example

decks

number

No

Number of decks to shuffle (1-10, default: 1)

1

1

jokers

boolean

No

Include jokers in the deck (default: false)

false

false

method

string

No

Shuffling method: fisher-yates or riffle (default: fisher-yates)

fisher-yates

fisher-yates

## Response

The API returns responses in JSON, XML, YAML, Markdown, and CSV formats:

### Example Responses

JSONXMLYAMLMarkdownCSV

JSON Response

200 OK

```json
{
  "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♠"
      }
    ]
  }
}
```

XML Response

200 OK

```xml
<Root>
  <status>ok</status>
  <error />
  <data>
    <total_cards>52</total_cards>
    <decks_used>1</decks_used>
    <includes_jokers>false</includes_jokers>
    <shuffle_method>fisher-yates</shuffle_method>
    <cards>
      <rank>8</rank>
      <suit>Spades</suit>
      <card>8 of Spades</card>
      <short>8♠</short>
    </cards>
    <cards>
      <rank>2</rank>
      <suit>Spades</suit>
      <card>2 of Spades</card>
      <short>2♠</short>
    </cards>
    <cards>
      <rank>Queen</rank>
      <suit>Hearts</suit>
      <card>Queen of Hearts</card>
      <short>Q♥</short>
    </cards>
    <cards>
      <rank>7</rank>
      <suit>Clubs</suit>
      <card>7 of Clubs</card>
      <short>7♣</short>
    </cards>
    <cards>
      <rank>Queen</rank>
      <suit>Spades</suit>
      <card>Queen of Spades</card>
      <short>Q♠</short>
    </cards>
    <cards>
      <rank>King</rank>
      <suit>Hearts</suit>
      <card>King of Hearts</card>
      <short>K♥</short>
    </cards>
    <cards>
      <rank>6</rank>
      <suit>Spades</suit>
      <card>6 of Spades</card>
      <short>6♠</short>
    </cards>
    <cards>
      <rank>Queen</rank>
      <suit>Diamonds</suit>
      <card>Queen of Diamonds</card>
      <short>Q♦</short>
    </cards>
    <cards>
      <rank>King</rank>
      <suit>Diamonds</suit>
      <card>King of Diamonds</card>
      <short>K♦</short>
    </cards>
    <cards>
      <rank>4</rank>
      <suit>Hearts</suit>
      <card>4 of Hearts</card>
      <short>4♥</short>
    </cards>
    <cards>
      <rank>7</rank>
      <suit>Hearts</suit>
      <card>7 of Hearts</card>
      <short>7♥</short>
    </cards>
    <cards>
      <rank>8</rank>
      <suit>Clubs</suit>
      <card>8 of Clubs</card>
      <short>8♣</short>
    </cards>
    <cards>
      <rank>4</rank>
      <suit>Spades</suit>
      <card>4 of Spades</card>
      <short>4♠</short>
    </cards>
    <cards>
      <rank>9</rank>
      <suit>Hearts</suit>
      <card>9 of Hearts</card>
      <short>9♥</short>
    </cards>
    <cards>
      <rank>Ace</rank>
      <suit>Diamonds</suit>
      <card>Ace of Diamonds</card>
      <short>A♦</short>
    </cards>
    <cards>
      <rank>Jack</rank>
      <suit>Diamonds</suit>
      <card>Jack of Diamonds</card>
      <short>J♦</short>
    </cards>
    <cards>
      <rank>Jack</rank>
      <suit>Hearts</suit>
      <card>Jack of Hearts</card>
      <short>J♥</short>
    </cards>
    <cards>
      <rank>2</rank>
      <suit>Clubs</suit>
      <card>2 of Clubs</card>
      <short>2♣</short>
    </cards>
    <cards>
      <rank>Jack</rank>
      <suit>Clubs</suit>
      <card>Jack of Clubs</card>
      <short>J♣</short>
    </cards>
    <cards>
      <rank>Queen</rank>
      <suit>Clubs</suit>
      <card>Queen of Clubs</card>
      <short>Q♣</short>
    </cards>
    <cards>
      <rank>9</rank>
      <suit>Spades</suit>
      <card>9 of Spades</card>
      <short>9♠</short>
    </cards>
    <cards>
      <rank>8</rank>
      <suit>Diamonds</suit>
      <card>8 of Diamonds</card>
      <short>8♦</short>
    </cards>
    <cards>
      <rank>10</rank>
      <suit>Spades</suit>
      <card>10 of Spades</card>
      <short>10♠</short>
    </cards>
    <cards>
      <rank>9</rank>
      <suit>Clubs</suit>
      <card>9 of Clubs</card>
      <short>9♣</short>
    </cards>
    <cards>
      <rank>4</rank>
      <suit>Clubs</suit>
      <card>4 of Clubs</card>
      <short>4♣</short>
    </cards>
    <cards>
      <rank>Ace</rank>
      <suit>Clubs</suit>
      <card>Ace of Clubs</card>
      <short>A♣</short>
    </cards>
    <cards>
      <rank>7</rank>
      <suit>Diamonds</suit>
      <card>7 of Diamonds</card>
      <short>7♦</short>
    </cards>
    <cards>
      <rank>7</rank>
      <suit>Spades</suit>
      <card>7 of Spades</card>
      <short>7♠</short>
    </cards>
    <cards>
      <rank>5</rank>
      <suit>Diamonds</suit>
      <card>5 of Diamonds</card>
      <short>5♦</short>
    </cards>
    <cards>
      <rank>10</rank>
      <suit>Clubs</suit>
      <card>10 of Clubs</card>
      <short>10♣</short>
    </cards>
    <cards>
      <rank>10</rank>
      <suit>Diamonds</suit>
      <card>10 of Diamonds</card>
      <short>10♦</short>
    </cards>
    <cards>
      <rank>6</rank>
      <suit>Hearts</suit>
      <card>6 of Hearts</card>
      <short>6♥</short>
    </cards>
    <cards>
      <rank>King</rank>
      <suit>Spades</suit>
      <card>King of Spades</card>
      <short>K♠</short>
    </cards>
    <cards>
      <rank>Jack</rank>
      <suit>Spades</suit>
      <card>Jack of Spades</card>
      <short>J♠</short>
    </cards>
    <cards>
      <rank>Ace</rank>
      <suit>Hearts</suit>
      <card>Ace of Hearts</card>
      <short>A♥</short>
    </cards>
    <cards>
      <rank>5</rank>
      <suit>Hearts</suit>
      <card>5 of Hearts</card>
      <short>5♥</short>
    </cards>
    <cards>
      <rank>King</rank>
      <suit>Clubs</suit>
      <card>King of Clubs</card>
      <short>K♣</short>
    </cards>
    <cards>
      <rank>10</rank>
      <suit>Hearts</suit>
      <card>10 of Hearts</card>
      <short>10♥</short>
    </cards>
    <cards>
      <rank>2</rank>
      <suit>Diamonds</suit>
      <card>2 of Diamonds</card>
      <short>2♦</short>
    </cards>
    <cards>
      <rank>Ace</rank>
      <suit>Spades</suit>
      <card>Ace of Spades</card>
      <short>A♠</short>
    </cards>
    <cards>
      <rank>3</rank>
      <suit>Clubs</suit>
      <card>3 of Clubs</card>
      <short>3♣</short>
    </cards>
    <cards>
      <rank>5</rank>
      <suit>Clubs</suit>
      <card>5 of Clubs</card>
      <short>5♣</short>
    </cards>
    <cards>
      <rank>8</rank>
      <suit>Hearts</suit>
      <card>8 of Hearts</card>
      <short>8♥</short>
    </cards>
    <cards>
      <rank>3</rank>
      <suit>Spades</suit>
      <card>3 of Spades</card>
      <short>3♠</short>
    </cards>
    <cards>
      <rank>6</rank>
      <suit>Clubs</suit>
      <card>6 of Clubs</card>
      <short>6♣</short>
    </cards>
    <cards>
      <rank>4</rank>
      <suit>Diamonds</suit>
      <card>4 of Diamonds</card>
      <short>4♦</short>
    </cards>
    <cards>
      <rank>2</rank>
      <suit>Hearts</suit>
      <card>2 of Hearts</card>
      <short>2♥</short>
    </cards>
    <cards>
      <rank>3</rank>
      <suit>Diamonds</suit>
      <card>3 of Diamonds</card>
      <short>3♦</short>
    </cards>
    <cards>
      <rank>9</rank>
      <suit>Diamonds</suit>
      <card>9 of Diamonds</card>
      <short>9♦</short>
    </cards>
    <cards>
      <rank>5</rank>
      <suit>Spades</suit>
      <card>5 of Spades</card>
      <short>5♠</short>
    </cards>
    <cards>
      <rank>3</rank>
      <suit>Hearts</suit>
      <card>3 of Hearts</card>
      <short>3♥</short>
    </cards>
    <cards>
      <rank>6</rank>
      <suit>Diamonds</suit>
      <card>6 of Diamonds</card>
      <short>6♦</short>
    </cards>
    <top_card>
      <rank>8</rank>
      <suit>Spades</suit>
      <card>8 of Spades</card>
      <short>8♠</short>
    </top_card>
    <bottom_card>
      <rank>6</rank>
      <suit>Diamonds</suit>
      <card>6 of Diamonds</card>
      <short>6♦</short>
    </bottom_card>
    <sample_hand>
      <rank>8</rank>
      <suit>Spades</suit>
      <card>8 of Spades</card>
      <short>8♠</short>
    </sample_hand>
    <sample_hand>
      <rank>2</rank>
      <suit>Spades</suit>
      <card>2 of Spades</card>
      <short>2♠</short>
    </sample_hand>
    <sample_hand>
      <rank>Queen</rank>
      <suit>Hearts</suit>
      <card>Queen of Hearts</card>
      <short>Q♥</short>
    </sample_hand>
    <sample_hand>
      <rank>7</rank>
      <suit>Clubs</suit>
      <card>7 of Clubs</card>
      <short>7♣</short>
    </sample_hand>
    <sample_hand>
      <rank>Queen</rank>
      <suit>Spades</suit>
      <card>Queen of Spades</card>
      <short>Q♠</short>
    </sample_hand>
  </data>
</Root>
```

YAML Response

200 OK

```yaml
status: ok
error: 
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♠
```

Markdown Response

200 OK

```markdown
| Field | Value |
| --- | --- |
| status | ok |
| error |  |
| 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 |
| top_card.suit | Spades |
| top_card.card | 8 of Spades |
| top_card.short | 8♠ |
| bottom_card.rank | 6 |
| bottom_card.suit | Diamonds |
| bottom_card.card | 6 of Diamonds |
| bottom_card.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♠"} |
```

CSV Response

200 OK

status

error

total\_cards

decks\_used

includes\_jokers

shuffle\_method

cards

top\_card.rank

top\_card.suit

top\_card.card

top\_card.short

bottom\_card.rank

bottom\_card.suit

bottom\_card.card

bottom\_card.short

sample\_hand

ok

52

1

False

fisher-yates

{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♦}

8

Spades

8 of Spades

8♠

6

Diamonds

6 of Diamonds

6♦

{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♠}

[Live Test API in Playground](https://dashboard.apiverve.com/playground?api=carddeckshuffler)

### Response Structure

All API responses follow a consistent structure with the following fields:

Field

Type

Description

Example

status

string

Indicates whether the request was successful ("ok") or failed ("error")

ok

error

string | null

Contains error message if status is "error", otherwise null

null

data

object | null

Contains the API response data if successful, otherwise null

{...}

### Response Data Fields

When the request is successful, the `data` object contains the following fields:

Field

Type

Sample Value

total\_cards

number

52

decks\_used

number

1

includes\_jokers

boolean

false

shuffle\_method

string

"fisher-yates"

\[ \] Array items:

array\[52\]

Array of objects

└ rank

string

"8"

└ suit

string

"Spades"

└ card

string

"8 of Spades"

└ short

string

"8♠"

top\_card

object

{...}

└ rank

string

"8"

└ suit

string

"Spades"

└ card

string

"8 of Spades"

└ short

string

"8♠"

bottom\_card

object

{...}

└ rank

string

"6"

└ suit

string

"Diamonds"

└ card

string

"6 of Diamonds"

└ short

string

"6♦"

\[ \] Array items:

array\[5\]

Array of objects

## Headers

Required and optional headers for API requests:

Header Name

Required

Example Value

Description

X-API-Key

Yes

your\_api\_key\_here

Your APIVerve API key. Found in your dashboard under API Keys.

Accept

No

application/json

Specify response format: application/json (default), application/xml, or application/yaml

User-Agent

No

MyApp/1.0

Identifies your application for analytics and debugging purposes

X-Request-ID

No

req\_123456789

Custom request identifier for tracking and debugging requests

Cache-Control

No

no-cache

Control caching behavior for the request and response

## GraphQL AccessALPHA

Most APIVerve APIs support GraphQL queries, allowing you to combine multiple API calls into a single request and retrieve only the data you need. This powerful feature enables you to orchestrate complex data fetching with precise field selection.

Not all APIs support GraphQL. Check the API schema or test in the GraphQL Explorer to confirm availability for this specific endpoint.

**Token Cost:** Each API called in your GraphQL query consumes its standard token cost.

GraphQL Endpoint

```http
POST https://api.apiverve.com/v1/graphql
```

GraphQL Query Example

```graphql
query {
  carddeckshuffler(
    input: {
      decks: "1"
      jokers: "false"
      method: "fisher-yates"
    }
  ) {
    total_cards
    decks_used
    includes_jokers
    shuffle_method
    cards
    top_card {
      rank
      suit
      card
      short
    }
    bottom_card {
      rank
      suit
      card
      short
    }
    sample_hand
  }
}
```

**Note:** Authentication is handled via the `x-api-key` header in your GraphQL request, not as a query parameter.

[Try in GraphQL Explorer](https://dashboard.apiverve.com/vervekit/graphql)[GraphQL Documentation](/graphql/usage)

## CORS Support

All APIVerve APIs support Cross-Origin Resource Sharing (CORS) with wildcard configuration, allowing you to call the API directly from browser-based applications without proxy servers.

CORS Header

Value

Description

Access-Control-Allow-Origin

\*

Accepts requests from any origin

Access-Control-Allow-Methods

\*

Accepts any HTTP method

Access-Control-Allow-Headers

\*

Accepts any request headers

**Browser Usage:** You can make direct API calls from JavaScript running in the browser without encountering CORS errors. No additional configuration needed.

## Rate Limiting

APIVerve implements rate limiting to ensure fair usage and maintain service quality across all users. Rate limits vary by subscription plan and are applied per API key.

Plan

Rate Limit

Description

Free

5 requests/min

Hard rate limit enforced - exceeding will return 429 errors

Starter

No Limit

Production ready - no rate limiting or throttling

Pro

No Limit

Production ready - no rate limiting or throttling

Mega

No Limit

Production ready - no rate limiting or throttling

### Rate Limit Headers

When rate limits apply, each API response includes headers to help you track your usage:

Header

Description

X-RateLimit-Limit

Maximum number of requests allowed per time window

X-RateLimit-Remaining

Number of requests remaining in the current window

X-RateLimit-Reset

Unix timestamp when the rate limit window resets

### Handling Rate Limits

**Free Plan:** When you exceed your rate limit, the API returns a `429 Too Many Requests` status code. Your application should implement appropriate backoff logic to handle this gracefully.

**Paid Plans:** No rate limiting or throttling applied. All paid plans (Starter, Pro, Mega) are production-ready.

**Best Practices:**

-   Monitor the rate limit headers to track your usage (Free plan only)
-   Implement caching where appropriate to reduce API calls
-   Upgrade to Pro or Mega for guaranteed no-throttle performance

**Note:** Rate limits are separate from token consumption. You may have tokens remaining but still hit rate limits on Free tier.

## Client Libraries

To get started with minimal code, most of our APIs are available through client libraries and clients:

[![NPM](/images/npm.png)](https://www.npmjs.com/~apivervehq)[![PyPI](/images/pypi.png)](https://pypi.org/user/apiverve/)[![NuGet](/images/nuget.png)](http://nuget.org/profiles/APIVerve)[![Swagger](/images/swagger.png)](https://apiverve.web.app/publicapis/api-schema/carddeckshuffler.json)

## Error Codes

The API uses standard HTTP status codes to indicate success or failure:

Code

Message

Description

Solution

200

OK

Request successful, data returned

No action needed - request was successful

400

Bad Request

Invalid request parameters or malformed request

Check required parameters and ensure values match expected formats

401

Unauthorized

Missing or invalid API key

Include x-api-key header with valid API key from dashboard

403

Forbidden

API key lacks permission or insufficient tokens

Check token balance in dashboard or upgrade plan

429

Too Many Requests

Rate limit exceeded (Free: 5 req/min)

Implement request throttling or upgrade to paid plan

500

Internal Server Error

Server error occurred

Retry request after a few seconds, contact support if persists

503

Service Unavailable

API temporarily unavailable

Wait and retry, check status page for maintenance updates

**Need help?** [Contact support](https://apiverve.com/contact) with your `X-Request-ID` for assistance.

## Frequently Asked Questions

How do I get an API key?

Sign up for a free account at [dashboard.apiverve.com](https://dashboard.apiverve.com). Your API key will be automatically generated and available in your dashboard. The free plan includes 1,000 tokens plus a 500 token bonus.

What are tokens and how do they work?

Tokens are your API usage currency. Each successful API call consumes tokens based on the API's complexity. Most APIs cost 1 token per call, while more complex APIs may cost 2-5 tokens. Failed requests and errors don't consume tokens. Check the API details above to see the token cost for this specific API.

Can I use this API in production?

The free plan is for testing and development only. For production use, upgrade to a paid plan (Starter, Pro, or Mega) which includes commercial use rights, no attribution requirements, and guaranteed uptime SLAs. All paid plans are production-ready.

Can I use this API from a browser?

Yes! All APIVerve APIs support CORS with wildcard configuration, so you can call them directly from browser-based JavaScript without needing a proxy server. See the [CORS section](#cors) above for details.

What happens if I exceed my token limit?

When you reach your monthly token limit, API requests will return an error until you upgrade your plan or wait for the next billing cycle. You'll receive notifications at 80% and 95% usage to give you time to upgrade if needed.

## People who used this also used...

Based on your interest in Card Deck Shuffler, you might also like these APIs:

[

![Dice Roller](https://apiverve.web.app/publicapis/logos/diceroller.svg)

### Dice Roller

Dice Roller is a tool for rolling dice using standard RPG notation (XdY format). It supports multiple dice, various die sizes, modifiers, and provides statistics including min, max, average, and theoretical values for gaming and simulations.

1 token per call

](/ref/diceroller)[

![Coin Flipper](https://apiverve.web.app/publicapis/logos/coinflipper.svg)

### Coin Flipper

Coin Flipper is a tool for simulating coin flips. It can flip multiple coins at once and provides statistics including heads/tails counts, percentages, streaks, and fairness analysis for probability experiments and gaming.

1 token per call

](/ref/coinflipper)[

![Slot Machine Simulator](https://apiverve.web.app/publicapis/logos/slotmachine.svg)

### Slot Machine Simulator

Slot Machine Simulator is a tool for simulating slot machine spins with realistic reel symbols and payout calculations. It supports customizable number of reels, bet amounts, and multiple spins with detailed win/loss statistics.

1 token per call

](/ref/slotmachine)

## What's Next?

Continue your journey with these recommended resources

[

### Browse All APIs

Explore our complete catalog of APIs

](/api-endpoints)[

### Authentication Guide

Learn about API keys and security

](/authentication)[

### Rate Limits

Understand usage limits and best practices

](/rate-limits)

Help us improve our documentation

YesNo

Copy for LLM[View as Markdown](/ref/carddeckshuffler/ai.md "View this page as plain markdown")[Star](https://github.com/apiverve/carddeckshuffler-api "Star carddeckshuffler API on GitHub")

---

*Source: [docs.apiverve.com/ref/carddeckshuffler](https://docs.apiverve.com/ref/carddeckshuffler)*