Card Deck ShufflerCard 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 and visiting your dashboard.

Endpoint

GET Request
GET https://api.apiverve.com/v1/carddeckshuffler

Code Examples

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

cURL Request
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)
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)
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)
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

$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)
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)
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)
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.

Parameters

The following parameters are available for this API endpoint:

ParameterTypeRequiredLocationDescriptionExample
decksnumberNoqueryNumber of decks to shuffle (1-10, default: 1)1
jokersbooleanNoqueryInclude jokers in the deck (default: false)false
methodstringNoqueryShuffling method: fisher-yates or riffle (default: fisher-yates)fisher-yates

Response

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

Example Responses

JSON Response
200 OK
{
  "status": "ok",
  "error": null,
  "data": {
    "total_cards": 52,
    "decks_used": 1,
    "includes_jokers": false,
    "shuffle_method": "fisher-yates",
    "cards": [
      {
        "rank": "3",
        "suit": "Hearts",
        "card": "3 of Hearts",
        "short": "3♥"
      },
      {
        "rank": "Ace",
        "suit": "Hearts",
        "card": "Ace of Hearts",
        "short": "A♥"
      },
      {
        "rank": "4",
        "suit": "Hearts",
        "card": "4 of Hearts",
        "short": "4♥"
      },
      {
        "rank": "Queen",
        "suit": "Spades",
        "card": "Queen of Spades",
        "short": "Qâ™ "
      },
      {
        "rank": "4",
        "suit": "Diamonds",
        "card": "4 of Diamonds",
        "short": "4♦"
      },
      {
        "rank": "7",
        "suit": "Hearts",
        "card": "7 of Hearts",
        "short": "7♥"
      },
      {
        "rank": "9",
        "suit": "Spades",
        "card": "9 of Spades",
        "short": "9â™ "
      },
      {
        "rank": "10",
        "suit": "Hearts",
        "card": "10 of Hearts",
        "short": "10♥"
      },
      {
        "rank": "4",
        "suit": "Clubs",
        "card": "4 of Clubs",
        "short": "4♣"
      },
      {
        "rank": "2",
        "suit": "Diamonds",
        "card": "2 of Diamonds",
        "short": "2♦"
      },
      {
        "rank": "2",
        "suit": "Hearts",
        "card": "2 of Hearts",
        "short": "2♥"
      },
      {
        "rank": "Ace",
        "suit": "Diamonds",
        "card": "Ace of Diamonds",
        "short": "A♦"
      },
      {
        "rank": "Ace",
        "suit": "Spades",
        "card": "Ace of Spades",
        "short": "Aâ™ "
      },
      {
        "rank": "Queen",
        "suit": "Clubs",
        "card": "Queen of Clubs",
        "short": "Q♣"
      },
      {
        "rank": "Jack",
        "suit": "Hearts",
        "card": "Jack of Hearts",
        "short": "J♥"
      },
      {
        "rank": "Jack",
        "suit": "Diamonds",
        "card": "Jack of Diamonds",
        "short": "J♦"
      },
      {
        "rank": "4",
        "suit": "Spades",
        "card": "4 of Spades",
        "short": "4â™ "
      },
      {
        "rank": "2",
        "suit": "Spades",
        "card": "2 of Spades",
        "short": "2â™ "
      },
      {
        "rank": "King",
        "suit": "Spades",
        "card": "King of Spades",
        "short": "Kâ™ "
      },
      {
        "rank": "Queen",
        "suit": "Hearts",
        "card": "Queen of Hearts",
        "short": "Q♥"
      },
      {
        "rank": "Jack",
        "suit": "Spades",
        "card": "Jack of Spades",
        "short": "Jâ™ "
      },
      {
        "rank": "6",
        "suit": "Clubs",
        "card": "6 of Clubs",
        "short": "6♣"
      },
      {
        "rank": "8",
        "suit": "Hearts",
        "card": "8 of Hearts",
        "short": "8♥"
      },
      {
        "rank": "6",
        "suit": "Spades",
        "card": "6 of Spades",
        "short": "6â™ "
      },
      {
        "rank": "3",
        "suit": "Clubs",
        "card": "3 of Clubs",
        "short": "3♣"
      },
      {
        "rank": "King",
        "suit": "Clubs",
        "card": "King of Clubs",
        "short": "K♣"
      },
      {
        "rank": "10",
        "suit": "Spades",
        "card": "10 of Spades",
        "short": "10â™ "
      },
      {
        "rank": "6",
        "suit": "Hearts",
        "card": "6 of Hearts",
        "short": "6♥"
      },
      {
        "rank": "7",
        "suit": "Diamonds",
        "card": "7 of Diamonds",
        "short": "7♦"
      },
      {
        "rank": "Ace",
        "suit": "Clubs",
        "card": "Ace of Clubs",
        "short": "A♣"
      },
      {
        "rank": "3",
        "suit": "Spades",
        "card": "3 of Spades",
        "short": "3â™ "
      },
      {
        "rank": "King",
        "suit": "Diamonds",
        "card": "King of Diamonds",
        "short": "K♦"
      },
      {
        "rank": "5",
        "suit": "Clubs",
        "card": "5 of Clubs",
        "short": "5♣"
      },
      {
        "rank": "Jack",
        "suit": "Clubs",
        "card": "Jack of Clubs",
        "short": "J♣"
      },
      {
        "rank": "8",
        "suit": "Diamonds",
        "card": "8 of Diamonds",
        "short": "8♦"
      },
      {
        "rank": "9",
        "suit": "Diamonds",
        "card": "9 of Diamonds",
        "short": "9♦"
      },
      {
        "rank": "5",
        "suit": "Hearts",
        "card": "5 of Hearts",
        "short": "5♥"
      },
      {
        "rank": "Queen",
        "suit": "Diamonds",
        "card": "Queen of Diamonds",
        "short": "Q♦"
      },
      {
        "rank": "8",
        "suit": "Clubs",
        "card": "8 of Clubs",
        "short": "8♣"
      },
      {
        "rank": "6",
        "suit": "Diamonds",
        "card": "6 of Diamonds",
        "short": "6♦"
      },
      {
        "rank": "8",
        "suit": "Spades",
        "card": "8 of Spades",
        "short": "8â™ "
      },
      {
        "rank": "5",
        "suit": "Diamonds",
        "card": "5 of Diamonds",
        "short": "5♦"
      },
      {
        "rank": "7",
        "suit": "Spades",
        "card": "7 of Spades",
        "short": "7â™ "
      },
      {
        "rank": "King",
        "suit": "Hearts",
        "card": "King of Hearts",
        "short": "K♥"
      },
      {
        "rank": "7",
        "suit": "Clubs",
        "card": "7 of Clubs",
        "short": "7♣"
      },
      {
        "rank": "5",
        "suit": "Spades",
        "card": "5 of Spades",
        "short": "5â™ "
      },
      {
        "rank": "3",
        "suit": "Diamonds",
        "card": "3 of Diamonds",
        "short": "3♦"
      },
      {
        "rank": "2",
        "suit": "Clubs",
        "card": "2 of Clubs",
        "short": "2♣"
      },
      {
        "rank": "10",
        "suit": "Diamonds",
        "card": "10 of Diamonds",
        "short": "10♦"
      },
      {
        "rank": "9",
        "suit": "Clubs",
        "card": "9 of Clubs",
        "short": "9♣"
      },
      {
        "rank": "10",
        "suit": "Clubs",
        "card": "10 of Clubs",
        "short": "10♣"
      },
      {
        "rank": "9",
        "suit": "Hearts",
        "card": "9 of Hearts",
        "short": "9♥"
      }
    ],
    "top_card": {
      "rank": "3",
      "suit": "Hearts",
      "card": "3 of Hearts",
      "short": "3♥"
    },
    "bottom_card": {
      "rank": "9",
      "suit": "Hearts",
      "card": "9 of Hearts",
      "short": "9♥"
    },
    "sample_hand": [
      {
        "rank": "3",
        "suit": "Hearts",
        "card": "3 of Hearts",
        "short": "3♥"
      },
      {
        "rank": "Ace",
        "suit": "Hearts",
        "card": "Ace of Hearts",
        "short": "A♥"
      },
      {
        "rank": "4",
        "suit": "Hearts",
        "card": "4 of Hearts",
        "short": "4♥"
      },
      {
        "rank": "Queen",
        "suit": "Spades",
        "card": "Queen of Spades",
        "short": "Qâ™ "
      },
      {
        "rank": "4",
        "suit": "Diamonds",
        "card": "4 of Diamonds",
        "short": "4♦"
      }
    ]
  }
}
XML Response
200 OK
<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>3</rank>
      <suit>Hearts</suit>
      <card>3 of Hearts</card>
      <short>3♥</short>
    </cards>
    <cards>
      <rank>Ace</rank>
      <suit>Hearts</suit>
      <card>Ace of Hearts</card>
      <short>A♥</short>
    </cards>
    <cards>
      <rank>4</rank>
      <suit>Hearts</suit>
      <card>4 of Hearts</card>
      <short>4♥</short>
    </cards>
    <cards>
      <rank>Queen</rank>
      <suit>Spades</suit>
      <card>Queen of Spades</card>
      <short>Qâ™ </short>
    </cards>
    <cards>
      <rank>4</rank>
      <suit>Diamonds</suit>
      <card>4 of Diamonds</card>
      <short>4♦</short>
    </cards>
    <cards>
      <rank>7</rank>
      <suit>Hearts</suit>
      <card>7 of Hearts</card>
      <short>7♥</short>
    </cards>
    <cards>
      <rank>9</rank>
      <suit>Spades</suit>
      <card>9 of Spades</card>
      <short>9â™ </short>
    </cards>
    <cards>
      <rank>10</rank>
      <suit>Hearts</suit>
      <card>10 of Hearts</card>
      <short>10♥</short>
    </cards>
    <cards>
      <rank>4</rank>
      <suit>Clubs</suit>
      <card>4 of Clubs</card>
      <short>4♣</short>
    </cards>
    <cards>
      <rank>2</rank>
      <suit>Diamonds</suit>
      <card>2 of Diamonds</card>
      <short>2♦</short>
    </cards>
    <cards>
      <rank>2</rank>
      <suit>Hearts</suit>
      <card>2 of Hearts</card>
      <short>2♥</short>
    </cards>
    <cards>
      <rank>Ace</rank>
      <suit>Diamonds</suit>
      <card>Ace of Diamonds</card>
      <short>A♦</short>
    </cards>
    <cards>
      <rank>Ace</rank>
      <suit>Spades</suit>
      <card>Ace of Spades</card>
      <short>Aâ™ </short>
    </cards>
    <cards>
      <rank>Queen</rank>
      <suit>Clubs</suit>
      <card>Queen of Clubs</card>
      <short>Q♣</short>
    </cards>
    <cards>
      <rank>Jack</rank>
      <suit>Hearts</suit>
      <card>Jack of Hearts</card>
      <short>J♥</short>
    </cards>
    <cards>
      <rank>Jack</rank>
      <suit>Diamonds</suit>
      <card>Jack of Diamonds</card>
      <short>J♦</short>
    </cards>
    <cards>
      <rank>4</rank>
      <suit>Spades</suit>
      <card>4 of Spades</card>
      <short>4â™ </short>
    </cards>
    <cards>
      <rank>2</rank>
      <suit>Spades</suit>
      <card>2 of Spades</card>
      <short>2â™ </short>
    </cards>
    <cards>
      <rank>King</rank>
      <suit>Spades</suit>
      <card>King of Spades</card>
      <short>Kâ™ </short>
    </cards>
    <cards>
      <rank>Queen</rank>
      <suit>Hearts</suit>
      <card>Queen of Hearts</card>
      <short>Q♥</short>
    </cards>
    <cards>
      <rank>Jack</rank>
      <suit>Spades</suit>
      <card>Jack of Spades</card>
      <short>Jâ™ </short>
    </cards>
    <cards>
      <rank>6</rank>
      <suit>Clubs</suit>
      <card>6 of Clubs</card>
      <short>6♣</short>
    </cards>
    <cards>
      <rank>8</rank>
      <suit>Hearts</suit>
      <card>8 of Hearts</card>
      <short>8♥</short>
    </cards>
    <cards>
      <rank>6</rank>
      <suit>Spades</suit>
      <card>6 of Spades</card>
      <short>6â™ </short>
    </cards>
    <cards>
      <rank>3</rank>
      <suit>Clubs</suit>
      <card>3 of Clubs</card>
      <short>3♣</short>
    </cards>
    <cards>
      <rank>King</rank>
      <suit>Clubs</suit>
      <card>King of Clubs</card>
      <short>K♣</short>
    </cards>
    <cards>
      <rank>10</rank>
      <suit>Spades</suit>
      <card>10 of Spades</card>
      <short>10â™ </short>
    </cards>
    <cards>
      <rank>6</rank>
      <suit>Hearts</suit>
      <card>6 of Hearts</card>
      <short>6♥</short>
    </cards>
    <cards>
      <rank>7</rank>
      <suit>Diamonds</suit>
      <card>7 of Diamonds</card>
      <short>7♦</short>
    </cards>
    <cards>
      <rank>Ace</rank>
      <suit>Clubs</suit>
      <card>Ace of Clubs</card>
      <short>A♣</short>
    </cards>
    <cards>
      <rank>3</rank>
      <suit>Spades</suit>
      <card>3 of Spades</card>
      <short>3â™ </short>
    </cards>
    <cards>
      <rank>King</rank>
      <suit>Diamonds</suit>
      <card>King of Diamonds</card>
      <short>K♦</short>
    </cards>
    <cards>
      <rank>5</rank>
      <suit>Clubs</suit>
      <card>5 of Clubs</card>
      <short>5♣</short>
    </cards>
    <cards>
      <rank>Jack</rank>
      <suit>Clubs</suit>
      <card>Jack of Clubs</card>
      <short>J♣</short>
    </cards>
    <cards>
      <rank>8</rank>
      <suit>Diamonds</suit>
      <card>8 of Diamonds</card>
      <short>8♦</short>
    </cards>
    <cards>
      <rank>9</rank>
      <suit>Diamonds</suit>
      <card>9 of Diamonds</card>
      <short>9♦</short>
    </cards>
    <cards>
      <rank>5</rank>
      <suit>Hearts</suit>
      <card>5 of Hearts</card>
      <short>5♥</short>
    </cards>
    <cards>
      <rank>Queen</rank>
      <suit>Diamonds</suit>
      <card>Queen of Diamonds</card>
      <short>Q♦</short>
    </cards>
    <cards>
      <rank>8</rank>
      <suit>Clubs</suit>
      <card>8 of Clubs</card>
      <short>8♣</short>
    </cards>
    <cards>
      <rank>6</rank>
      <suit>Diamonds</suit>
      <card>6 of Diamonds</card>
      <short>6♦</short>
    </cards>
    <cards>
      <rank>8</rank>
      <suit>Spades</suit>
      <card>8 of Spades</card>
      <short>8â™ </short>
    </cards>
    <cards>
      <rank>5</rank>
      <suit>Diamonds</suit>
      <card>5 of Diamonds</card>
      <short>5♦</short>
    </cards>
    <cards>
      <rank>7</rank>
      <suit>Spades</suit>
      <card>7 of Spades</card>
      <short>7â™ </short>
    </cards>
    <cards>
      <rank>King</rank>
      <suit>Hearts</suit>
      <card>King of Hearts</card>
      <short>K♥</short>
    </cards>
    <cards>
      <rank>7</rank>
      <suit>Clubs</suit>
      <card>7 of Clubs</card>
      <short>7♣</short>
    </cards>
    <cards>
      <rank>5</rank>
      <suit>Spades</suit>
      <card>5 of Spades</card>
      <short>5â™ </short>
    </cards>
    <cards>
      <rank>3</rank>
      <suit>Diamonds</suit>
      <card>3 of Diamonds</card>
      <short>3♦</short>
    </cards>
    <cards>
      <rank>2</rank>
      <suit>Clubs</suit>
      <card>2 of Clubs</card>
      <short>2♣</short>
    </cards>
    <cards>
      <rank>10</rank>
      <suit>Diamonds</suit>
      <card>10 of Diamonds</card>
      <short>10♦</short>
    </cards>
    <cards>
      <rank>9</rank>
      <suit>Clubs</suit>
      <card>9 of Clubs</card>
      <short>9♣</short>
    </cards>
    <cards>
      <rank>10</rank>
      <suit>Clubs</suit>
      <card>10 of Clubs</card>
      <short>10♣</short>
    </cards>
    <cards>
      <rank>9</rank>
      <suit>Hearts</suit>
      <card>9 of Hearts</card>
      <short>9♥</short>
    </cards>
    <top_card>
      <rank>3</rank>
      <suit>Hearts</suit>
      <card>3 of Hearts</card>
      <short>3♥</short>
    </top_card>
    <bottom_card>
      <rank>9</rank>
      <suit>Hearts</suit>
      <card>9 of Hearts</card>
      <short>9♥</short>
    </bottom_card>
    <sample_hand>
      <rank>3</rank>
      <suit>Hearts</suit>
      <card>3 of Hearts</card>
      <short>3♥</short>
    </sample_hand>
    <sample_hand>
      <rank>Ace</rank>
      <suit>Hearts</suit>
      <card>Ace of Hearts</card>
      <short>A♥</short>
    </sample_hand>
    <sample_hand>
      <rank>4</rank>
      <suit>Hearts</suit>
      <card>4 of Hearts</card>
      <short>4♥</short>
    </sample_hand>
    <sample_hand>
      <rank>Queen</rank>
      <suit>Spades</suit>
      <card>Queen of Spades</card>
      <short>Qâ™ </short>
    </sample_hand>
    <sample_hand>
      <rank>4</rank>
      <suit>Diamonds</suit>
      <card>4 of Diamonds</card>
      <short>4♦</short>
    </sample_hand>
  </data>
</Root>
YAML Response
200 OK
status: ok
error: 
data:
  total_cards: 52
  decks_used: 1
  includes_jokers: false
  shuffle_method: fisher-yates
  cards:
  - rank: 3
    suit: Hearts
    card: 3 of Hearts
    short: 3♥
  - rank: Ace
    suit: Hearts
    card: Ace of Hearts
    short: A♥
  - rank: 4
    suit: Hearts
    card: 4 of Hearts
    short: 4♥
  - rank: Queen
    suit: Spades
    card: Queen of Spades
    short: Qâ™ 
  - rank: 4
    suit: Diamonds
    card: 4 of Diamonds
    short: 4♦
  - rank: 7
    suit: Hearts
    card: 7 of Hearts
    short: 7♥
  - rank: 9
    suit: Spades
    card: 9 of Spades
    short: 9â™ 
  - rank: 10
    suit: Hearts
    card: 10 of Hearts
    short: 10♥
  - rank: 4
    suit: Clubs
    card: 4 of Clubs
    short: 4♣
  - rank: 2
    suit: Diamonds
    card: 2 of Diamonds
    short: 2♦
  - rank: 2
    suit: Hearts
    card: 2 of Hearts
    short: 2♥
  - rank: Ace
    suit: Diamonds
    card: Ace of Diamonds
    short: A♦
  - rank: Ace
    suit: Spades
    card: Ace of Spades
    short: Aâ™ 
  - rank: Queen
    suit: Clubs
    card: Queen of Clubs
    short: Q♣
  - rank: Jack
    suit: Hearts
    card: Jack of Hearts
    short: J♥
  - rank: Jack
    suit: Diamonds
    card: Jack of Diamonds
    short: J♦
  - rank: 4
    suit: Spades
    card: 4 of Spades
    short: 4â™ 
  - rank: 2
    suit: Spades
    card: 2 of Spades
    short: 2â™ 
  - rank: King
    suit: Spades
    card: King of Spades
    short: Kâ™ 
  - rank: Queen
    suit: Hearts
    card: Queen of Hearts
    short: Q♥
  - rank: Jack
    suit: Spades
    card: Jack of Spades
    short: Jâ™ 
  - rank: 6
    suit: Clubs
    card: 6 of Clubs
    short: 6♣
  - rank: 8
    suit: Hearts
    card: 8 of Hearts
    short: 8♥
  - rank: 6
    suit: Spades
    card: 6 of Spades
    short: 6â™ 
  - rank: 3
    suit: Clubs
    card: 3 of Clubs
    short: 3♣
  - rank: King
    suit: Clubs
    card: King of Clubs
    short: K♣
  - rank: 10
    suit: Spades
    card: 10 of Spades
    short: 10â™ 
  - rank: 6
    suit: Hearts
    card: 6 of Hearts
    short: 6♥
  - rank: 7
    suit: Diamonds
    card: 7 of Diamonds
    short: 7♦
  - rank: Ace
    suit: Clubs
    card: Ace of Clubs
    short: A♣
  - rank: 3
    suit: Spades
    card: 3 of Spades
    short: 3â™ 
  - rank: King
    suit: Diamonds
    card: King of Diamonds
    short: K♦
  - rank: 5
    suit: Clubs
    card: 5 of Clubs
    short: 5♣
  - rank: Jack
    suit: Clubs
    card: Jack of Clubs
    short: J♣
  - rank: 8
    suit: Diamonds
    card: 8 of Diamonds
    short: 8♦
  - rank: 9
    suit: Diamonds
    card: 9 of Diamonds
    short: 9♦
  - rank: 5
    suit: Hearts
    card: 5 of Hearts
    short: 5♥
  - rank: Queen
    suit: Diamonds
    card: Queen of Diamonds
    short: Q♦
  - rank: 8
    suit: Clubs
    card: 8 of Clubs
    short: 8♣
  - rank: 6
    suit: Diamonds
    card: 6 of Diamonds
    short: 6♦
  - rank: 8
    suit: Spades
    card: 8 of Spades
    short: 8â™ 
  - rank: 5
    suit: Diamonds
    card: 5 of Diamonds
    short: 5♦
  - rank: 7
    suit: Spades
    card: 7 of Spades
    short: 7â™ 
  - rank: King
    suit: Hearts
    card: King of Hearts
    short: K♥
  - rank: 7
    suit: Clubs
    card: 7 of Clubs
    short: 7♣
  - rank: 5
    suit: Spades
    card: 5 of Spades
    short: 5â™ 
  - rank: 3
    suit: Diamonds
    card: 3 of Diamonds
    short: 3♦
  - rank: 2
    suit: Clubs
    card: 2 of Clubs
    short: 2♣
  - rank: 10
    suit: Diamonds
    card: 10 of Diamonds
    short: 10♦
  - rank: 9
    suit: Clubs
    card: 9 of Clubs
    short: 9♣
  - rank: 10
    suit: Clubs
    card: 10 of Clubs
    short: 10♣
  - rank: 9
    suit: Hearts
    card: 9 of Hearts
    short: 9♥
  top_card:
    rank: 3
    suit: Hearts
    card: 3 of Hearts
    short: 3♥
  bottom_card:
    rank: 9
    suit: Hearts
    card: 9 of Hearts
    short: 9♥
  sample_hand:
  - rank: 3
    suit: Hearts
    card: 3 of Hearts
    short: 3♥
  - rank: Ace
    suit: Hearts
    card: Ace of Hearts
    short: A♥
  - rank: 4
    suit: Hearts
    card: 4 of Hearts
    short: 4♥
  - rank: Queen
    suit: Spades
    card: Queen of Spades
    short: Qâ™ 
  - rank: 4
    suit: Diamonds
    card: 4 of Diamonds
    short: 4♦

Response Structure

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

FieldTypeDescriptionExample
statusstringIndicates whether the request was successful ("ok") or failed ("error")ok
errorstring | nullContains error message if status is "error", otherwise nullnull
dataobject | nullContains the API response data if successful, otherwise null{...}

Response Data Fields

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

FieldTypeSample Value
total_cardsnumber52
decks_usednumber1
includes_jokersbooleanfalse
shuffle_methodstring"fisher-yates"
cardsarray[{"rank":"3","suit":"Hearts","card":"3 of Hearts","short":"3♥"}, ...]
top_cardobject{...}
top_card.rankstring"3"
top_card.suitstring"Hearts"
top_card.cardstring"3 of Hearts"
top_card.shortstring"3♥"
bottom_cardobject{...}
bottom_card.rankstring"9"
bottom_card.suitstring"Hearts"
bottom_card.cardstring"9 of Hearts"
bottom_card.shortstring"9♥"
sample_handarray[{"rank":"3","suit":"Hearts","card":"3 of Hearts","short":"3♥"}, ...]

Headers

Required and optional headers for API requests:

Header NameRequiredExample ValueDescription
X-API-KeyYesyour_api_key_hereYour APIVerve API key. Found in your dashboard under API Keys.
AcceptNoapplication/jsonSpecify response format: application/json (default), application/xml, or application/yaml
User-AgentNoMyApp/1.0Identifies your application for analytics and debugging purposes
X-Request-IDNoreq_123456789Custom request identifier for tracking and debugging requests
Cache-ControlNono-cacheControl caching behavior for the request and response

GraphQL AccessBETA

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: GraphQL requests cost 1 token for orchestration, plus the standard token cost for each API called in your query. For example, querying 3 APIs in a single GraphQL request would cost 1 + 3 = 4 tokens total.

GraphQL Endpoint
POST https://api.apiverve.com/v1/graphql
GraphQL Query Example
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.

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 HeaderValueDescription
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.

PlanRate LimitDescription
Free5 requests/minHard rate limit enforced - exceeding will return 429 errors
StarterSmart LimitingProduction ready - performance-based throttling only as last resort
ProNo LimitProduction ready - no rate limiting or throttling
MegaNo LimitProduction ready - no rate limiting or throttling

Rate Limit Headers

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

HeaderDescription
X-RateLimit-LimitMaximum number of requests allowed per time window
X-RateLimit-RemainingNumber of requests remaining in the current window
X-RateLimit-ResetUnix 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.

Starter Plan: Smart limiting may slow down request processing during extreme load as a last resort, but will not return errors. All paid plans (Starter, Pro, Mega) are production-ready.

Pro & Mega Plans: No rate limiting or throttling applied.

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:

NPMPyPINuGetSwagger

Error Codes

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

CodeMessageDescriptionSolution
200OKRequest successful, data returnedNo action needed - request was successful
400Bad RequestInvalid request parameters or malformed requestCheck required parameters and ensure values match expected formats
401UnauthorizedMissing or invalid API keyInclude x-api-key header with valid API key from dashboard
403ForbiddenAPI key lacks permission or insufficient tokensCheck token balance in dashboard or upgrade plan
429Too Many RequestsRate limit exceeded (Free: 5 req/min)Implement request throttling or upgrade to paid plan
500Internal Server ErrorServer error occurredRetry request after a few seconds, contact support if persists
503Service UnavailableAPI temporarily unavailableWait and retry, check status page for maintenance updates

Need help? Contact support 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. 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 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.

What's Next?

Continue your journey with these recommended resources

Was this page helpful?

Help us improve our documentation