Shuffled Card Deck(s)

Use this endpoint to shuffle cards, several deck of cards can be shuffled at a time.

The random result object added properties

Properties

  • Name
    deck
    Type
    deck
    Description
    Shuffled deck(s) of cards.

The shuffled deck object

Properties

  • Name
    decks
    Type
    integer
    Description
    Amount of shuffled decks
  • Name
    cards
    Type
    card
    Description
    Amount of shuffled decks

The card object

Properties

  • Name
    rank
    Type
    string
    Description
    Rank of the card from 2 to ace.
  • Name
    suit
    Type
    string
    Description
    Suit of the card.

GET /api/random/deck

Shuffle Card Deck(s)

This endpoint allows you to shuffled and get deck(s) of cards, several decks can be shuffled at a time.

Parameters

  • Name
    decks
    Type
    optional integer
    Description
    Amount of decks to shuffle, default is 1.
  • Name
    cards
    Type
    integer
    Description
    Amount of cards to show on initial return, default is all. All cards may be retrieved later on the result page, also cards can be opened one by one, refer to the endpoints below.

Request

GET
/api/random/deck
 curl -G https://qrandom.io/api/random/deck 
 -d cards=10

Response

{
    "timestamp": "2023-02-11T10:33:32Z",
    "signature": "OaBI8hpPtd9WEL54ChpkWutXZYJ0GX95B+dMF9zI8Ji3Kb0uISqiMsRz7il7OFwTioo12EmDp4HO+12/W6R3MPPavdWae6g7hQUJZGA9fKnBkiFq3xM/jjPuT2Kn1bbZ0La6kOxrMDClArqbJFg6z0yTsc56wKR1KA7338cRP2rcPk90QhgUe2X5lyo/ztIPC6AglkSRuVuQOsRwTJ2vFu8Lrf1RHid9HewrrvOLAVm6Vs4KxIMvGnNWyaH4eUejIv3Ls9B0uzbW3nfaNyt3LUthT1MbU5ScIy3VjFV0qpwDxTFAmk/t+4Elkf14WXvnGRtHk6U+ne65VvV9OGSa15JhS4ubyJBL3/7qZYcyvDiRUodAlYeAkN/OPltHE0MvUnkxeYPn230qOyVpo5peaiqWM2x+zVqfbpPRgcZ8uS2qSSPHpVvKCkWGNdmmjVaCMkUzTOd1/GKKy+GRAmRh1leyLURlTjlNR/AN9nMUXihVOatz3v9X59IrjOaOU0hTPKK1SwezKtUIAT0zKTLQoCrcxMDis7Dbs60OY3NQIvsSQ1KvrUuEivH1Mr1vAdXHUy08iRs8fZqUnj20Nzt0xjWT3y+M9CDi8S8qep8QdzY8mvodmcagiO0p0EwZNbVPxOFKW7pvCCX2Env/3tMM21yY8yrfyEhr1xBG7d5m8qTosa9urIbyosWbcdm4bb6WwnhB3jd1tITFk+tSSRDL8FjyWKooMjSxmUEkqN9mJYZoMQkrDMW2bBzbb9eFQi3PDxiSvV8cUhDVCyIfAiNPCIbLu9zq6yKFazTbsn05r9Kwwd5TtZy7h+UUykxQc7bXWicJD73kmcy5uZ06cbBykMqU213vyBs771rS7kWQ",
    "deck": {
        "cards": [
            {
                "suit": "diamonds",
                "rank": "10"
            },
            {
                "suit": "hearts",
                "rank": "6"
            },
            {
                "suit": "hearts",
                "rank": "10"
            },
            {
                "suit": "clubs",
                "rank": "8"
            },
            {
                "suit": "diamonds",
                "rank": "4"
            },
            {
                "suit": "clubs",
                "rank": "5"
            },
            {
                "suit": "diamonds",
                "rank": "ace"
            },
            {
                "suit": "diamonds",
                "rank": "3"
            },
            {
                "suit": "diamonds",
                "rank": "5"
            },
            {
                "suit": "hearts",
                "rank": "5"
            }
        ],
        "decks": 1
    },
    "message": "Request: Cards To Show: 10, Decks: 1, ResultHash: e4f36cf7b70ce9707f2d272634e782d48eca9950e8282257798eba29a35b75dd, Timestamp: 1676111612.154979",
    "elapsedTime": 0.395,
    "id": "NUQyOEIzRkUtN0QwNy00QUMyLUEyREItN0QyNDc2RjNFNEM4",
    "resultType": "shuffledDeck"
}

GET /api/random/deck/:resultId/show

Get Next Card

Retrieve the next card or card at required index from the shuffled deck(s).

Parameters

  • Name
    at
    Type
    integer
    Description
    Index of the requested card.

Request

GET
/api/random/deck/:resultId/show
 curl -G https://qrandom.io/api/random/deck/NUQyOEIzRkUtN0QwNy00QUMyLUEyREItN0QyNDc2RjNFNEM4/show 
 -d at=10

Response

{
    "suit": "spades",
    "rank": "9"
}

GET /api/random/deck/:resultId/all

Get All Cards

Retrieve the all cards from the shuffled deck(s).

Request

GET
/api/random/deck/:resultId/all
 curl https://qrandom.io/api/random/deck/NUQyOEIzRkUtN0QwNy00QUMyLUEyREItN0QyNDc2RjNFNEM4/all

Response

[
    {
        "suit": "diamonds",
        "rank": "10"
    },
    {
        "suit": "hearts",
        "rank": "6"
    },
    {
        "suit": "hearts",
        "rank": "10"
    },
    {
        "suit": "clubs",
        "rank": "8"
    },
    // ...
]