: Shuffle a pile

API: deckofcardsapi.com:deck-of-cards
Endpoint: /deck/{deck_id}/pile/{pile_name}/shuffle/
Response format: application/json
Auth: unknown
Method: GET
Last Status: 200
Latency: 525ms

Description

Returns confirmation that the pile was shuffled along with the remaining count. Use this to randomize the order of cards in a pile before drawing from it.

From spec: Shuffles the cards in a specific pile

Usage Tips

- Creates the pile if it doesn't exist - Only shuffles cards currently in the pile, not the main deck - Common use: shuffling a discard pile before reusing it

Parameters (2)

deck_id (string, path, required)

The deck ID

pile_name (string, path, required)

Name of the pile to shuffle

Examples (1)

Shuffle cards in the player1 pile probe-gate

Demonstrates shuffling cards within a specific pile while leaving the main deck unchanged

curl 'https://deckofcardsapi.com/api/deck/wa025949x0ez/pile/player1/shuffle/'
import requests

resp = requests.get("https://deckofcardsapi.com/api/deck/wa025949x0ez/pile/player1/shuffle/")
data = resp.json()
import zingu_apis

api = zingu_apis.api("deckofcardsapi")
result = api.fetch("deck/{deck_id}/pile/{pile_name}/shuffle/")

for item in result:
    print(item)
const resp = await fetch("https://deckofcardsapi.com/api/deck/wa025949x0ez/pile/player1/shuffle/");
const data = await resp.json();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 01:29:35.552625 200 525ms
2026-04-15 03:07:39.287480 200 291ms
2026-04-14 03:10:35.499931 200 658ms
2026-04-12 16:37:02.552471 200 262ms
2026-04-10 01:39:05.548357 200 633ms
2026-04-09 00:28:11.727967 200 549ms